Skip to content

Commit efd9419

Browse files
committed
Run tests in the Fast builds
Running tests in the Fast builds makes them at maximum 5 seconds longer, but it can prevent from starting the huge matrix of basic builds if any of tests fails. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent 7df0dff commit efd9419

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/pr_push.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,40 @@ jobs:
2020
include:
2121
- os: windows-latest
2222
disjoint: 'OFF'
23+
build_tests: 'ON'
2324
# pure C build (Windows)
2425
- os: windows-latest
2526
disjoint: 'OFF'
2627
# Tests' building is off for a pure C build
27-
extra_build_options: '-DUMF_BUILD_TESTS=OFF'
28+
build_tests: 'OFF'
2829
- os: ubuntu-latest
2930
disjoint: 'ON'
31+
build_tests: 'ON'
3032
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
3133
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
3234
# pure C build (Linux)
3335
- os: ubuntu-latest
3436
disjoint: 'OFF'
3537
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
3638
# Tests' building is off for a pure C build
37-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_TESTS=OFF'
39+
build_tests: 'OFF'
40+
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
3841
runs-on: ${{matrix.os}}
3942

4043
steps:
4144
- name: Checkout repository
4245
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4346

4447
- name: Initialize vcpkg
45-
if: ${{ matrix.os == 'windows-latest' }}
48+
if: matrix.os == 'windows-latest'
4649
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
4750
with:
4851
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
4952
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
5053
vcpkgJsonGlob: '**/vcpkg.json'
5154

5255
- name: Install dependencies
53-
if: ${{ matrix.os == 'windows-latest' }}
56+
if: matrix.os == 'windows-latest'
5457
run: vcpkg install
5558
shell: pwsh # Specifies PowerShell as the shell for running the script.
5659

@@ -71,7 +74,7 @@ jobs:
7174
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
7275
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
7376
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
74-
-DUMF_BUILD_TESTS=ON
77+
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
7578
-DUMF_BUILD_EXAMPLES=ON
7679
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
7780
${{matrix.extra_build_options}}
@@ -83,6 +86,11 @@ jobs:
8386
working-directory: ${{github.workspace}}/build
8487
run: ctest --output-on-failure --test-dir examples -C Release
8588

89+
- name: Run tests
90+
if: matrix.build_tests == 'ON'
91+
working-directory: ${{github.workspace}}/build
92+
run: ctest --output-on-failure --test-dir test -C Release
93+
8694
CodeStyle:
8795
name: Coding style
8896
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)