Skip to content

feat: add threading model unit and integration tests (US-119) #33

feat: add threading model unit and integration tests (US-119)

feat: add threading model unit and integration tests (US-119) #33

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
check:
name: Check & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features
- name: Test
run: cargo test --all
wasi-libc:
name: Build & Test wasi-libc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: "v41.0.0"
- name: Cache wasi-sdk
id: cache-wasi-sdk
uses: actions/cache@v4
with:
path: build/cache
key: wasi-sdk-30.0-x86_64-linux
- name: Cache wasi-libc source
uses: actions/cache@v4
with:
path: |
build/src-stock
build/src-patched
key: wasi-libc-${{ hashFiles('libc-patches/UPSTREAM_REF') }}
- name: Build stock wasi-libc
run: scripts/build-libc.sh --stock
- name: Build patched wasi-libc
run: scripts/build-libc.sh --patched
- name: Test both sysroots
run: scripts/test-libc.sh --all
tinygo:
name: Build & Verify TinyGo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: "v41.0.0"
- name: Install wasm-tools
run: cargo install wasm-tools
- name: Install wasm-opt (binaryen)
run: sudo apt-get update && sudo apt-get install -y binaryen
- name: Cache TinyGo download
id: cache-tinygo-download
uses: actions/cache@v4
with:
path: build/cache
key: tinygo-${{ env.TINYGO_TAG || 'v0.40.0' }}-linux-amd64
- name: Cache TinyGo source
id: cache-tinygo-source
uses: actions/cache@v4
with:
path: vendor/tinygo
key: tinygo-source-${{ env.TINYGO_TAG || 'v0.40.0' }}
- name: Build TinyGo
run: scripts/build-tinygo.sh --download
- name: Verify TinyGo
run: scripts/build-tinygo.sh --verify
componentize-js:
name: Build & Verify ComponentizeJS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install wasm-tools
run: cargo install wasm-tools
- name: Cache ComponentizeJS npm install
uses: actions/cache@v4
with:
path: build/componentize-js/node_modules
key: componentize-js-npm-${{ hashFiles('scripts/build-componentize-js.sh') }}
- name: Cache ComponentizeJS source
uses: actions/cache@v4
with:
path: vendor/componentize-js
key: componentize-js-source-${{ hashFiles('scripts/build-componentize-js.sh') }}
- name: Build ComponentizeJS
run: scripts/build-componentize-js.sh --npm
- name: Verify ComponentizeJS
run: scripts/build-componentize-js.sh --verify