diff options
| -rw-r--r-- | .github/actions/compilers/action.yml | 13 | ||||
| -rwxr-xr-x | .github/actions/compilers/entrypoint.sh | 27 | ||||
| -rw-r--r-- | .github/workflows/compilers.yml | 2 |
3 files changed, 22 insertions, 20 deletions
diff --git a/.github/actions/compilers/action.yml b/.github/actions/compilers/action.yml index 30ccd25a12..daad5b6947 100644 --- a/.github/actions/compilers/action.yml +++ b/.github/actions/compilers/action.yml @@ -60,11 +60,17 @@ inputs: description: >- Whether to run `make check` - mspecopt: + test_all: required: false default: '' description: >- - Additional options for mspec. + Whether to run `make test-all` with options for test-all. + + test_spec: + required: false + default: '' + description: >- + Whether to run `make test-spec` with options for mspec. static_exts: required: false @@ -105,7 +111,8 @@ runs: --env INPUT_CPPFLAGS='${{ inputs.cppflags }}' --env INPUT_APPEND_CONFIGURE='${{ inputs.append_configure }}' --env INPUT_CHECK='${{ inputs.check }}' - --env INPUT_MSPECOPT='${{ inputs.mspecopt }}' + --env INPUT_TEST_ALL='${{ inputs.test_all }}' + --env INPUT_TEST_SPEC='${{ inputs.test_spec }}' --env INPUT_ENABLE_SHARED='${{ inputs.enable_shared }}' --env INPUT_STATIC_EXTS='${{ inputs.static_exts }}' --env LAUNCHABLE_ORGANIZATION='${{ github.repository_owner }}' diff --git a/.github/actions/compilers/entrypoint.sh b/.github/actions/compilers/entrypoint.sh index 4f9d1304ee..9a90376d70 100755 --- a/.github/actions/compilers/entrypoint.sh +++ b/.github/actions/compilers/entrypoint.sh @@ -70,25 +70,20 @@ if [[ -n "${INPUT_STATIC_EXTS}" ]]; then echo "::endgroup::" fi -btests='' -tests='' -spec_opts='' +if [ -n "$INPUT_TEST_ALL" ]; then + tests=" -- $INPUT_TEST_ALL" +else + tests=" -- ruby -ext-" +fi pushd ${builddir} grouped make showflags grouped make all -grouped make test BTESTS="${btests}" - -[[ -z "${INPUT_CHECK}" ]] && exit 0 - -if [ "$INPUT_CHECK" = "true" ]; then - tests+=" -- ruby -ext-" -else - tests+=" -- $INPUT_CHECK" -fi - # grouped make install -grouped make test-tool -grouped make test-all TESTS="$tests" -grouped env CHECK_LEAKS=true make test-spec MSPECOPT="$INPUT_MSPECOPT" SPECOPTS="${spec_opts}" + +# Run only `make test` by default. Run other tests if specified. +grouped make test +if [[ -n "$INPUT_CHECK" ]]; then grouped make test-tool; fi +if [[ -n "$INPUT_CHECK" || -n "$INPUT_TEST_ALL" ]]; then grouped make test-all TESTS="$tests"; fi +if [[ -n "$INPUT_CHECK" || -n "$INPUT_TEST_SPEC" ]]; then grouped env CHECK_LEAKS=true make test-spec MSPECOPT="$INPUT_TEST_SPEC"; fi diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index c53be6f410..72e908a03c 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -176,7 +176,7 @@ jobs: - { uses: './.github/actions/compilers', name: 'C++20', with: { CXXFLAGS: '-std=c++20 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } } - { uses: './.github/actions/compilers', name: 'C++23', with: { CXXFLAGS: '-std=c++23 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } } - { uses: './.github/actions/compilers', name: 'C++26', with: { CXXFLAGS: '-std=c++26 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } } - - { uses: './.github/actions/compilers', name: 'gmp', with: { append_configure: '--with-gmp', check: 'ruby/test_bignum.rb', mspecopt: "/github/workspace/src/spec/ruby/core/integer" } } + - { uses: './.github/actions/compilers', name: 'gmp', with: { append_configure: '--with-gmp', test_all: 'ruby/test_bignum.rb', test_spec: "/github/workspace/src/spec/ruby/core/integer" } } - { uses: './.github/actions/compilers', name: 'jemalloc', with: { append_configure: '--with-jemalloc' } } - { uses: './.github/actions/compilers', name: 'valgrind', with: { append_configure: '--with-valgrind' } } - { uses: './.github/actions/compilers', name: 'coroutine=ucontext', with: { append_configure: '--with-coroutine=ucontext' } } |
