-
Notifications
You must be signed in to change notification settings - Fork 57
/
.gitlab-ci.yml
120 lines (109 loc) · 2.5 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
stages:
- build
- test
variables:
GIT_SUBMODULE_STRATEGY: none
TEST_REPO_BRANCH: main
# Variables that should be specified from the project settings:
# - TEST_REPO_URL : URL of the repository with tests, including the username and token parts if necessary
# - ENABLE_JOBS : list of jobs to run, such as "build-linux,test-linux"
# The script assumes that the following software is installed on the runner:
# - GCC or Clang (Linux)
# - Visual Studio 2019 (Windows)
# - CMake 3.10+
# - Ninja build system
# - Python 3.8+ and scikit-image
# Clone the tests repository
.clone-tests: &clone-tests
- git clone -b ${TEST_REPO_BRANCH} ${TEST_REPO_URL} tests
build-linux:
stage: build
tags:
- linux
rules:
- if: '$ENABLE_JOBS =~ /build-linux/'
before_script:
- ./update_dependencies.sh
script:
- mkdir build && cd build
- cmake .. -GNinja
- ninja
artifacts:
name: "rtxdi-linux-${CI_COMMIT_SHORT_SHA}"
paths:
- build/bin/
build-windows:
stage: build
tags:
- windows
rules:
- if: '$ENABLE_JOBS =~ /build-windows/'
before_script:
- ./update_dependencies.bat
script:
- ./set_vs_vars.ps1
- mkdir build
- cd build
- cmake .. -GNinja -DRTXDI_CONSOLE_APP=ON
- cmake --build .
artifacts:
name: "rtxdi-windows-${CI_COMMIT_SHORT_SHA}"
paths:
- build/bin/
test-linux:
stage: test
tags:
- linux
rules:
- if: '$ENABLE_JOBS =~ /test-linux/'
dependencies:
- build-linux
before_script:
- ./update_dependencies.sh
- *clone-tests
script:
- cd tests
- python test.py
artifacts:
name: "rtxdi-linux-test-outputs-${CI_COMMIT_SHORT_SHA}"
when: on_failure
paths:
- tests/outputs/
test-windows-dx12:
stage: test
tags:
- windows
rules:
- if: '$ENABLE_JOBS =~ /test-windows-dx12/'
dependencies:
- build-windows
before_script:
- ./update_dependencies.bat
- *clone-tests
script:
- cd tests
- python test.py
artifacts:
name: "rtxdi-windows-test-outputs-dx12-${CI_COMMIT_SHORT_SHA}"
when: on_failure
paths:
- tests/outputs/
test-windows-vulkan:
stage: test
tags:
- windows
rules:
- if: '$ENABLE_JOBS =~ /test-windows-vulkan/'
dependencies:
- build-windows
before_script:
- ./update_dependencies.bat
- *clone-tests
script:
- cd tests
- python test.py --vulkan
artifacts:
name: "rtxdi-windows-test-outputs-vulkan-${CI_COMMIT_SHORT_SHA}"
when: on_failure
paths:
- tests/outputs/