forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 1
153 lines (140 loc) · 4.68 KB
/
analysis.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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Analysis
on:
push:
# branches:
# - main
pull_request:
branches:
- main
- 'release/**'
- 'develop/**'
paths-ignore:
- "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CTEST_OUTPUT_ON_FAILURE: 1
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 5G
CCACHE_KEY_SUFFIX: r1
ACTS_LOG_FAILURE_THRESHOLD: WARNING
# NOTE this only builds core unittests to reduce the output size. if we
# found a way to have Github actions not fail regularly with this job
# all unit tests should be reactivated.
jobs:
build_debug:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2204:v41
steps:
# - name: Install dependencies
# run: |
# apt-get update
# apt-get install -y git-lfs
- uses: actions/checkout@v4
- name: Cache build
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-linux_ubuntu_debug_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-linux_ubuntu_debug_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
run: >
ccache -z &&
cmake -B build -S .
-GNinja
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS="-Werror -gz -g1"
-DACTS_BUILD_UNITTESTS=on
-DACTS_BUILD_EXAMPLES_UNITTESTS=off
-DACTS_BUILD_EVERYTHING=ON
-DACTS_BUILD_ODD=OFF
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ONNX=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
-DACTS_ENABLE_LOG_FAILURE_THRESHOLD=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Build
run: cmake --build build -- ActsUnitTestEigenStepper
- name: ccache stats
run: ccache -s
- name: Unit tests
# run: ctest --test-dir build -j$(nproc)
run: build/bin/ActsUnitTestEigenStepper
- name: Remove .o files
run: >
du -sh build
&& find build -name *.o -delete
&& du -sh build
- name: Coverage
run: >
pip3 install gcovr==7.2
&& cd build
&& /usr/bin/python3 ../CI/test_coverage.py
- uses: actions/upload-artifact@v4
with:
name: coverage-build
path: build
- name: Save PR number to file
if: github.event_name == 'pull_request'
run: echo ${{ github.event.number }} > PR_NUMBER.txt
- name: Persist PR number
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: PR_NUMBER
path: PR_NUMBER.txt
#
# build_performance:
# runs-on: ubuntu-latest
# container: ghcr.io/acts-project/ubuntu2204:v41
# if: github.ref == 'refs/heads/main'
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# run: pip3 install git+https://github.com/paulgessinger/cmakeperf.git@ece8fc8
# - name: Configure
# run: >
# cmake -B build -S .
# -GNinja
# -DCMAKE_BUILD_TYPE=RelWithDebInfo
# -DCMAKE_CXX_FLAGS="-Werror"
# -DACTS_BUILD_EVERYTHING=ON
# -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# - name: Measure
# run: cmakeperf collect build/compile_commands.json -o perf.csv
# - name: Results
# run: cmakeperf print perf.csv
# - uses: actions/upload-artifact@v4
# with:
# name: cmakeperf
# path: perf.csv
# metric_tracking:
# runs-on: ubuntu-latest
# needs: build_performance
# if: github.ref == 'refs/heads/main'
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# run: pip3 install git+https://github.com/paulgessinger/headwind.git@eeeaa80
# - uses: actions/download-artifact@v4
# with:
# name: cmakeperf
# - name: Run collection
# env:
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# run: |
# ssh-agent -a $SSH_AUTH_SOCK > /dev/null
# ssh-add - <<< "${{ secrets.METRIC_DEPLOY_SSH_KEY }}"
# git config --global user.email "[email protected]"
# git config --global user.name "GitHub Action"
# git clone [email protected]:acts-project/metrics.git
# hdw collect CI/headwind.yml --commit $(git log --pretty=format:'%H' -1)
# cd metrics
# git add -A
# git commit -m"update metrics"
# git push