Skip to content

ci: Switch from actions-rs and update checkout #257

ci: Switch from actions-rs and update checkout

ci: Switch from actions-rs and update checkout #257

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-msrv:
name: Build on MSRV (1.56)
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: 1.56.0
- os: windows-latest
target: i686-pc-windows-msvc
rust: 1.56.0
runs-on: ${{ matrix.os }}
steps:
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: Checkout
uses: actions/checkout@v4
- name: Copy MSRV Lock
run: make msrv-lock
- name: Build
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
run: make check
test:
name: Tests
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: x86_64-apple-darwin
rust: stable
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: 1.56.0
- os: ubuntu-latest
target: i686-unknown-linux-gnu
rust: 1.56.0
- os: windows-latest
target: i686-pc-windows-msvc
rust: 1.56.0
- os: windows-latest
target: x86_64-pc-windows-msvc
rust: 1.56.0
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: stable
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: beta
runs-on: ${{ matrix.os }}
steps:
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: Checkout
uses: actions/checkout@v4
- name: Install linker
if: matrix.target == 'i686-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Copy MSRV Lock
run: make msrv-lock
- name: Test
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
run: make test
wasm-check:
name: WASM Check
strategy:
fail-fast: false
matrix:
include:
- target: wasm32-unknown-unknown
os: ubuntu-latest
- target: wasm32-unknown-emscripten
os: ubuntu-latest
- target: wasm32-unknown-emscripten
os: windows-latest
- target: wasm32-unknown-emscripten
os: macos-latest
runs-on: ubuntu-latest
steps:
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Checkout
uses: actions/checkout@v4
- name: Check
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
run: make check
wasi:
name: WASI
strategy:
fail-fast: false
matrix:
target: [wasm32-wasi]
runs-on: ubuntu-latest
steps:
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Checkout
uses: actions/checkout@v4
- name: Install WasmTime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-x86_64-linux.tar.xz
tar xvf wasmtime-v4.0.0-x86_64-linux.tar.xz
echo `pwd`/wasmtime-v4.0.0-x86_64-linux >> $GITHUB_PATH
- name: Copy MSRV Lock
run: make msrv-lock
- name: Test
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
run: make test
nightly:
name: Nightly Tests
runs-on: ubuntu-latest
steps:
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Checkout
uses: actions/checkout@v4
- name: Test
run: make test