forked from deislabs/containerd-wasm-shims
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (71 loc) · 2.3 KB
/
build.yaml
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
name: build
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
os: "ubuntu-latest",
arch: "x86_64",
}
- {
os: "ubuntu-latest",
arch: "aarch64"
}
shims:
- {
name: "slight",
version: "v1",
}
- {
name: "spin",
version: "v2",
}
- {
name: "wws",
version: "v1",
}
- {
name: "lunatic",
version: "v1",
}
env:
ARCH: ${{ matrix.config.arch }}
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
"containerd-shim-* -> target"
- name: "Install dependencies"
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libseccomp-dev
- name: build ${{ matrix.shims.name }}
run: |
VERBOSE=1 make build SHIMS=${{ matrix.shims.name }}
- name: unit tests ${{ matrix.shims.name }}
run: |
VERBOSE=1 make unit-tests SHIMS=${{ matrix.shims.name }}
- name: lowercase the runner OS name
shell: bash
run: |
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
echo "RUNNER_OS=$OS" >> $GITHUB_ENV
- name: package release assets
run: |
mkdir _dist
cp containerd-shim-*/target/${{ matrix.config.arch }}-unknown-linux-musl/release/containerd-shim-*-${{ matrix.shims.version }} _dist/
cd _dist
tar czf containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz containerd-shim-*-${{ matrix.shims.version }}
- name: upload shim artifacts
uses: actions/upload-artifact@v3
with:
name: containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}
path: _dist/containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
retention-days: 5