Skip to content

Support adapting core wasm to components #661

Support adapting core wasm to components

Support adapting core wasm to components #661

Workflow file for this run

on:
pull_request:
paths-ignore:
- '**.md'
name: Test
env:
CACHE_GENERATION: 0
jobs:
test:
strategy:
matrix:
platform: [ubuntu-20.04, windows-2022, macos-11]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
run: rustup update --no-self-update stable && rustup default stable
shell: bash
- name: Add wasm32-wasi Rust target
run: rustup target add wasm32-wasi
- name: Add wasm32-unknown-unknown Rust target
run: rustup target add wasm32-unknown-unknown
- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
test-fixtures/target/
key: ${{ runner.os }}-cargo-v${{ env.CACHE_GENERATION }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install rustfmt
run: rustup component add rustfmt
shell: bash
- name: Check formatting
run: cargo fmt --all -- --check
shell: bash
- name: test
run: make ci
shell: bash
# Run the trap test in an isolated job. It needs different cargo features than the usual build, so
# it entails rebuilding the whole workspace if we combine them in a single job. This way, we
# achieve some parallelism via Actions jobs.
trap-test:
strategy:
matrix:
platform: [ubuntu-20.04, windows-2022, macos-11]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
run: rustup update --no-self-update stable && rustup default stable
shell: bash
- name: Add wasm32-wasi Rust target
run: rustup target add wasm32-wasi
- name: Add wasm32-unknown-unknown Rust target
run: rustup target add wasm32-unknown-unknown
- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
cli/tests/trap-test/target/
test-fixtures/target/
key: ${{ runner.os }}-cargo-trap-v${{ env.CACHE_GENERATION }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: trap-test
run: make trap-test-ci
shell: bash
package-check:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
run: rustup update stable && rustup default stable
shell: bash
- name: Check crates can be published
run: make package-check
shell: bash