From ab89a164855b0a21e25b145fda88d6b81a6524f3 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 12 Oct 2021 17:07:39 +0200 Subject: [PATCH] CI: Combine into a shared matrix --- .github/workflows/jruby.yml | 25 ------------------------- .github/workflows/test.yml | 14 +++++++++----- .github/workflows/truffleruby.yml | 25 ------------------------- 3 files changed, 9 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/jruby.yml delete mode 100644 .github/workflows/truffleruby.yml diff --git a/.github/workflows/jruby.yml b/.github/workflows/jruby.yml deleted file mode 100644 index 62db1af..0000000 --- a/.github/workflows/jruby.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: jruby - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - ruby: [ 'jruby-head', 'jruby-9.2' ] - steps: - - name: git config - run: | - git config --global core.autocrlf false - git config --global core.eol lf - git config --global advice.detachedHead 0 - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - name: Install dependencies - run: bundle install - - name: Run test - run: rake diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 49ed516..4eb6ab4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,11 @@ jobs: matrix: ruby: [ 'head', '3.0', '2.7', '2.6' ] os: [ ubuntu-latest, macos-latest, windows-latest ] + include: + - { os: ubuntu-latest, ruby: jruby-head } + - { os: ubuntu-latest, ruby: jruby-9.2 } + - { os: ubuntu-latest, ruby: truffleruby } + - { os: ubuntu-latest, ruby: truffleruby-head } runs-on: ${{ matrix.os }} steps: - name: git config @@ -21,17 +26,16 @@ jobs: git config --global core.eol lf git config --global advice.detachedHead 0 - uses: actions/checkout@v2 - - name: Set up Ruby + - name: Set up Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - name: Install dependencies - run: bundle install + bundler-cache: true # 'bundle install' and cache - name: Run test - run: rake + run: bundle exec rake - id: build run: | - rake build + bundle exec rake build echo "::set-output name=pkg::${GITHUB_REPOSITORY#*/}-${RUNNING_OS%-*}" env: RUNNING_OS: ${{matrix.os}} diff --git a/.github/workflows/truffleruby.yml b/.github/workflows/truffleruby.yml deleted file mode 100644 index ed0b097..0000000 --- a/.github/workflows/truffleruby.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: truffleruby - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - ruby: [ 'truffleruby', 'truffleruby-head' ] - steps: - - name: git config - run: | - git config --global core.autocrlf false - git config --global core.eol lf - git config --global advice.detachedHead 0 - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - name: Install dependencies - run: bundle install - - name: Run test - run: rake