-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
49 lines (45 loc) · 1.12 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
stages:
- build
- ubuntu
- cross compile
- test
Build:
stage: build
script:
- cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Debug
- cmake --build build --target avpn
artifacts:
paths:
- build/bin/avpn
expire_in: 1 day
Ubuntu:
stage: ubuntu
script:
- docker buildx build -t avpn:20.04 . -f Dockerfile.ubuntu
- docker create --name xs avpn:20.04
- mkdir -p build/docker
- docker cp xs:/usr/local/bin/avpn build/docker
- docker rm xs
artifacts:
name: "avpn"
paths:
- build/docker/avpn
expire_in: 5 day
CrossCompile:
stage: cross compile
script:
- cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=cmake/mingw.cmake -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_BUILD_TYPE=Debug -DENABLE_USE_WINTUN=OFF -DBOOST_CHARCONV_QUADMATH_FOUND_EXITCODE=OFF -G Ninja
- cmake --build build --target avpn
artifacts:
paths:
- build/bin
exclude:
- build/bin/avpn
expire_in: 1 day
RunBoostTest:
stage: test
script:
- cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_BUILD_TESTS=ON
- cmake --build build
- cd build
- ctest