Skip to content

Commit 9595963

Browse files
committed
Update installation of bzip2 in windows tests.
1 parent 6562d5f commit 9595963

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,15 @@ jobs:
3030
- name: Install bzip2 library
3131
if: matrix.os == 'windows'
3232
run: |
33-
wget https://github.com/philr/bzip2-windows/releases/download/v1.0.8.0/bzip2-dll-1.0.8.0-win-x64.zip
34-
Expand-Archive -Path bzip2-dll-1.0.8.0-win-x64.zip -DestinationPath C:\hostedtoolcache\windows\Ruby\${{ matrix.ruby }}\x64\bin
33+
Invoke-WebRequest `
34+
-Uri https://github.com/philr/bzip2-windows/releases/download/v1.0.8.0/bzip2-dll-1.0.8.0-win-x64.zip `
35+
-OutFile bzip2.zip `
36+
-MaximumRetryCount 10 `
37+
-RetryIntervalSec 2
38+
$RubyBinPath = Split-Path (Get-Command ${{ startsWith(matrix.ruby, 'jruby') && 'j' || '' }}ruby.exe).Path
39+
Write-Host $RubyBinPath
40+
Expand-Archive -Path bzip2.zip -DestinationPath $RubyBinPath -Force
41+
Get-Command bzip2.exe | Format-List
3542
3643
- name: Run the tests
3744
env:

lib/zip/bzip2/ffi/libbz2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module FFI
3737
module Libbz2 # :nodoc:
3838
extend ::FFI::Library
3939

40-
ffi_lib ['bz2', 'libbz2.so.1', 'libbz2.dll']
40+
ffi_lib ['bz2', 'libbz2.so.1', 'libbz2.dll', 'bzip2.dll']
4141

4242
BZ_RUN = 0
4343
BZ_FLUSH = 1

0 commit comments

Comments
 (0)