-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (84 loc) · 2.89 KB
/
Copy pathci.yml
File metadata and controls
92 lines (84 loc) · 2.89 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
name: build-test
on:
pull_request:
branches:
- master
permissions: write-all
jobs:
linux-build-test:
runs-on: ubuntu-latest
container:
image: yanzhaowang/centipede:env
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang, libc++]
name: build-test-${{ matrix.compiler }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: 'true'
- name: pre-build
uses: './.github/actions/pre_build_config'
- name: set env variables for cdash
run: |
if [[ $GITHUB_EVENT_NAME == "push" ]]; then
echo "TEST_MODEL=Continuous" >> $GITHUB_ENV
echo "TEST_NAME=\"${{ matrix.compiler }} (master)\"" >> $GITHUB_ENV
elif [[ $GITHUB_EVENT_NAME == "schedule" ]]; then
echo "TEST_MODEL=Nightly" >> $GITHUB_ENV
echo "TEST_NAME=\"${{ matrix.compiler }} (master)\"" >> $GITHUB_ENV
else
echo "TEST_MODEL=Experimental" >> $GITHUB_ENV
export PULL_NR=${{ github.event.number }}
echo "TEST_NAME=\"${{ matrix.compiler }} (pr.${PULL_NR})\"" >> $GITHUB_ENV
fi
# Be very careful about CTEST_BUILD_NAME. It shouldn't contain additional double quotations
- name: build-test-submit
run: |
ctest -S cmake/ctest_dashboard.cmake -VV\
-DTEST_MODEL=${TEST_MODEL}\
-DCTEST_CONFIGURATION_TYPE=Debug\
-DCTEST_BUILD_NAME=${{ env.TEST_NAME }}\
-DCTEST_SITE="Github CI/CD"\
-DCONFIGURE_PRESET="debug-${{ matrix.compiler }}"\
--output-on-failure
sanitizer-build-test:
runs-on: ubuntu-latest
container:
image: yanzhaowang/centipede:env
strategy:
fail-fast: false
matrix:
sanitizer-type:
- thread
- address
- undefined
include:
- sanitizer-type: thread
check-type: 'ThreadSanitizer'
- sanitizer-type: address
check-type: 'AddressSanitizer'
- sanitizer-type: undefined
check-type: 'UndefinedBehaviorSanitizer'
name: sanitizer-${{ matrix.sanitizer-type }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: 'true'
- name: pre-build
uses: './.github/actions/pre_build_config'
- name: set env variables for cdash
run: |
export PULL_NR=${{ github.event.number }}
echo "TEST_NAME=\"${{ matrix.sanitizer-type }} sanitizer (pr.${PULL_NR})\"" >> $GITHUB_ENV
- name: build-test-submit
run: |
ctest -S cmake/ctest_sanitizer.cmake \
-DCTEST_BUILD_NAME=${{ env.TEST_NAME }}\
-DCTEST_SITE="Github CI/CD"\
-DCTEST_MEMORYCHECK_TYPE=${{ matrix.check-type }}\
-DENABLE_SAN=${{ matrix.sanitizer-type }}\
--output-on-failure