Containerd test #1022
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: Containerd test | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'info' | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- '**/README.md' | |
schedule: | |
- cron: "0 0 */1 * *" | |
jobs: | |
containerd: | |
strategy: | |
fail-fast: false | |
matrix: | |
crun: ["1.15"] | |
wasmedge: ["0.13.5", "0.14.0"] | |
tag: ["latest"] | |
latest: [false] | |
variant: ["compat-smart"] | |
include: | |
- name: "WasmEdge latest release, Crun master" | |
latest: true | |
tag: "latest" | |
wasmedge: "latest" | |
crun: "latest" | |
variant: "compat-smart" | |
runs-on: ubuntu-20.04 | |
name: WasmEdge:${{ matrix.wasmedge }},crun:${{ matrix.crun }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install apt-get packages | |
run: | | |
sudo ACCEPT_EULA=Y apt-get update | |
sudo ACCEPT_EULA=Y apt-get upgrade | |
sudo ACCEPT_EULA=Y apt-get install git wget | |
- name: Install containerd and crun (specified version) | |
if: ${{ ! matrix.latest }} | |
env: | |
WASMEDGE_VERSION: ${{ matrix.wasmedge }} | |
CRUN_VERSION: ${{ matrix.crun }} | |
run: | | |
bash containerd/install.sh --wasmedge=$WASMEDGE_VERSION --crun=$CRUN_VERSION | |
- name: Install containerd and crun (latest version) | |
if: ${{ matrix.latest }} | |
run: | | |
bash containerd/install.sh | |
- name: Run demo in containerd | |
continue-on-error: true | |
env: | |
TAG: ${{ matrix.tag }} | |
VARIANT: ${{ matrix.variant }} | |
run: | | |
bash containerd/simple_wasi_application.sh --tag=$TAG --variant=$VARIANT > dump.log 2>&1 | |
- name: Display crun and wasmedge version | |
run: | | |
crun --version | |
wasmedge --version | |
- name: Dump the log of execution | |
run: | | |
cat dump.log | |
- name: Check the result | |
run: | | |
if grep -q "Printed from wasi: This is from a main function" dump.log; then | |
echo -e "Execution Success!" | |
else | |
echo -e "Execution Fail! Please check the above log for details" | |
exit 1 | |
fi |