Use youki's libcontainer APIs to implement wasmtime shim. #491
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.69.0 | |
components: rustfmt, clippy | |
- name: Setup OCI runtime build env | |
run: | | |
sudo apt -y update | |
sudo apt install -y pkg-config libsystemd-dev libdbus-glib-1-dev build-essential libelf-dev libseccomp-dev libclang-dev | |
- name: Setup WasmEdge build env | |
run: | | |
make bin/wasmedge | |
echo "LD_LIBRARY_PATH=$PWD/bin/wasmedge/lib" >> $GITHUB_ENV | |
echo "WASMEDGE_INCLUDE_DIR=$PWD/bin/wasmedge/include" >> $GITHUB_ENV | |
echo "WASMEDGE_LIB_DIR=$PWD/bin/wasmedge/lib" >> $GITHUB_ENV | |
- name: Run checks | |
run: | | |
make check | |
build: | |
strategy: | |
matrix: | |
os: ["ubuntu-20.04", "ubuntu-22.04"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: Swatinem/rust-cache@v2 | |
- name: "check cgroup version" | |
run: "mount | grep cgroup" | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.69.0 | |
- name: Setup OCI runtime build env | |
run: | | |
sudo apt -y update | |
sudo apt install -y pkg-config libsystemd-dev libdbus-glib-1-dev build-essential libelf-dev libseccomp-dev libclang-dev | |
- name: Setup WasmEdge build env | |
run: | | |
make bin/wasmedge | |
echo "LD_LIBRARY_PATH=$PWD/bin/wasmedge/lib" >> $GITHUB_ENV | |
echo "WASMEDGE_INCLUDE_DIR=$PWD/bin/wasmedge/include" >> $GITHUB_ENV | |
echo "WASMEDGE_LIB_DIR=$PWD/bin/wasmedge/lib" >> $GITHUB_ENV | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --all --verbose | |
- name: Validate docs | |
run: ./scripts/validate-docs.sh | |
- name: Run tests | |
run: | | |
make test | |
e2e-wasmtime: | |
needs: [build] | |
strategy: | |
matrix: | |
# 20.04 uses cgroupv1, 22.04 uses cgroupv2 | |
os: ["ubuntu-20.04", "ubuntu-22.04"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: "check cgroup version" | |
run: "mount | grep cgroup" | |
- uses: actions/checkout@v3 | |
- name: setup rust-wasm target | |
run: rustup target add wasm32-wasi | |
- name: run | |
run: make test/k8s | |
- name: cleanup | |
if: always() | |
run: make test/k8s/clean | |
e2e-wasmedge: | |
needs: [build] | |
strategy: | |
matrix: | |
os: ["ubuntu-20.04", "ubuntu-22.04"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: "check cgroup version" | |
run: "mount | grep cgroup" | |
- uses: actions/checkout@v3 | |
- name: setup rust-wasm target | |
run: rustup target add wasm32-wasi | |
- name: Setup OCI runtime build env | |
run: | | |
sudo apt -y update | |
sudo apt install -y pkg-config libsystemd-dev libdbus-glib-1-dev build-essential libelf-dev libseccomp-dev libclang-dev | |
- name: run | |
run: | | |
echo "LD_LIBRARY_PATH=$PWD/bin/wasmedge/lib" >> $GITHUB_ENV | |
echo "WASMEDGE_INCLUDE_DIR=$PWD/bin/wasmedge/include" >> $GITHUB_ENV | |
echo "WASMEDGE_LIB_DIR=$PWD/bin/wasmedge/lib" >> $GITHUB_ENV | |
make test/k3s | |
- name: cleanup | |
if: always() | |
run: make test/k3s/clean |