-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
78 lines (65 loc) · 2.06 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
stages:
- build-and-test
# doesn't clone submodules otherwise
variables:
GIT_SUBMODULE_STRATEGY: recursive
pi-cross-compile:
stage: build-and-test
dependencies: []
image: wpilib/raspbian-cross-ubuntu:bullseye-22.04
before_script:
- apt-get update
- apt install --yes file # for some mfing reason this ubuntu container doesn't have file command, install it
script:
- cmake -B build-pi -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=CMake/arm-pi-gnueabihf.toolchain.cmake
- cmake --build build-pi --target ecs_pi -- -j 8
- echo "Checking to make sure executable is actually ARM"
- file build-pi/ecs_pi | tee log.txt
- grep "ARM" log.txt # check to make sure "ARM" appears in output of file command
- echo "Build successful!"
- echo "Not testing, not possible with Docker"
artifacts:
paths:
- build-pi/ecs_pi
sim-windows:
stage: build-and-test
dependencies: []
tags:
- windows
before_script:
- choco install -y cmake
- $env:Path += ';C:\Program Files\CMake\bin'
script:
- cmake -B build
- cmake --build build --target ecs_sim
- echo "Build successful!"
- cmake --build build --target all_tests
- build/catch_tests/Debug/all_tests # yeah fucking cringe, the random ass Debug folder
rules: # Currently only running windows builds on MRs to reduce build time
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
sim-linux-clang:
stage: build-and-test
dependencies: []
image: silkeh/clang
before_script:
- apt-get update --yes
- apt-get install --yes cmake
script:
- cmake -B build
- cmake --build build --target ecs_sim
- echo "Build successful!"
- cmake --build build --target all_tests
- build/catch_tests/all_tests
sim-linux-gcc:
stage: build-and-test
dependencies: []
image: gcc
before_script:
- apt-get update --yes
- apt-get install --yes cmake
script:
- cmake -B build
- cmake --build build --target ecs_sim
- echo "Build successful!"
- cmake --build build --target all_tests
- build/catch_tests/all_tests