-
Notifications
You must be signed in to change notification settings - Fork 210
147 lines (119 loc) · 3.68 KB
/
build.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
name: Build CI
on:
push:
pull_request:
schedule:
- cron: '0 22 * * *' # every day at 22:00 UTC
env:
rust_toolchain: nightly-2022-08-05
jobs:
workspace:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.rust_toolchain }}
override: true
components: rust-src, rustfmt, clippy
- name: Check format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features
- name: Pull prebuilt images
if: github.event_name == 'schedule'
run: make zircon-init
- name: Build docs
if: github.event_name == 'schedule'
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --all-features --workspace
test-libos:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mode: [linux, zircon]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.rust_toolchain }}
components: rust-src, llvm-tools-preview, clippy
- name: Pull prebuilt images
if: matrix.mode == 'zircon'
run: make zircon-init
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --package zcore --features "${{ matrix.mode }} libos"
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --package zcore --features "${{ matrix.mode }} libos"
test-bare-metal:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x86_64, riscv64, aarch64]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.rust_toolchain }}
components: rust-src, llvm-tools-preview, clippy
- uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
- name: Install qemu-utils
run: sudo apt update && sudo apt install qemu-utils
- name: Pull prebuilt images
if: matrix.arch == 'x86_64'
run: make zircon-init
- name: Build ${{ matrix.arch }} bare-metal zircon
if: matrix.arch == 'x86_64'
run: cd zCore && make build ARCH=${{ matrix.arch }} ZBI=core-tests
- name: Clippy ${{ matrix.arch }} bare-metal zircon
if: matrix.arch == 'x86_64'
run: cd zCore && make clippy ARCH=${{ matrix.arch }} ZBI=core-tests
- name: Build ${{ matrix.arch }} bare-metal linux
if: matrix.arch != 'x86_64'
run: cd zCore && make build ARCH=${{ matrix.arch }} LINUX=1
- name: Clippy ${{ matrix.arch }} bare-metal linux
run: cd zCore && make clippy ARCH=${{ matrix.arch }} LINUX=1
- name: Xtask Build bare-metal linux
run: cargo bin -m virt-${{ matrix.arch }}
build-user:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install prebuilt images
run: make zircon-init
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-01-20
target: x86_64-fuchsia
- name: Build Zircon user programs
run: cd zircon-user && make build MODE=release