CI: Add the bundle exec
#12
Workflow file for this run
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: CI | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| host: | |
| name: >- | |
| ${{ matrix.os }} ${{ matrix.ruby }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-13 | |
| - macos-14 | |
| - macos-15 | |
| - ubuntu-latest | |
| - windows-latest | |
| ruby: | |
| - '2.5' | |
| - '2.6' | |
| - '2.7' | |
| - '3.0' | |
| - '3.1' | |
| - '3.2' | |
| - '3.3' | |
| - '3.4' | |
| - debug | |
| - jruby | |
| - truffleruby | |
| include: | |
| - { os: windows-latest , ruby: ucrt } | |
| - { os: windows-latest , ruby: mswin } | |
| exclude: | |
| - { os: macos-14 , ruby: '2.5' } | |
| - { os: macos-15 , ruby: '2.5' } | |
| - { os: windows-latest , ruby: debug } | |
| - { os: windows-latest , ruby: truffleruby } | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - run: bundle install | |
| - run: bundle exec rake compile | |
| # If Fiddle in Ruby's master has the same version of this Fiddle, | |
| # "gem install pkg/*.gem" fails. | |
| - run: bundle exec rake version:bump | |
| if: >- | |
| matrix.ruby == 'debug' || | |
| matrix.ruby == 'mingw' || | |
| matrix.ruby == 'mswin' | |
| # This is for ensuring using Fiddle in this repository. | |
| - run: bundle exec ruby -Ilib test/run.rb | |
| - run: bundle exec rake install | |
| - name: Run test against installed gem | |
| # We can't use Fiddle gem with older RubyInstaller because | |
| # RubyInstaller requires Fiddle before rubygems is loaded: | |
| # https://github.com/oneclick/rubyinstaller2/blob/master/lib/ruby_installer/build/dll_directory.rb#L1 | |
| if: >- | |
| matrix.os != 'windows-latest' || | |
| (matrix.os == 'windows-latest' && matrix.ruby >= '3.0') | |
| run: | | |
| bundle exec ruby -run -e mkdir -- -p tmp/ | |
| bundle exec ruby -run -e cp -- -pr test/ tmp/ | |
| cd tmp | |
| ruby test/run.rb | |
| host-ibm: | |
| if: github.repository == 'ruby/fiddle' | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-24.04-ppc64le | |
| - ubuntu-24.04-s390x | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Ruby | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install ruby-full bundler libffi-dev | |
| - run: sudo bundle install --jobs $(nproc) | |
| - run: bundle exec rake compile | |
| - run: bundle exec ruby -Ilib test/run.rb | |
| - run: sudo bundle exec rake install | |
| - name: Run test against installed gem | |
| run: | | |
| bundle exec ruby -run -e mkdir -- -p tmp/ | |
| bundle exec ruby -run -e cp -- -pr test/ tmp/ | |
| cd tmp | |
| ruby test/run.rb | |
| docker: | |
| name: >- | |
| ${{ matrix.service }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| service: | |
| - fedora-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: docker compose build ${{ matrix.service }} | |
| - run: docker compose run --rm ${{ matrix.service }} |