integration tests #181
Workflow file for this run
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: Test | |
on: | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- "examples/**" | |
- "README.md" | |
- "CONTRIBUTING.md" | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
WASI_SDK_VERSION: 20.46gf3a1f8991535 | |
WASI_SDK_RELEASE: wasi-sockets-alpha-5 | |
jobs: | |
test: | |
name: Test | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: "ubuntu-latest", wasiSDK: "linux" } | |
- { os: "macos-latest", wasiSDK: "macos" } | |
- { os: "windows-latest", wasiSDK: "mingw" } | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Install latest Rust nightly toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: wasm32-wasi wasm32-unknown-unknown | |
- name: Install latest Rust stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-wasi wasm32-unknown-unknown | |
components: clippy, rustfmt | |
- name: Install Rust std source | |
shell: bash | |
run: rustup component add rust-src --toolchain nightly | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "rust-cache-${{ hashFiles('./Cargo.lock') }}" | |
cache-on-failure: false | |
- name: Download WASI-SDK | |
shell: bash | |
run: | | |
cd /tmp | |
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz | |
tar xf wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz | |
- name: Install WASI-SDK | |
if: runner.os != 'Windows' | |
shell: bash | |
run: sudo mv /tmp/wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk | |
- name: Install WASI-SDK on Windows | |
if: runner.os == 'Windows' | |
shell: bash | |
run: echo "WASI_SDK_PATH=$(cygpath -m /tmp/wasi-sdk-${WASI_SDK_VERSION})" >> ${GITHUB_ENV} | |
- name: Cache CPython | |
id: cache-cpython-wasi | |
uses: actions/cache@v4 | |
with: | |
path: cpython/builddir/wasi | |
key: cpython-wasi | |
enableCrossOsArchive: true | |
- name: Lint | |
shell: bash | |
run: bash .github/workflows/lint.sh | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: wasmtime-cli | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Test | |
shell: bash | |
run: COMPONENTIZE_PY_TEST_COUNT=20 PROPTEST_MAX_SHRINK_ITERS=0 cargo test --release |