Skip to content

Commit b4c2bf0

Browse files
committed
ci: Support slicing with the system Meson
ci-os-only: linux
1 parent ede558a commit b4c2bf0

1 file changed

Lines changed: 32 additions & 4 deletions

File tree

‎.github/workflows/pg-ci.yml‎

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,13 +673,41 @@ jobs:
673673
- *ccache_save_step
674674

675675
- name: Test world
676-
env:
677-
MTEST_TARGET: --slice ${{ matrix.slice}}/${{ matrix.num_slices}} ${{env.MTEST_TARGET}}
678676
shell: *su_postgres_shell
679-
run: *meson_test_world_cmd
677+
run: |
678+
ulimit -c unlimited
679+
680+
echo ::group::test_setup
681+
meson test ${{env.MTEST_ARGS}} --suite setup --logbase setup || exit 1
682+
echo ::endgroup::
683+
684+
# The system Meson is older than 1.8, which introduced --slice.
685+
# Emulate its round-robin slicing using the test list instead.
686+
readarray -t test_names < <(
687+
meson test ${{env.MTEST_ARGS}} --list --no-suite setup |
688+
awk -F ' - ' \
689+
-v slice=${{ matrix.slice}} \
690+
-v slices=${{ matrix.num_slices}} \
691+
'(NR - 1) % slices == slice - 1 { print $NF }'
692+
)
693+
meson test ${{env.MTEST_ARGS}} \
694+
--num-processes ${{env.TEST_JOBS}} \
695+
--no-suite setup "${test_names[@]}"
680696
681697
- *linux_collect_cores_step
682-
- *upload_logs_step
698+
- name: Upload logs
699+
if: failure() && !cancelled()
700+
uses: actions/upload-artifact@v7
701+
with:
702+
name: logs-${{ github.job }}-${{ matrix.slice }}-${{ github.run_id }}-${{ github.run_attempt }}
703+
path: |
704+
**/*.log
705+
**/*.diffs
706+
**/regress_log_*
707+
**/crashlog-*.txt
708+
build/meson-logs/**
709+
**/config.log
710+
if-no-files-found: ignore
683711

684712

685713
# Job: macOS - Meson

0 commit comments

Comments
 (0)