-
Notifications
You must be signed in to change notification settings - Fork 8
CI: Migrate to GitHub Actions #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
| ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0'] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you use https://github.com/ruby/actions/blob/master/.github/workflows/ruby_versions.yml like https://github.com/ruby/strscan/blob/3592c390540a57ed9d2491596207d4059208a439/.github/workflows/ci.yml#L11-L27 ? We can use |
||
|
|
||
| name: Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby-version }} | ||
| bundler-cache: true | ||
|
|
||
| - name: Replace libcurl.dll | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| # The `libcurl.dll` bundled with Ruby on Windows (MSYS2) has missing dependencies and cannot be loaded by `ethon` out of the box. (Ref: https://github.com/typhoeus/typhoeus/issues/720) | ||
| choco install curl --no-progress | ||
|
|
||
| $curlTools = "C:\ProgramData\chocolatey\lib\curl\tools" | ||
| $srcDll = Get-ChildItem -Path $curlTools -Filter "libcurl*.dll" -Recurse | Select-Object -First 1 | ||
|
|
||
| $rubyBin = Split-Path (Get-Command ruby.exe).Source | ||
| $destDll = Join-Path $rubyBin "libcurl.dll" | ||
| Copy-Item -Path $srcDll.FullName -Destination $destDll -Force | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that this is a wrong fix. MSYS2 ships https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-curl
I confirmed that diff --git a/lib/ethon/curls/settings.rb b/lib/ethon/curls/settings.rb
index 8c0161b..e878c1a 100644
--- a/lib/ethon/curls/settings.rb
+++ b/lib/ethon/curls/settings.rb
@@ -7,6 +7,9 @@ module Ethon
callback :debug_callback, [:pointer, :debug_info_type, :pointer, :size_t, :pointer], :int
callback :progress_callback, [:pointer, :long_long, :long_long, :long_long, :long_long], :int
ffi_lib_flags :now, :global
- ffi_lib ['libcurl', 'libcurl.so.4']
+ # 'libcurl-4' is for MSYS2. MSYS2 uses libcurl-4.dll not libcurl.dll.
+ # See also "Files:" in
+ # https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-curl .
+ ffi_lib ['libcurl', 'libcurl.so.4', 'libcurl-4']
end
end
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An issue has already been filed for a similar case.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about removing this workaround and jobs on Windows until the issue is resolved?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sent a PR at typhoeus/ethon#271 |
||
|
|
||
| - name: Run tests | ||
| run: bundle exec rake | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.