-
Notifications
You must be signed in to change notification settings - Fork 95
190 lines (173 loc) · 4.96 KB
/
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
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
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
paths-ignore:
- '*.md'
- 'docs/**'
- 'LICENSE'
- 'MAINTAINERS'
- 'NOTICE'
- 'art/**'
env:
CARGO_TERM_COLOR: always
jobs:
dependency-review:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- uses: actions/dependency-review-action@v4
check:
name: ${{ matrix.runtime }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
runtime: ["common", "wasmedge", "wasmtime", "wasmer", "wamr"]
uses: ./.github/workflows/action-check.yml
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}
test-image:
name: ${{ matrix.runtime }}
strategy:
matrix:
runtime: ["common"] # not required, but groups jobs
uses: ./.github/workflows/action-test-image.yml
test-image-oci:
name: ${{ matrix.runtime }}
strategy:
matrix:
runtime: ["common"] # not required, but groups jobs
uses: ./.github/workflows/action-test-image.yml
with:
image: img-oci
build-ubuntu:
name: ${{ matrix.runtime }}
permissions:
id-token: write
strategy:
matrix:
os: ["ubuntu-22.04"]
runtime: ["common", "wasmtime", "wasmedge", "wasmer", "wamr"]
libc: ["musl", "gnu"]
arch: ["x86_64", "aarch64"]
uses: ./.github/workflows/action-build.yml
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}
target: "${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}"
slug: "${{ matrix.arch }}-linux-${{ matrix.libc }}"
arch: ${{ matrix.arch }}
build-windows:
name: ${{ matrix.runtime }}
permissions:
id-token: write
strategy:
matrix:
os: ["windows-latest"]
runtime: ["common", "wasmtime", "wasmedge", "wasmer"]
uses: ./.github/workflows/action-build.yml
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}
slug: "windows"
build-oci-tar-builder:
name: oci-tar-builder-${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-22.04"]
arch: ["x86_64", "aarch64"]
uses: ./.github/workflows/action-build.yml
with:
os: ${{ matrix.os }}
runtime: "oci-tar-builder"
target: "${{ matrix.arch }}-unknown-linux-gnu"
slug: "${{ matrix.arch }}-linux-gnu"
arch: ${{ matrix.arch }}
sign: false
binprefix: ""
smoke-tests:
name: ${{ matrix.runtime }}
needs: [build-ubuntu, test-image]
strategy:
matrix:
# 20.04 uses cgroupv1, 22.04 uses cgroupv2
os: ["ubuntu-20.04", "ubuntu-22.04"]
runtime: ["wasmtime", "wasmedge", "wasmer", "wamr"]
uses: ./.github/workflows/action-test-smoke.yml
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}
e2e-kind:
name: ${{ matrix.runtime }}
needs: [build-ubuntu, test-image]
strategy:
fail-fast: false
matrix:
# 20.04 uses cgroupv1, 22.04 uses cgroupv2
os: ["ubuntu-20.04", "ubuntu-22.04"]
runtime: ["wasmtime", "wasmedge", "wasmer", "wamr"]
uses: ./.github/workflows/action-test-kind.yml
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}
test-command: make test/k8s-${{ matrix.runtime }}
e2e-kind-oci:
name: ${{ matrix.runtime }}
needs: [build-ubuntu, test-image-oci]
strategy:
matrix:
os: ["ubuntu-22.04"]
runtime: ["wasmtime", "wasmedge", "wasmer", "wamr"]
uses: ./.github/workflows/action-test-kind.yml
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}
image: img-oci
test-command: make test/k8s-oci-${{ matrix.runtime }}
e2e-k3s:
name: ${{ matrix.runtime }}
needs: [build-ubuntu, test-image]
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04"]
runtime: ["wasmtime", "wasmedge", "wasmer", "wamr"]
uses: ./.github/workflows/action-test-k3s.yml
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup build env
run: ./scripts/setup-linux.sh
shell: bash
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
- name: Check documentation
run: make test-doc
- name: Generate documentation
run: make generate-doc
deps:
name: unused dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
- name: Check unused dependencies
uses: bnjbvr/[email protected]
spelling:
name: spell check with typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Spell Check Repo
uses: crate-ci/typos@master