-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
86 lines (75 loc) · 2.55 KB
/
.gitlab-ci.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
variables:
CURRENT_HW: "hw08"
CURRENT_TEST: "testhw08"
TEST_HASH_EXPECTED: "1f0bf1b7c18780de57986221a2a1b8d39d3bb508aebd831edee2a48b43d319c5"
# pre-verify test system hash
before_script:
- tester="python3 -c 'import base64, lzma; exec(lzma.decompress(base64.b64decode(\"/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4AN1AaNdAAUbSxPKKmVtGhRPQtvDy44ev3OIPm3q08xy0m1+Vzts/YuDUpfq1D15P9KyY1ltIZb4nnvSxakQAJy1iSkSn0CSwxAcZ9BdnVKenS6RtGMtxaPfI4+FwrOfdwPZUVPktXnaYcFn4bVa3hvnOJxmO4w8WujSjqrSI4IyI2j1d6dwwpL4qBlgvcn6q8B6KU/KbmlIgAAdpN7LNlBnEqIdk40AntOo9T78J0EcddwODxBjtMVoV2ClCj6u5kgg7/i9CaBoQz3deUx205aCsVgBvu8nQV/TZYnVSzIiZ5Q3OxMpl3Xu8Jmp6h4xGF/8OoHFyKfGxIKfHcp9Hv/Q+zDJD6UYfOWKYUjr4OAmt24vturwp9q7XNQCZgsYPLAYSGTv/B0KiXtVx8hgDrGdJlD/+UbPiotERiswHUFiyfQV9Lr9h2X6D6YXH5JckS6TiKPsCtQH8Sxa7CZqj1PGar2+ni/M88ix5nD4ihBcFuI2QrHvbNeFwXO6CJ1SsFJRKQwuKkIBSOEHpPr2AwLIrshKW1Alx6/TDYaZFDTLd77GLTvvVHJuAABXl4lW9tWghQABvwP2BgAAZDrpyLHEZ/sCAAAAAARZWg==\")).decode())'"
- TEST_HASH=$(eval "$tester" . tests CMakeLists.txt)
- echo $TEST_HASH
- echo $TEST_HASH_EXPECTED
- if [[ "$TEST_HASH" == "$TEST_HASH_EXPECTED" ]]; then echo "hash ok for tests, CMakeLists.txt"; else echo -n "contents of tests, CMakeLists.txt are not as expected! to fix this, git restore -s upstream/master tests, CMakeLists.txt .gitlab-ci.yml"; exit 1; fi
- export GCC_COLORS=yes
stages:
- compile
- test
# yaml template lol
.job_template: &build_job_artifact
stage: compile
cache:
key: "$CI_JOB_NAME"
paths:
- build/
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- build/
expire_in: 30 mins
# compile jobs
build-gcc:
<<: *build_job_artifact
image: cpp/compiler:20
script:
- mkdir -p build
- cd build
- cmake ..
- make $CURRENT_HW ${CURRENT_TEST} -j4 VERBOSE=1
tags:
- linux
build-clang:
<<: *build_job_artifact
image: cpp/compiler:20
script:
- mkdir -p build
- cd build
- cmake .. -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-lc++abi"
- make $CURRENT_HW ${CURRENT_TEST} -j4 VERBOSE=1
tags:
- linux
# test jobs
test-gcc:
stage: test
image: cpp/compiler:20
script:
- cd build
- ctest -R $CURRENT_HW -V -O ctest.log
dependencies:
- build-gcc
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
when: always
paths:
- build/ctest.log
expire_in: 1 year
tags:
- linux
test-clang:
stage: test
image: cpp/compiler:20
script:
- cd build
- ctest -R $CURRENT_HW -V -O ctest.log
dependencies:
- build-clang
tags:
- linux