From 2c6fdc4d65af035769e969dbe5d5718e859973d3 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 22 Sep 2022 00:22:21 +0900 Subject: Improve Ubuntu GitHub Actions (#6413) Make the job names more understandable and avoid testing too many duplicated things. --- .github/workflows/ubuntu.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to '.github/workflows/ubuntu.yml') diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 6ea8c06b93..5d7acd7143 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -21,32 +21,35 @@ jobs: make: strategy: matrix: - test_task: ["check", "test-syntax-suggest", "test-bundler-parallel", "test-bundled-gems"] - os: - - ubuntu-20.04 - configure: ["", "cppflags=-DRUBY_DEBUG"] + # main variables included in the job name + test_task: [check] + configure: [cppflags=-DRUBY_DEBUG] # default to use more assertions + arch: [''] + # specify all jobs with `include` to avoid testing duplicated things include: - - test_task: "check" - configure: "" + - test_task: check + - test_task: check arch: i686 - - test_task: "check" + configure: '' # test without -DRUBY_DEBUG as well + - test_task: check configure: "--enable-shared --enable-load-relative" skipped_tests: "TestGem#test_.*_from_binstubs.*" continue-on-skipped_tests: true - - test_task: "test-all TESTS=--repeat-count=2" + - test_task: test-all TESTS=--repeat-count=2 + - test_task: test-syntax-suggest + - test_task: test-bundler-parallel + - test_task: test-bundled-gems fail-fast: false env: GITPULLOPTIONS: --no-tags origin ${{github.ref}} RUBY_DEBUG: ci SETARCH: ${{ matrix.arch && format('setarch {0}', matrix.arch) }} - runs-on: ${{ matrix.os || 'ubuntu-20.04' }} + runs-on: ubuntu-20.04 if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }} steps: - run: mkdir build working-directory: - name: Set ENV - env: - configure: ${{matrix.configure}} run: | echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV - name: Install libraries @@ -120,7 +123,7 @@ jobs: payload: | { "ci": "GitHub Actions", - "env": "${{ matrix.os }} / ${{ matrix.test_task }}${{ matrix.configure }}", + "env": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "commit": "${{ github.sha }}", "branch": "${{ github.ref }}".split('/').reverse()[0] -- cgit v1.2.3