forked from scikit-hep/awkward
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 1013 Bytes
/
header-only-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Header-only Tests
on:
pull_request:
workflow_dispatch:
concurrency:
group: header-only-test-${{ github.head_ref }}
cancel-in-progress: true
jobs:
test:
name: "Run Tests"
strategy:
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run CMake
run: |
cmake -B build -S header-only -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=bin -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
cmake --build build/
- name: Run tests
run: |
import os
import pathlib
import subprocess
for path in pathlib.Path("build/tests/bin").glob("test_*"):
if path.is_file():
print(f"Running {path.name}", flush=True)
print("::group::Test output", flush=True)
subprocess.run([path], check=True)
print("::endgroup::", flush=True)
shell: python3 {0}