Skip to content

Commit d8e1e3b

Browse files
committed
Use gem unpack to get precompiled extensions on Windows
1 parent 7f51901 commit d8e1e3b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,18 @@ jobs:
132132
run: |
133133
$rubyArchitecture = (ruby -e "puts RbConfig::CONFIG['arch']").Trim()
134134
$gemVersion = (Get-Content VERSION).Trim()
135-
$gemToInstall = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
135+
$gemToUnpack = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
136136
137-
Write-Host "Looking to install $gemToInstall"
138-
gem install --local --install-dir=./tmp "$gemToInstall"
137+
Write-Host "Looking to unpack $gemToUnpack"
138+
gem unpack --target ./tmp "$gemToUnpack"
139139
140140
# Restore precompiled code
141-
$source = (Resolve-Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
141+
$source = (Resolve-Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
142142
$destination = (Resolve-Path ".\lib\tiny_tds").Path
143143
Get-ChildItem $source -Recurse -Exclude "*.rb" | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}
144144
145145
# Restore ports
146-
Copy-Item -Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
146+
Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
147147
148148
- name: Setup MSSQL
149149
uses: potatoqualitee/[email protected]
@@ -257,18 +257,18 @@ jobs:
257257
run: |
258258
$rubyArchitecture = (ruby -e "puts RbConfig::CONFIG['arch']").Trim()
259259
$gemVersion = (Get-Content VERSION).Trim()
260-
$gemToInstall = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
260+
$gemToUnpack = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
261261
262-
Write-Host "Looking to install $gemToInstall"
263-
gem install --local --install-dir=./tmp "$gemToInstall"
262+
Write-Host "Looking to unpack $gemToUnpack"
263+
gem unpack --target ./tmp "$gemToUnpack"
264264
265265
# Restore precompiled code
266-
$source = (Resolve-Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
266+
$source = (Resolve-Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
267267
$destination = (Resolve-Path ".\lib\tiny_tds").Path
268268
Get-ChildItem $source -Recurse -Exclude "*.rb" | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}
269269
270270
# Restore ports
271-
Copy-Item -Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
271+
Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
272272
273273
- name: Setup MSSQL
274274
uses: potatoqualitee/[email protected]

0 commit comments

Comments
 (0)