forked from NLR-SolTrace/SolTrace
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (64 loc) · 2.51 KB
/
Copy pathcoverage.yml
File metadata and controls
77 lines (64 loc) · 2.51 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: coverage
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
env:
BUILD_TYPE: Debug
jobs:
coverage:
runs-on: gpu-runner
timeout-minutes: 60
container:
image: ghcr.io/nlr-soltrace/soltrace-build-env:latest
options: --gpus all
env:
NVIDIA_DRIVER_CAPABILITIES: all
CUDA_CACHE_PATH: /tmp
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y lcov libfontconfig1-dev libembree-dev curl
- name: Set reusable strings
id: strings
run: echo "build-output-dir=$GITHUB_WORKSPACE/build" >> "$GITHUB_OUTPUT"
- name: Clean previous coverage artifacts
run: |
rm -rf ${{ steps.strings.outputs.build-output-dir }}
find . -name "*.gcda" -delete || true
find . -name "*.gcno" -delete || true
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DSOLTRACE_BUILD_CORETRACE=OFF
-DSOLTRACE_BUILD_GUI=OFF
-DENABLE_COVERAGE=ON
-DSOLTRACE_BUILD_EMBREE_SUPPORT=ON
-DSOLTRACE_BUILD_OPTIX_SUPPORT=ON
-DSAMPLES_PTX_DIR="$GITHUB_WORKSPACE/build/lib/ptx"
-S $GITHUB_WORKSPACE
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ env.BUILD_TYPE }}
- name: Run Tests (single-threaded to avoid GCDA conflicts)
working-directory: ${{ steps.strings.outputs.build-output-dir }}/google-tests
run: ctest --output-on-failure --build-config ${{ env.BUILD_TYPE }} --no-parallel -VV
- name: Generate Coverage
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
# Capture coverage info; ignore mismatches to prevent geninfo line errors
lcov --capture --directory . --output-file coverage.info --ignore-errors unused,negative --rc geninfo_unexecuted_blocks=1
# Remove unwanted directories (3rd-party, deps)
lcov --remove coverage.info '*/_deps/*' '*/nlohmann_json-src/*' '/usr/*' --output-file coverage.info --ignore-errors unused
- name: Upload to Coveralls
uses: coverallsapp/github-action@v2
with:
path-to-lcov: ${{ steps.strings.outputs.build-output-dir }}/coverage.info
github-token: ${{ secrets.GITHUB_TOKEN }}
coverage-reporter-version: v0.6.15