Add LinuxContainerExecutor
to Wasmtime and WasmEdge shims
#676
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: actions/checkout@v3 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt, clippy | |
- name: Setup OCI runtime build env | |
run: ${GITHUB_WORKSPACE}/.github/scripts/build.sh | |
shell: bash | |
- name: Run checks | |
run: make check | |
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 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
env: | |
RUST_CACHE_KEY_OS: ${{ matrix.os }} | |
- name: Setup OCI runtime build env | |
run: ${GITHUB_WORKSPACE}/.github/scripts/build.sh | |
shell: bash | |
- 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: Setup OCI runtime build env | |
run: ${GITHUB_WORKSPACE}/.github/scripts/build.sh | |
shell: bash | |
- | |
# Add support for more platforms with QEMU (optional) | |
# https://github.com/docker/setup-qemu-action | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: run | |
run: make test/k8s | |
# only runs when the previous step fails | |
- name: inspect failed pods | |
if: failure() | |
run: | | |
kubectl get pods --all-namespaces | |
kubectl describe pods --all-namespaces | |
- 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: ${GITHUB_WORKSPACE}/.github/scripts/build.sh | |
shell: bash | |
- name: run | |
run: make test/k3s | |
- name: cleanup | |
if: always() | |
run: make test/k3s/clean |