Skip to content

Handle Wasm Images with wasm media types #645

Handle Wasm Images with wasm media types

Handle Wasm Images with wasm media types #645

Workflow file for this run

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
- 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: |
# run log collection after running tests, so that we can see the logs in case pod doesn't start properly
timeout 5 bash -c -- 'sudo bin/k3s kubectl logs deployments/wasi-demo'
timeout 5 bash -c -- 'sudo bin/k3s kubectl get pods -o wide'
make test/k3s/clean