-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
64 lines (56 loc) · 1.24 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
---
default:
interruptible: true
stages:
- 'Deploy'
- 'Test'
- 'Build'
'Validate':
image: '${CI_REGISTRY}/nest/tools/pdk:${CI_HOST_CPU}'
stage: 'Test'
script:
- 'pdk validate'
'Unit Test':
image: '${CI_REGISTRY}/nest/tools/pdk:${CI_HOST_CPU}'
stage: 'Test'
script:
- 'pdk test unit --parallel --verbose'
.template: &template
stage: 'Build'
script:
- 'echo "$CI_REGISTRY_PASSWORD" | podman login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"'
- 'export SSH_PRIVATE_KEY="$NEST_CI_DEPLOY_KEY"'
- 'mkdir empty'
- 'podman build
--build-arg=BOLT_TAG="$CPU"
--build-arg=SSH_PRIVATE_KEY
--file=Containerfile
--squash
--tag="${CI_REGISTRY_IMAGE}:${CPU}"
empty'
- 'podman push "${CI_REGISTRY_IMAGE}:${CPU}"'
rules:
- if: '$BUILD == $CPU'
- if: '$BUILD'
when: never
- when: always
'Build haswell':
<<: *template
tags: ['amd64']
variables:
CPU: 'haswell'
'Build cortex-a53':
<<: *template
tags: ['arm64']
variables:
CPU: 'cortex-a53'
'Build rv64gc':
<<: *template
tags: ['riscv64']
variables:
CPU: 'rv64gc'
'Deploy':
stage: 'Deploy'
tags: ['r10k']
script:
- 'r10k deploy environment "$CI_COMMIT_BRANCH" -pv'