Skip to content

bump wasmtime to 17.0.0 #109

bump wasmtime to 17.0.0

bump wasmtime to 17.0.0 #109

Workflow file for this run

name: Wasmtime
on:
push:
branches: [ "main" ]
tags:
- "v*"
pull_request:
branches: [ "main" ]
concurrency:
group: cmake-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-run:
env:
CC: ${{matrix.compiler}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- name: Install dependencies (rustup)
run: |
rustup target add wasm32-wasi
- name: Install dependencies (cargo)
run: |
cargo install --version 1.0.51 wasm-tools
cargo install --version 0.16.0 wit-bindgen-cli
- name: Install dependencies (ubuntu)
if: startsWith(matrix.os, 'ubuntu-')
run: sudo apt-get update && sudo apt-get install -y pax
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install wasmtime (ubuntu)
if: startsWith(matrix.os, 'ubuntu-')
run: |
curl -O -L https://github.com/bytecodealliance/wasmtime/releases/download/v17.0.2/wasmtime-v17.0.2-x86_64-linux.tar.xz
tar xvJf wasmtime-v17.0.2-x86_64-linux.tar.xz
echo "WASMTIME=$(pwd -P)/wasmtime-v17.0.2-x86_64-linux/wasmtime" >> ${GITHUB_ENV}
- name: Install wasmtime (macOS)
if: startsWith(matrix.os, 'macos-')
run: |
curl -O -L https://github.com/bytecodealliance/wasmtime/releases/download/v17.0.2/wasmtime-v17.0.2-x86_64-macos.tar.xz
tar xvzf wasmtime-v17.0.2-x86_64-macos.tar.xz
echo "WASMTIME=$(pwd -P)/wasmtime-v17.0.2-x86_64-macos/wasmtime" >> ${GITHUB_ENV}
- name: Build guest (Rust)
run: |
./build.sh
working-directory: ${{github.workspace}}/guest_rust
- name: Build guest (C)
run: |
./build.sh
working-directory: ${{github.workspace}}/guest_c
- name: Build host_wasmtime
run: |
cargo build
working-directory: ${{github.workspace}}/host_wasmtime
- name: Run (component)
run: |
cargo run ../guest_rust/guest-component.wasm
working-directory: ${{github.workspace}}/host_wasmtime
- name: Check the output (component)
run: |
test $(ls *.jpg|wc -l) -eq 60
working-directory: ${{github.workspace}}/host_wasmtime
- name: Clean up the output (component)
run: |
rm *.jpg
working-directory: ${{github.workspace}}/host_wasmtime
- name: Run (wasmtime precompiled component)
run: |
cargo run ../guest_rust/guest-component.cwasm
working-directory: ${{github.workspace}}/host_wasmtime
- name: Check the output (wasmtime precompiled component)
run: |
test $(ls *.jpg|wc -l) -eq 60
working-directory: ${{github.workspace}}/host_wasmtime
- name: Clean up the output (wasmtime precompiled component)
run: |
rm *.jpg
working-directory: ${{github.workspace}}/host_wasmtime
- name: Run (C, component)
run: |
cargo run ../guest_c/guest-component.wasm
working-directory: ${{github.workspace}}/host_wasmtime
- name: Check the output (C, component)
run: |
test $(ls *.jpg|wc -l) -eq 60
working-directory: ${{github.workspace}}/host_wasmtime
- name: Clean up the output (C, component)
run: |
rm *.jpg
working-directory: ${{github.workspace}}/host_wasmtime
- name: Run (C, wasmtime precompiled component)
run: |
cargo run ../guest_c/guest-component.cwasm
working-directory: ${{github.workspace}}/host_wasmtime
- name: Check the output (C, precompiled component)
run: |
test $(ls *.jpg|wc -l) -eq 60
working-directory: ${{github.workspace}}/host_wasmtime
- name: Clean up the output (C, precompiled component)
run: |
rm *.jpg
working-directory: ${{github.workspace}}/host_wasmtime