Skip to content

Commit e979b0b

Browse files
committed
Use gem unpack to get precompiled extensions on Windows
1 parent cb97ae4 commit e979b0b

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
@@ -124,18 +124,18 @@ jobs:
124124
run: |
125125
$rubyArchitecture = (ruby -e "puts RbConfig::CONFIG['arch']").Trim()
126126
$gemVersion = (Get-Content VERSION).Trim()
127-
$gemToInstall = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
127+
$gemToUnpack = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
128128
129-
Write-Host "Looking to install $gemToInstall"
130-
gem install --local --install-dir=./tmp "$gemToInstall"
129+
Write-Host "Looking to unpack $gemToUnpack"
130+
gem unpack --target ./tmp "$gemToUnpack"
131131
132132
# Restore precompiled code
133-
$source = (Resolve-Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
133+
$source = (Resolve-Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
134134
$destination = (Resolve-Path ".\lib\tiny_tds").Path
135135
Get-ChildItem $source -Recurse -Exclude "*.rb" | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}
136136
137137
# Restore ports
138-
Copy-Item -Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
138+
Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
139139
140140
- name: Setup MSSQL
141141
uses: potatoqualitee/mssqlsuite@v1.7
@@ -245,18 +245,18 @@ jobs:
245245
run: |
246246
$rubyArchitecture = (ruby -e "puts RbConfig::CONFIG['arch']").Trim()
247247
$gemVersion = (Get-Content VERSION).Trim()
248-
$gemToInstall = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
248+
$gemToUnpack = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
249249
250-
Write-Host "Looking to install $gemToInstall"
251-
gem install --local --install-dir=./tmp "$gemToInstall"
250+
Write-Host "Looking to unpack $gemToUnpack"
251+
gem unpack --target ./tmp "$gemToUnpack"
252252
253253
# Restore precompiled code
254-
$source = (Resolve-Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
254+
$source = (Resolve-Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
255255
$destination = (Resolve-Path ".\lib\tiny_tds").Path
256256
Get-ChildItem $source -Recurse -Exclude "*.rb" | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}
257257
258258
# Restore ports
259-
Copy-Item -Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
259+
Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
260260
261261
- name: Setup MSSQL
262262
uses: potatoqualitee/mssqlsuite@v1.7

0 commit comments

Comments
 (0)