forked from oreboot/oreboot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
151 lines (148 loc) · 4.69 KB
/
azure-pipelines.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
trigger:
- main
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight (UTC) build
branches:
include:
- main
always: true
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: CheckQuality
steps:
- checkout: self
fetchDepth: 1 # Download only latest commit, not all history
- script: |
sudo apt-get update
make ciprepare
displayName: 'Install Rust Dependencies'
- script: |
make --keep-going format check=true
displayName: 'Check formatting'
- script: |
make --keep-going test
displayName: 'Run rust tests'
- script: |
echo let us wait until cargo fix or rustfix actually works make --keep-going clippy
displayName: 'SKIP clippy linter'
- script: |
make --keep-going mainboards
displayName: 'Build all mainboards'
- script: |
./scripts/generate-size-report.sh
displayName: 'Generate report of binary sizes'
- job: BuildX86QEMU
displayName: 'Build QEMU q35 board for x86'
steps:
- checkout: self
fetchDepth: 1 # Download only latest commit, not all history
- script: |
sudo apt-get update
make ciprepare
cd src/mainboard/emulation/qemu-q35
make
STACK_SIZES=$(make stack-sizes | tee /dev/stdout)
if ! echo "$STACK_SIZES" | grep '0x[0-9a-f]\+\s\+[0-9]\+\s\+_start' > /dev/null; then
echo "Error: Didn't see stack size of _start. make stack-sizes might be broken."
exit 1
fi
- job: BuildFSPQEMU
displayName: 'Test FSP QEMU'
steps:
- checkout: self
fetchDepth: 1 # Download only latest commit, not all history
- script: |
sudo apt-get update
make ciprepare
cd src/mainboard/emulation/qemu-fsp
make
STACK_SIZES=$(make stack-sizes | tee /dev/stdout)
if ! echo "$STACK_SIZES" | grep '0x[0-9a-f]\+\s\+[0-9]\+\s\+_start' > /dev/null; then
echo "Error: Didn't see stack size of _start. make stack-sizes might be broken."
exit 1
fi
displayName: 'Build FSP QEMU firmware'
- script: |
(
cd src/mainboard/emulation/qemu-fsp
timeout 120s make run | tee serial
grep Running.payload serial
)
displayName: 'Run FSP QEMU firmware in QEMU'
- job: TestSiFiveQEMU
displayName: 'Test RISC-V SiFive board in QEMU'
steps:
- checkout: self
fetchDepth: 1 # Download only latest commit, not all history
- script: |
sudo apt-get update
make ciprepare
displayName: 'Install Rust Dependencies'
- script: |
(
cd src/mainboard/sifive/hifive
PAYLOAD_A=../../../../payloads/src/external/simple/testtesttest make
)
displayName: 'Build firmware'
- script: |
exit 0 # Rebuilding QEMU takes too long. Remove once we cache.
git clone --single-branch --branch v5.1.0 https://github.com/qemu/qemu
mkdir qemu/build-riscv64
(
cd qemu/build-riscv64
../configure --target-list=riscv64-softmmu
make -j16
sudo ln -s $PWD/riscv64-softmmu/qemu-system-riscv64 /usr/bin/
sudo ln -s $PWD/qemu-img /usr/bin/
)
displayName: 'Build QEMU'
- script: |
exit 0 # Rebuilding QEMU takes too long. Remove once we cache.
(
cd src/mainboard/sifive/hifive
PAYLOAD_A=../../../../payloads/src/external/simple/testtesttest timeout 120s make run | tee serial
grep TESTTESTTEST serial
)
displayName: 'Run test'
- job: TestRISCVVirtBoardQEMU
displayName: 'Test RISC-V QEMU Virt board in QEMU'
steps:
- checkout: self
fetchDepth: 1 # Download only latest commit, not all history
- script: |
sudo apt-get update
make ciprepare
displayName: 'Install Rust Dependencies'
- script: |
(
cd src/mainboard/emulation/qemu-riscv
make
STACK_SIZES=$(make stack-sizes | tee /dev/stdout)
if ! echo "$STACK_SIZES" | grep '0x[0-9a-f]\+\s\+[0-9]\+\s\+_start' > /dev/null; then
echo "Error: Didn't see stack size of _start. make stack-sizes might be broken."
exit 1
fi
)
displayName: 'Build oreboot image'
- script: |
exit 0 # Rebuilding QEMU takes too long. Remove once we cache.
git clone --single-branch --branch v5.1.0 https://github.com/qemu/qemu
mkdir qemu/build-riscv64
(
cd qemu/build-riscv64
../configure --target-list=riscv64-softmmu
make -j16
sudo ln -s $PWD/riscv64-softmmu/qemu-system-riscv64 /usr/bin/
sudo ln -s $PWD/qemu-img /usr/bin/
)
displayName: 'Build QEMU'
- script: |
exit 0 # Rebuilding QEMU takes too long. Remove once we cache.
(
cd src/mainboard/emulation/qemu-riscv
timeout 30s make run | tee serial
grep "Running payload" serial
)
displayName: 'Run test'