1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Improve Ubuntu GitHub Actions (#6413)

Make the job names more understandable and avoid testing too many
duplicated things.
This commit is contained in:
Takashi Kokubun 2022-09-22 00:22:21 +09:00 committed by GitHub
parent c21f820b49
commit 2c6fdc4d65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-09-22 00:22:45 +09:00
Merged-By: k0kubun <takashikkbn@gmail.com>

View file

@ -21,32 +21,35 @@ jobs:
make: make:
strategy: strategy:
matrix: matrix:
test_task: ["check", "test-syntax-suggest", "test-bundler-parallel", "test-bundled-gems"] # main variables included in the job name
os: test_task: [check]
- ubuntu-20.04 configure: [cppflags=-DRUBY_DEBUG] # default to use more assertions
configure: ["", "cppflags=-DRUBY_DEBUG"] arch: ['']
# specify all jobs with `include` to avoid testing duplicated things
include: include:
- test_task: "check" - test_task: check
configure: "" - test_task: check
arch: i686 arch: i686
- test_task: "check" configure: '' # test without -DRUBY_DEBUG as well
- test_task: check
configure: "--enable-shared --enable-load-relative" configure: "--enable-shared --enable-load-relative"
skipped_tests: "TestGem#test_.*_from_binstubs.*" skipped_tests: "TestGem#test_.*_from_binstubs.*"
continue-on-skipped_tests: true 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 fail-fast: false
env: env:
GITPULLOPTIONS: --no-tags origin ${{github.ref}} GITPULLOPTIONS: --no-tags origin ${{github.ref}}
RUBY_DEBUG: ci RUBY_DEBUG: ci
SETARCH: ${{ matrix.arch && format('setarch {0}', matrix.arch) }} 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') }} if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
steps: steps:
- run: mkdir build - run: mkdir build
working-directory: working-directory:
- name: Set ENV - name: Set ENV
env:
configure: ${{matrix.configure}}
run: | run: |
echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
- name: Install libraries - name: Install libraries
@ -120,7 +123,7 @@ jobs:
payload: | payload: |
{ {
"ci": "GitHub Actions", "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 }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"commit": "${{ github.sha }}", "commit": "${{ github.sha }}",
"branch": "${{ github.ref }}".split('/').reverse()[0] "branch": "${{ github.ref }}".split('/').reverse()[0]