Skip to content

Commit a48fd9a

Browse files
using CTest in GitHub CI, with matrix structure to avoid duplication
1 parent 3f2d9f0 commit a48fd9a

File tree

2 files changed

+12
-55
lines changed

2 files changed

+12
-55
lines changed

.github/workflows/dbg_smoke.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/smoke.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
11

2-
name: release-smoke-tests
2+
name: smoke-tests
33

44
on: [push]
55

66
env:
77
BUILD_TYPE: Release
88

99
jobs:
10-
build:
10+
build-and-test:
1111
runs-on: ubuntu-latest
1212

13+
strategy:
14+
matrix:
15+
category: ['smoke']
16+
build-type: ['','--debug-build']
17+
1318
steps:
1419
- uses: actions/checkout@v3
1520

1621
- name: Install required packages
1722
run: sudo apt-get install -y libnuma-dev
1823

1924
- name: Configure
20-
run: mkdir build && cd build && ../bootstrap.sh --prefix=../install
25+
run: mkdir build && cd build && ../bootstrap.sh --prefix=../install ${{ matrix.build-type }}
2126

2227
- name: Build
2328
working-directory: ${{github.workspace}}/build
24-
run: make -j4
29+
run: make -j$(nproc) && make -j$(nproc) build_tests_category_${{ matrix.category }}
2530

2631
- name: Install
2732
working-directory: ${{github.workspace}}/build
28-
run: make -j4 install
33+
run: make -j$(nproc) install
2934

3035
- name: Test
3136
working-directory: ${{github.workspace}}/build
32-
run: make -j4 smoketests &> smoketests.log
37+
run: ctest -L "mode:${{ matrix.category }}" --output-junit ${{ matrix.category }}.xml --output-on-failure || true
3338

3439
- name: Check
3540
working-directory: ${{github.workspace}}/build
36-
run: ../tests/summarise.sh smoketests.log
37-
38-
- name: DumpLogOnFailure
39-
if: failure()
40-
working-directory: ${{github.workspace}}/build
41-
run: cat smoketests.log
42-
41+
run: python3 ../tools/ctest-junit-parse.py --categories ${{ matrix.category }} --xmls-dir $(pwd) --remove-successful-logs-from $(pwd)/tests

0 commit comments

Comments
 (0)