Skip to content

fix: resolve all failing integration tests and flaky CI #174

fix: resolve all failing integration tests and flaky CI

fix: resolve all failing integration tests and flaky CI #174

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: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler binaryen
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Install wasm-tools
run: cargo install wasm-tools
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install TinyGo
run: scripts/build-tinygo.sh --download
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features
- name: Test
run: cargo test --all
docker:
name: Docker Build
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- uses: useblacksmith/setup-docker-builder@v1
- name: Build Docker image
uses: useblacksmith/build-push-action@v2
with:
context: .
file: infra/Dockerfile
push: false
load: true
tags: warpgrid:ci
- name: Verify binary works
run: docker run --rm warpgrid:ci --help
wasi-libc:
name: Build & Test wasi-libc
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- name: Configure git identity (required by git am)
run: |
git config --global user.email "ci@warpgrid.dev"
git config --global user.name "WarpGrid CI"
- 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: blacksmith-4vcpu-ubuntu-2404
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: blacksmith-4vcpu-ubuntu-2404
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