Skip to content

Commit 6b57cf9

Browse files
committed
.github/workflows/test.yml: add a workaround for Windows jobs
Currently, RI2 Ruby 3.2 and ruby-loco mswin builds contain OpenSSL 3.4 DLLs while mingw-w64 and vcpkg provide OpenSSL 3.5 headers. Overwrite the builtin DLLs with 3.5 ones so that we can compile and test using the same OpenSSL version. The root cause has been fixed in RI2 Ruby 3.4.
1 parent e730e45 commit 6b57cf9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ jobs:
3636
ruby-version: ${{ matrix.ruby }}
3737
bundler-cache: true # `bundle install` and cache
3838

39+
# See https://github.com/oneclick/rubyinstaller2/issues/60
40+
# The builtin DLLs are preferred over the mingw-w64/vcpkg DLLs. This is a
41+
# temporary workaround until they update the DLLs to OpenSSL 3.5.x.
42+
- name: Update RI2/mswin builtin DLLs
43+
run: |
44+
$dst = "$((Get-Item (Get-Command ruby).Definition).DirectoryName)\ruby_builtin_dlls"
45+
if ("${{ matrix.ruby }}" -eq "mswin") {
46+
$src = "C:\vcpkg\installed\x64-windows\bin"
47+
} else {
48+
$src = "$((Get-Item (Get-Command ruby).Definition).DirectoryName)\..\msys64\ucrt64\bin"
49+
}
50+
Copy-Item "$src\libcrypto-3-x64.dll", "$src\libssl-3-x64.dll" $dst
51+
if: ${{ matrix.os == 'windows-latest' && (matrix.ruby == '3.2' || matrix.ruby == '3.3' || matrix.ruby == 'mswin') }}
52+
3953
# Enable the verbose option in mkmf.rb to print the compiling commands.
4054
- name: enable mkmf verbose
4155
run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV

0 commit comments

Comments
 (0)