-
Notifications
You must be signed in to change notification settings - Fork 19
50 lines (46 loc) · 1.32 KB
/
build-and-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
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: self-hosted
steps:
- name: Cleanup
run: |
ls -la
rm -rf ./* || true
rm -rf ./.??* || true
ls -la
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Bootstrap Toolchain
run: cargo bootstrap
# x86_64 is the default, builds in debug mode
- name: Build x86_64
run: cargo build-all
- name: Test x86_64 Debug
run: cargo start-qemu --tests --qemu-options=--nographic
- name: Test x86_64 Release
run: cargo start-qemu --profile release --tests --qemu-options=--nographic
# aarch64 is compiled for QEMU virt, builds in debug mode
- name: Build aarch64
run: cargo build-all -a aarch64 -m virt
- name: Install mdbook
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.13/mdbook-v0.4.13-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build Docs
run: cargo doc-all
- name: Build Book
run: cd doc && mdbook build