-
Notifications
You must be signed in to change notification settings - Fork 54
/
.gitlab-ci.yml
106 lines (90 loc) · 2.36 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
image: ubuntu:17.04
stages:
- build
- assemble
- test
- deploy
before_script:
- apt-get update -qq
- apt-get install -y -qq $(grep -vE "^\s*#" build_tools/outside/dependencies.txt | tr "\n" " ") > /dev/null
variables:
GIT_STRATEGY: clone
GIT_CHECKOUT: "true"
# build the ROOT.fs and the BOOT.fs. Aditionally build qemu for testing.
build_bootfs:
stage: build
script:
- build_tools/outside/build_bootfs.sh
- tar -cpf build/BOOT.fs.tar build/BOOT.fs
- tar -cpf build/ROOT.fs_kernel_modules.tar build/ROOT.fs_kernel_modules
artifacts:
paths:
- build/BOOT.fs.tar
- build/ROOT.fs_kernel_modules.tar
build_rootfs:
stage: build
script:
- git checkout -B "$CI_COMMIT_REF_NAME" "$CI_COMMIT_SHA"
- git branch --set-upstream-to=origin/$CI_COMMIT_REF_NAME $CI_COMMIT_REF_NAME
- build_tools/outside/build_rootfs.sh
- tar -cpf build/ROOT.fs.tar build/ROOT.fs
artifacts:
paths:
- build/ROOT.fs.tar
build_qemu:
stage: build
script:
- build_tools/outside/build_qemu.sh
artifacts:
paths:
- build/qemu-xlnx.git
# build apertus tools inside qemu with the image
assemble_image:
stage: assemble
dependencies:
- build_bootfs
- build_rootfs
script:
- tar --same-owner -xf build/BOOT.fs.tar
- tar --same-owner -xf build/ROOT.fs_kernel_modules.tar
- tar --same-owner -xf build/ROOT.fs.tar
- build_tools/outside/assemble_image.sh
artifacts:
paths:
- build/IMAGE.dd
# Test the image using qemu
test_qemu:
stage: test
dependencies:
- build_qemu
- build_bootfs
- assemble_image
script:
- tar --same-owner -xf build/BOOT.fs.tar
- tar --same-owner -xf build/ROOT.fs_kernel_modules.tar
- cd build/ && ../build_tools/outside/run_qemu.expect
# create final artifacts & upload the link to gitlab pages
pages:
stage: deploy
only:
- master
before_script:
- "echo no install"
script:
- mkdir public
- echo "<meta http-equiv="refresh" content=\"0; URL=$CI_PROJECT_URL/-/jobs/artifacts/master/download?job=final_artifacts\">" > public/index.html
artifacts:
paths:
- public
final_artifacts:
stage: deploy
dependencies:
- assemble_image
before_script:
- "echo no install"
script:
- cp build/IMAGE.dd axiom-beta-$CI_COMMIT_SHA.img
artifacts:
paths:
- "*.img"
name: "axiom-beta-${CI_COMMIT_SHA}"