Try to hit line lengths limits on windows in testing #122
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: CI | |
on: | |
pull_request: | |
merge_group: | |
# Cancel any in-flight jobs for the same PR/branch so there's only one active | |
# at a time | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: Build wasm-component-ld | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- build: x86_64-linux | |
os: ubuntu-latest | |
- build: x86_64-macos | |
os: macos-latest | |
target: x86_64-apple-darwin | |
- build: aarch64-macos | |
os: macos-latest | |
target: aarch64-apple-darwin | |
- build: x86_64-windows | |
os: windows-latest | |
- build: aarch64-linux | |
os: ubuntu-latest | |
target: aarch64-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: rustup update stable --no-self-update && rustup default stable | |
- uses: bytecodealliance/wasmtime/.github/actions/[email protected] | |
with: | |
name: ${{ matrix.build }} | |
- run: | | |
echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV | |
rustup target add ${{ matrix.target }} | |
if: matrix.target != '' | |
- run: $CENTOS cargo build --release | |
- run: ./ci/build-tarballs.sh "${{ matrix.build }}" "${{ matrix.target }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: bins-${{ matrix.build }} | |
path: dist | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
rust: stable | |
- os: ubuntu-latest | |
rust: beta | |
- os: ubuntu-latest | |
rust: nightly | |
- os: macos-latest | |
rust: stable | |
- os: windows-latest | |
rust: stable | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Rust (rustup) | |
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | |
- run: rustup target add wasm32-wasip1 | |
- run: cargo test --locked | |
msrv: | |
name: Build MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Rust (rustup) | |
run: rustup update 1.76.0 --no-self-update && rustup default 1.76.0 | |
- run: cargo build | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable && rustup default stable && rustup component add rustfmt | |
# Note that this doesn't use `cargo fmt` because that doesn't format | |
# modules-defined-in-macros which is in use in `wast` for example. This is | |
# the best alternative I can come up with at this time | |
- run: find . -name '*.rs' | xargs rustfmt --check --edition 2021 | |
# "Join node" which the merge queue waits on. | |
ci-status: | |
name: Record the result of testing and building steps | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
- rustfmt | |
- build | |
- msrv | |
if: always() | |
steps: | |
- name: Successful test and build | |
if: ${{ !(contains(needs.*.result, 'failure')) }} | |
run: exit 0 | |
- name: Failing test and build | |
if: ${{ contains(needs.*.result, 'failure') }} | |
run: exit 1 | |
- name: Report failure on cancellation | |
if: ${{ contains(needs.*.result, 'cancelled') || cancelled() }} | |
run: exit 1 |