v1.0.0 #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |