-
Notifications
You must be signed in to change notification settings - Fork 93
172 lines (161 loc) · 4.54 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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.13.5
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
runc:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Build runc
run: make runc
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: runc
path: bin/runc-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
- runc
- 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
dir="kuasar-${releasever}-vensor"
mkdir -p /tmp/${dir}
cp -r ./* /tmp/${dir}
sudo -E chown -R root:root /tmp/${dir}
mkdir _release
sudo -E tar -czf _release/${dir}.tar.gz -C /tmp/ ${dir}
- uses: actions/download-artifact@v3
with:
path: _artifacts
- name: Package binaries
run: |
releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}"
dir="kuasar-${releasever}-linux-amd64"
mkdir -p ${dir}
find _artifacts -type f | xargs -I {} cp {} ${dir}/
sudo -E chown -R root:root ${dir}
sudo -E tar -czf _release/${dir}.tar.gz ${dir}
- 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