-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
105 lines (97 loc) · 2.48 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
workflow:
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "web"'
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: normal
GLOBAL_CMAKE_OPTIONS: -DRDM_BUILD_TESTS=ON
windows-build:
stage: build
tags:
- ct-windows
script:
- mkdir build
- cd build
- cmake -G "Visual Studio 16 2019" -A x64 $env:GLOBAL_CMAKE_OPTIONS.Split(" ") ..
- cmake --build . --config Release -j
- ctest -C Release --output-on-failure
artifacts:
when: always
reports:
junit: build/tests/unit/test-results/*.xml
macos-build:
stage: build
tags:
- ct-macos
script:
- mkdir build
- cd build
- cmake ${GLOBAL_CMAKE_OPTIONS} ..
- cmake --build .
- ctest --output-on-failure
artifacts:
when: always
reports:
junit: build/tests/unit/test-results/*.xml
linux-build:
stage: build
tags:
- etc-linux-docker
image: etc-docker.artifactory.etcconnect.com/etc/common-tech/gcc-cmake:latest
script:
- mkdir build
- cd build
- cmake ${GLOBAL_CMAKE_OPTIONS} -DRDM_ENABLE_ASAN=ON ..
- make -j `nproc`
- ctest --output-on-failure
artifacts:
when: always
reports:
junit: build/tests/unit/test-results/*.xml
oss-build:
stage: build
tags:
- etc-linux-docker
image: etc-docker.artifactory.etcconnect.com/etc/common-tech/gcc-cmake:latest
script:
# Remove the .git folder to simulate building from P4/zip archive
- rm -rf .git/
- mkdir build
- cd build
# Use default config, no options
- cmake ..
- make -j `nproc`
docs-test:
stage: build
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
tags:
- etc-linux-docker
image: etc-docker.artifactory.etcconnect.com/etc/common-tech/doxygen:1.9.1
variables:
GIT_DEPTH: 0
script:
- pip install --upgrade etcdevtool
- etcdevtool docs . 1.9.1
deploy-docs:
stage: build
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
tags:
- etc-linux-docker
image: etc-docker.artifactory.etcconnect.com/etc/common-tech/doxygen:1.9.1
variables:
GIT_DEPTH: 0
GH_REPO_NAME: RDMDocs
GH_REPO_REF: github.com/ETCLabs/RDMDocs.git
GH_REPO_TOKEN: $SVC_ETCLABS_REPO_TOKEN
script:
- pip install --upgrade etcdevtool
- chmod +x tools/ci/publish_docs.sh
- tools/ci/publish_docs.sh
include:
- project: 'etc/common-tech/tools/gitlab-ci-util'
ref: v2.0.1
file: '/ci-yml/deploy-versioned-build.yml'