name: CI on: [push, pull_request] permissions: contents: read jobs: system-libffi: # Run on latest MRI with explicit selection of system or builtin libffi strategy: fail-fast: false matrix: os: [ ubuntu, macos, windows ] extconfopts: [ --disable-system-libffi, --enable-system-libffi ] extconfopts2: [ --disable-libffi-alloc, --enable-libffi-alloc ] runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 - if: matrix.os == 'macos' run: brew install automake libffi pkg-config - if: matrix.os == 'windows' && matrix.extconfopts == '--enable-system-libffi' shell: cmd run: ridk exec sh -c "pacman --sync --refresh --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-libffi" - run: bundle install - run: bundle exec rake libffi - run: bundle exec rake compile -- ${{ matrix.extconfopts }} ${{ matrix.extconfopts2 }} env: # work around misconfiguration of libffi on MacOS with homebrew PKG_CONFIG_PATH: ${{ env.PKG_CONFIG_PATH }}:/usr/local/opt/libffi/lib/pkgconfig - run: bundle exec rake test - run: bundle exec rake types_conf && git --no-pager diff specs: # Run all specs on all ruby implementations # Use automatic libffi selection on MRI strategy: fail-fast: false matrix: os: [ ubuntu, macos, windows ] ruby: [ 2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, ruby-head, truffleruby-head, jruby-head ] exclude: - os: windows ruby: truffleruby-head - os: windows ruby: 2.3 # compilation fails runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - run: brew install automake if: matrix.os == 'macos' - run: bundle install - run: bundle exec rake libffi - run: bundle exec rake compile - run: bundle exec rake test - run: bundle exec rake bench:all if: ${{ matrix.ruby != 'truffleruby-head' && matrix.ruby != 'jruby-head' }} env: ITER: 10