Verify http connection abort on thread kill #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v**'] | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: ['*'] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ruby-gem: | |
| name: Build Ruby gem | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| bundler-cache: true | |
| - name: Build gem | |
| run: gem build wreq-rb.gemspec | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: ruby-gem | |
| path: "*.gem" | |
| if-no-files-found: error | |
| cross-gem: | |
| name: Cross-compile / ${{ matrix.platform }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - aarch64-linux | |
| - x86_64-linux | |
| - arm64-darwin | |
| - x86_64-darwin | |
| # - x64-mingw-ucrt | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| bundler-cache: true | |
| - uses: oxidize-rb/actions/cross-gem@v1 | |
| id: cross-gem | |
| with: | |
| platform: ${{ matrix.platform }} | |
| ruby-versions: "2.7,3.3,3.4" | |
| cache-version: v2 | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: cross-gem-${{ matrix.platform }} | |
| path: ${{ steps.cross-gem.outputs.gem-path }} | |
| if-no-files-found: error | |
| test-source-gem: | |
| name: Test source gem | |
| needs: [ruby-gem] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install build dependencies | |
| run: sudo apt-get install -y cmake perl golang-go | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| name: ruby-gem | |
| path: gems | |
| - name: Install source gem | |
| run: gem install gems/*.gem --verbose | |
| - name: Run tests | |
| run: ruby -Itest -e 'Dir.glob("test/**/*_test.rb").each { |f| require File.expand_path(f) }' | |
| test-cross-gem: | |
| name: Test cross gem / Ruby ${{ matrix.ruby }} | |
| needs: [cross-gem] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ["2.7", "3.4"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| name: cross-gem-x86_64-linux | |
| path: gems | |
| - name: Install gem | |
| run: gem install gems/*.gem | |
| - name: Run tests | |
| run: ruby -Itest -e 'Dir.glob("test/**/*_test.rb").each { |f| require File.expand_path(f) }' | |
| publish: | |
| name: Publish gems | |
| needs: [ruby-gem, cross-gem, test-source-gem, test-cross-gem] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| path: gems | |
| pattern: "*-gem*" | |
| merge-multiple: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| - name: Publish to RubyGems | |
| env: | |
| GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
| run: | | |
| for gem in gems/*.gem; do | |
| gem push "$gem" | |
| done |