Repository navigation
200 lines (192 loc) · 7.38 KB
/
Copy pathlinux-eic-shell.yml
File metadata and controls
200 lines (192 loc) · 7.38 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: Build against eic-shell
on:
schedule: # run regularly on main branch
- cron: '13 0 * * *'
push:
branches:
- main
tags:
- '*'
pull_request:
merge_group:
workflow_dispatch:
inputs:
organization:
description: 'eic-shell organization'
default: 'eicweb'
required: false
type: string
platform:
description: 'eic-shell platform'
default: 'eic_xl'
required: false
type: string
release:
description: 'eic-shell release'
default: 'nightly'
required: false
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
organization: ${{ inputs.organization || vars.organization || 'eicweb' }}
platform: ${{ inputs.platform || 'eic_xl' }}
release: ${{ inputs.release || 'nightly' }}
CMAKE_CXX_STANDARD: 20
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
CXX: [g++, clang++]
CMAKE_BUILD_TYPE: [Release, Debug]
exclude:
# exclude g++ Debug as clang++ Debug is sufficient
- CXX: g++
CMAKE_BUILD_TYPE: Debug
include:
- CXX: g++
CXXFLAGS: -Werror -Wall -Wextra -Wno-error=maybe-uninitialized
- CXX: clang++
CXXFLAGS: -Werror -Wall -Wextra
fail-fast: false
steps:
- uses: actions/checkout@v7
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: |
echo "timestamp=$(date --iso-8601=minutes)" >> $GITHUB_OUTPUT
- name: Retrieve ccache cache files
uses: actions/cache@v6
with:
path: .ccache
key: ccache-${{ matrix.CXX }}-${{ env.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.head_ref || github.ref_name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
ccache-${{ matrix.CXX }}-${{ env.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.head_ref || github.ref_name }}-
ccache-${{ matrix.CXX }}-${{ env.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.ref_name }}-
ccache-${{ matrix.CXX }}-${{ env.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.base_ref }}-
ccache-${{ matrix.CXX }}-${{ env.release }}-${{ matrix.CMAKE_BUILD_TYPE }}-
ccache-${{ matrix.CXX }}-${{ env.release }}-
ccache-${{ matrix.CXX }}-
ccache-
- name: Configure ccache
run: |
mkdir -p ~/.ccache/
echo "cache_dir=${{ github.workspace }}/.ccache" > ~/.ccache/ccache.conf
echo "max_size=500MB" >> ~/.ccache/ccache.conf
echo "compression=true" >> ~/.ccache/ccache.conf
- uses: cvmfs-contrib/github-action-cvmfs@72f2a8d366043978d6aebee154bc9ed321c2f2a8 # v5.6
- name: Build, install and test
uses: eic/run-cvmfs-osg-eic-shell@e3977323ebfa7e0725f6b910fd2877db05c3bbb6 # main
with:
organization: "${{ env.organization }}"
platform-release: "${{ env.platform }}:${{ env.release }}"
run: |
CXX="${{ matrix.CXX }}" CXXFLAGS="${{ matrix.CXXFLAGS }}" cmake -B build -S . \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
-DCMAKE_CXX_STANDARD=${{ env.CMAKE_CXX_STANDARD }}
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target install
ccache --show-stats --verbose
ccache --evict-older-than 7d
ctest --test-dir build --output-on-failure
build-docs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: cvmfs-contrib/github-action-cvmfs@72f2a8d366043978d6aebee154bc9ed321c2f2a8 # v5.6
- name: Generate documentation
uses: eic/run-cvmfs-osg-eic-shell@e3977323ebfa7e0725f6b910fd2877db05c3bbb6 # main
with:
organization: "${{ env.organization }}"
platform-release: "${{ env.platform }}:${{ env.release }}"
run: |
cmake -B build -S . -DBUILD_TESTING=OFF -DGENERATE_DOCS=ON
cmake --build build --target docs
- uses: actions/upload-artifact@v7
with:
name: docs
path: build/docs/html/
if-no-files-found: error
- uses: actions/upload-pages-artifact@v5
if: github.ref == 'refs/heads/main'
with:
path: build/docs/html/
retention-days: 7
deploy-docs:
needs: build-docs
if: github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
sanitizers:
name: sanitizers (${{ matrix.SANITIZER }})
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- SANITIZER: asan-ubsan
CMAKE_OPTIONS: -DUSE_ASAN=ON -DUSE_UBSAN=ON
- SANITIZER: tsan
CMAKE_OPTIONS: -DUSE_TSAN=ON
fail-fast: false
env:
CXX: clang++
CXXFLAGS: -Werror -Wall -Wextra
ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:detect_odr_violation=1:verify_asan_link_order=0
LSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/lsan.supp
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:report_error_type=1
TSAN_OPTIONS: halt_on_error=1:second_deadlock_stack=1
steps:
- uses: actions/checkout@v7
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: |
echo "timestamp=$(date --iso-8601=minutes)" >> $GITHUB_OUTPUT
- name: Retrieve ccache cache files
uses: actions/cache@v6
with:
path: .ccache
key: ccache-${{ matrix.SANITIZER }}-${{ env.release }}-${{ github.head_ref || github.ref_name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
ccache-${{ matrix.SANITIZER }}-${{ env.release }}-${{ github.head_ref || github.ref_name }}-
ccache-${{ matrix.SANITIZER }}-${{ env.release }}-${{ github.ref_name }}-
ccache-${{ matrix.SANITIZER }}-${{ env.release }}-${{ github.base_ref }}-
ccache-${{ matrix.SANITIZER }}-${{ env.release }}-
ccache-${{ matrix.SANITIZER }}-
- name: Configure ccache
run: |
mkdir -p ~/.ccache/
echo "cache_dir=${{ github.workspace }}/.ccache" > ~/.ccache/ccache.conf
echo "max_size=500MB" >> ~/.ccache/ccache.conf
echo "compression=true" >> ~/.ccache/ccache.conf
- uses: cvmfs-contrib/github-action-cvmfs@72f2a8d366043978d6aebee154bc9ed321c2f2a8 # v5.6
- name: Build and test
uses: eic/run-cvmfs-osg-eic-shell@e3977323ebfa7e0725f6b910fd2877db05c3bbb6 # main
with:
organization: "${{ env.organization }}"
platform-release: "${{ env.platform }}:${{ env.release }}"
run: |
cmake -B build -S . \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_STANDARD=${{ env.CMAKE_CXX_STANDARD }} \
${{ matrix.CMAKE_OPTIONS }}
cmake --build build -j $(getconf _NPROCESSORS_ONLN)
ccache --show-stats --verbose
ccache --evict-older-than 7d
ctest --test-dir build --output-on-failure