-
Notifications
You must be signed in to change notification settings - Fork 94
154 lines (144 loc) · 4.13 KB
/
release.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
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
name: release
concurrency:
group: release-${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
release:
type:
- published
env:
CARGO_TERM_COLOR: always
jobs:
vmm:
strategy:
matrix:
hypervisor: ["cloud_hypervisor"]
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Build vmm sandboxer
run: make bin/vmm-sandboxer HYPERVISOR=${{ matrix.hypervisor }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: vmm-sandboxer ${{ matrix.hypervisor }}
path: |
bin/vmm-sandboxer
vmm/sandbox/config_clh.toml
image:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Build vm image
run: sudo make bin/kuasar.img RUNTIME=docker
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: image
path: bin/kuasar.img
kernel:
strategy:
matrix:
hypervisor: ["cloud_hypervisor"]
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Build vm kernel
run: make bin/vmlinux.bin HYPERVISOR=${{ matrix.hypervisor }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: kernel ${{ matrix.hypervisor }}
path: bin/vmlinux.bin
quark:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Build quark
run: make quark
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: quark
path: bin/quark-sandboxer
wasm:
strategy:
matrix:
features: ["wasmedge"]
include:
- features: wasmedge
version: 0.11.2
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Install WasmEdge
if: ${{ matrix.features }} == 'wasmedge'
run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v ${{ matrix.version }} >> /dev/null
- name: Build wasm
run: make wasm WASM_RUNTIME=${{ matrix.features }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: wasm-sandboxer ${{ matrix.features }}
path: bin/wasm-sandboxer
containerd:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Build Containerd
run: ./scripts/build/build-containerd.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: containerd
path: |
bin/containerd
bin/config.toml
release:
permissions:
contents: write
needs:
- vmm
- image
- kernel
- quark
- wasm
- containerd
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Package vendor
run: |
releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}"
bash ./scripts/build/cargo-vendor.sh
mkdir -p /tmp/kuasar-$releasever
cp -r ./* /tmp/kuasar-$releasever
mkdir _release
tar -czvf _release/kuasar-$releasever-vendor.tar.gz -C /tmp/ kuasar-$releasever
- uses: actions/download-artifact@v3
with:
path: _artifacts
- name: Package binaries
run: |
releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}"
mkdir _dist
find _artifacts -type f | xargs -I {} cp {} _dist/
tar -czvf _release/kuasar-$releasever-linux-amd64.tar.gz -C _dist .
- name: Update Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
draft: false
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: |
_release/*.tar.gz