Skip to content

Commit f3607f9

Browse files
committed
Use Chocolatey to install bzip2.dll for Windows tests in CI.
1 parent 6562d5f commit f3607f9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
ruby: '3.0'
1717
runs-on: ${{ matrix.os }}-latest
1818
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.os == 'windows' }}
19+
defaults:
20+
run:
21+
shell: bash
1922
steps:
2023
- name: Checkout rubyzip-bzip2 code
2124
uses: actions/checkout@v4
@@ -30,8 +33,10 @@ jobs:
3033
- name: Install bzip2 library
3134
if: matrix.os == 'windows'
3235
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
36+
choco install bzip2
37+
dir C:\ProgramData\chocolatey\lib\bzip2\tools
38+
echo "C:\ProgramData\chocolatey\lib\bzip2\tools" >> "$GITHUB_PATH"
39+
echo "$GITHUB_PATH"
3540
3641
- name: Run the tests
3742
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)