-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
67 lines (60 loc) · 1.63 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
stages:
- deploy-base
- build
- test
- deploy
build:
stage: build
image: registry.gitlab.tigers-mannheim.de/main/firmware/arm-none-eabi:12.3.rel1
script:
- cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" .
- cmake --build build -j 8
- cmake --build build --target tests -j 8
artifacts:
name: build-Firmware-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
paths:
- build/*/*/*.elf
- build/*/*/*.bin
- build/bin/test_libs
expire_in: 5 mins
.deploy:
stage: deploy
image: registry.gitlab.tigers-mannheim.de/main/firmware/arm-none-eabi:12.3.rel1
script:
- mkdir -p usb-update
- cp build/src/main2019/main2019.bin usb-update/
- cp build/src/ir2019/ir2019.bin usb-update/
- cp build/src/motor2019/motor2019.bin usb-update/
- cp deploy/README.txt ./
- touch usb-update/autorun_bootloader
artifacts:
name: deploy-Firmware-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
paths:
- usb-update/
- README.txt
deploy-default:
extends: .deploy
except:
- tags
artifacts:
expire_in: 1 week
deploy-release:
extends: .deploy
only:
- tags
artifacts:
expire_in: never
deploy_arm-none-eabi:
stage: deploy-base
tags:
- docker-build
script:
# Note: You have to change the version in the docker file first!
- 'docker build -t registry.gitlab.tigers-mannheim.de/main/firmware/arm-none-eabi:12.3.rel1 docker/arm-none-eabi'
- 'docker push registry.gitlab.tigers-mannheim.de/main/firmware/arm-none-eabi:12.3.rel1'
when: manual
unittests:
stage: test
image: registry.gitlab.tigers-mannheim.de/main/firmware/arm-none-eabi:12.3.rel1
script:
- ./build/bin/test_libs