forked from rcore-os/zCore
-
Notifications
You must be signed in to change notification settings - Fork 0
230 lines (222 loc) · 7.99 KB
/
test.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
name: Test CI
on:
push:
pull_request:
schedule:
- cron: '0 22 * * *' # every day at 22:00 UTC
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Pull prebuilt images
run: git lfs pull -I prebuilt/linux/libc-libos.so,prebuilt/zircon/x64/bringup.zbi,prebuilt/zircon/x64/libzircon-libos.so,prebuilt/zircon/x64/userboot-libos.so
- name: Prepare rootfs
run: make rootfs
- name: Test
run: cargo test --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Copt-level=0 -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Copt-level=0 -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort'
- name: Cache grcov
uses: actions/cache@v2
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-grcov
- name: Gather coverage data
id: coverage
uses: actions-rs/[email protected]
# FIXME: 'error from lcovParse: Failed to parse string'
# - name: Coveralls upload
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: ${{ steps.coverage.outputs.report }}
bench:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run benchmarks
run: cargo bench
zircon-core-test-libos:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Pull prebuilt images
run: git lfs pull -I prebuilt/zircon/x64/core-tests.zbi,prebuilt/zircon/x64/libzircon-libos.so,prebuilt/zircon/x64/userboot-libos.so
- name: Install dependencies
run: pip3 install -r tests/requirements.txt
- name: Run fast tests
if: github.event_name != 'schedule'
run: cd tests && python3 zircon_core_test.py --libos --fast --no-failed
- name: Run full tests
if: github.event_name == 'schedule'
run: cd tests && python3 zircon_core_test.py --libos
zircon-core-test-baremetal:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
arch: [x86_64]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Pull prebuilt images
run: git lfs pull -I prebuilt/zircon/x64/core-tests.zbi,prebuilt/zircon/x64/libzircon.so,prebuilt/zircon/x64/userboot.so
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-01-20
components: rust-src
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build -y
pip3 install -r tests/requirements.txt
- name: Cache QEMU
uses: actions/cache@v1
with:
path: qemu-6.1.0
key: qemu-6.1.0-${{ matrix.arch }}
- name: Install QEMU
run: |
[ ! -d qemu-6.1.0 ] && wget https://download.qemu.org/qemu-6.1.0.tar.xz \
&& tar xJf qemu-6.1.0.tar.xz > /dev/null \
&& cd qemu-6.1.0 && ./configure --target-list=${{ matrix.arch }}-softmmu && cd ..
cd qemu-6.1.0 && sudo make install -j
qemu-system-${{ matrix.arch }} --version
- name: Run fast tests
if: github.event_name != 'schedule'
run: cd tests && python3 zircon_core_test.py --fast
- name: Run full tests
if: github.event_name == 'schedule'
run: cd tests && python3 zircon_core_test.py
linux-libc-test-libos:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Pull prebuilt images
run: git lfs pull -I prebuilt/linux/libc-libos.so
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install musl-tools musl-dev -y
pip3 install -r tests/requirements.txt
- name: Prepare rootfs
run: make rootfs && make libc-test
- name: Run fast tests
if: github.event_name != 'schedule'
run: cd tests && python3 linux_libc_test.py --libos --fast
- name: Run full tests
if: github.event_name == 'schedule'
run: cd tests && python3 linux_libc_test.py --libos
linux-libc-test-baremetal:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
arch: [x86_64, riscv64]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Pull prebuilt images
run: git lfs pull -I prebuilt/linux/libc-libos.so
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-01-20
components: rust-src, llvm-tools-preview
- if: matrix.arch == 'riscv64'
uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install musl-tools musl-dev ninja-build -y
pip3 install -r tests/requirements.txt
- name: Cache QEMU
uses: actions/cache@v1
with:
path: qemu-6.1.0
key: qemu-6.1.0-${{ matrix.arch }}
- name: Install QEMU
run: |
[ ! -d qemu-6.1.0 ] && wget https://download.qemu.org/qemu-6.1.0.tar.xz \
&& tar xJf qemu-6.1.0.tar.xz > /dev/null \
&& cd qemu-6.1.0 && ./configure --target-list=${{ matrix.arch }}-softmmu && cd ..
cd qemu-6.1.0 && sudo make install -j
qemu-system-${{ matrix.arch }} --version
- name: Prepare rootfs
run: |
if [ "${{ matrix.arch }}" = "x86_64" ]; then
make baremetal-test-img
elif [ "${{ matrix.arch }}" = "riscv64" ]; then
make riscv-image
fi
- name: Run fast tests
if: github.event_name != 'schedule'
run: cd tests && python3 linux_libc_test.py --arch ${{ matrix.arch }} --fast
- name: Run full tests
if: github.event_name == 'schedule'
run: cd tests && python3 linux_libc_test.py --arch ${{ matrix.arch }}
linux-other-test-baremetal:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
arch: [x86_64, riscv64]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Pull prebuilt images
run: git lfs pull -I prebuilt/linux/libc-libos.so
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-01-20
components: rust-src, llvm-tools-preview
- if: matrix.arch == 'riscv64'
uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install musl-tools musl-dev ninja-build -y
pip3 install -r tests/requirements.txt
- name: Cache QEMU
uses: actions/cache@v1
with:
path: qemu-6.1.0
key: qemu-6.1.0-${{ matrix.arch }}
- name: Install QEMU
run: |
[ ! -d qemu-6.1.0 ] && wget https://download.qemu.org/qemu-6.1.0.tar.xz \
&& tar xJf qemu-6.1.0.tar.xz > /dev/null \
&& cd qemu-6.1.0 && ./configure --target-list=${{ matrix.arch }}-softmmu && cd ..
cd qemu-6.1.0 && sudo make install -j
qemu-system-${{ matrix.arch }} --version
- name: Prepare rootfs
run: |
if [ "${{ matrix.arch }}" = "x86_64" ]; then
make rootfs && make image
elif [ "${{ matrix.arch }}" = "riscv64" ]; then
make riscv-image
fi
- name: Run fast tests
if: github.event_name != 'schedule'
run: cd tests && python3 linux_other_test.py --arch ${{ matrix.arch }} --fast
- name: Run full tests
if: github.event_name == 'schedule'
run: cd tests && python3 linux_other_test.py --arch ${{ matrix.arch }}