2020-12-14 21:50:24 +00:00
|
|
|
name: Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: master
|
|
|
|
pull_request:
|
|
|
|
branches: master
|
|
|
|
schedule:
|
|
|
|
- cron: "0 12 * * 1"
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUSTFLAGS: "-Dwarnings"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-doc:
|
2021-01-03 05:58:33 -08:00
|
|
|
name: Docs, deadlinks, minimal dependencies
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-14 21:50:24 +00:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@nightly # Needed for -Z minimal-versions and doc_cfg
|
2021-01-03 21:26:32 -08:00
|
|
|
- name: Install precompiled cargo-deadlinks
|
2021-01-03 05:58:33 -08:00
|
|
|
run: |
|
2022-10-25 23:41:19 -07:00
|
|
|
VERSION=0.8.1
|
2022-10-25 23:05:38 -07:00
|
|
|
URL="https://github.com/deadlinks/cargo-deadlinks/releases/download/${VERSION}/cargo-deadlinks-linux"
|
|
|
|
wget -O ~/.cargo/bin/cargo-deadlinks $URL
|
|
|
|
chmod +x ~/.cargo/bin/cargo-deadlinks
|
|
|
|
cargo deadlinks --version
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2021-01-19 02:46:38 -08:00
|
|
|
- name: Generate Docs
|
|
|
|
env:
|
|
|
|
RUSTDOCFLAGS: --cfg docsrs
|
|
|
|
run: cargo deadlinks -- --features=custom,std
|
2021-01-03 05:58:33 -08:00
|
|
|
- run: |
|
|
|
|
cargo generate-lockfile -Z minimal-versions
|
|
|
|
cargo test --features=custom,std
|
2020-12-14 21:50:24 +00:00
|
|
|
|
2022-10-23 21:38:21 -07:00
|
|
|
# TODO: add aarch64-based macOS runner when it's supported by Github Actions
|
2020-12-14 21:50:24 +00:00
|
|
|
main-tests:
|
2022-10-23 21:37:19 -07:00
|
|
|
name: Tier 1 Test
|
2020-12-14 21:50:24 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-10-30 20:50:41 -07:00
|
|
|
os: [ubuntu-22.04, windows-2022]
|
2022-10-20 19:09:20 -07:00
|
|
|
toolchain: [nightly, beta, stable, 1.36]
|
2021-01-03 15:32:36 -08:00
|
|
|
# Only Test macOS on stable to reduce macOS CI jobs
|
|
|
|
include:
|
2022-10-30 21:16:36 -07:00
|
|
|
- os: macos-12
|
2021-01-03 15:32:36 -08:00
|
|
|
toolchain: stable
|
2020-12-14 21:50:24 +00:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@master
|
2020-12-14 21:50:24 +00:00
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2020-12-14 21:50:24 +00:00
|
|
|
- run: cargo test
|
2021-01-03 05:58:33 -08:00
|
|
|
- run: cargo test --features=std
|
2021-01-03 21:26:32 -08:00
|
|
|
- run: cargo test --features=custom # custom should do nothing here
|
2020-12-14 21:50:24 +00:00
|
|
|
- if: ${{ matrix.toolchain == 'nightly' }}
|
2022-10-22 23:08:31 -07:00
|
|
|
run: cargo test --benches
|
2020-12-14 21:50:24 +00:00
|
|
|
|
|
|
|
linux-tests:
|
2022-10-23 21:37:19 -07:00
|
|
|
name: Linux Test
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-14 21:50:24 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [
|
|
|
|
x86_64-unknown-linux-musl,
|
|
|
|
i686-unknown-linux-gnu,
|
|
|
|
i686-unknown-linux-musl,
|
|
|
|
]
|
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2020-12-14 21:50:24 +00:00
|
|
|
with:
|
2022-10-23 21:32:21 -07:00
|
|
|
targets: ${{ matrix.target }}
|
2021-01-03 05:58:33 -08:00
|
|
|
- name: Install multilib
|
2022-10-30 20:44:47 -07:00
|
|
|
run: sudo apt-get install gcc-multilib
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2021-01-03 05:58:33 -08:00
|
|
|
- run: cargo test --target=${{ matrix.target }} --features=std
|
|
|
|
|
2022-10-23 21:38:21 -07:00
|
|
|
ios-tests:
|
|
|
|
name: iOS Simulator Test
|
2022-10-30 21:16:36 -07:00
|
|
|
runs-on: macos-12
|
2021-01-03 05:58:33 -08:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2021-01-03 05:58:33 -08:00
|
|
|
with:
|
2022-10-23 21:32:21 -07:00
|
|
|
targets: x86_64-apple-ios
|
2022-10-25 23:05:38 -07:00
|
|
|
- name: Install precompiled cargo-dinghy
|
2022-10-23 21:38:21 -07:00
|
|
|
run: |
|
2022-10-25 23:41:19 -07:00
|
|
|
VERSION=0.6.2
|
2022-10-23 21:38:21 -07:00
|
|
|
URL="https://github.com/sonos/dinghy/releases/download/${VERSION}/cargo-dinghy-macos-${VERSION}.tgz"
|
2022-10-25 23:05:38 -07:00
|
|
|
wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
|
2022-10-23 21:38:21 -07:00
|
|
|
cargo dinghy --version
|
|
|
|
- name: Setup Simulator
|
2022-10-30 23:57:40 -07:00
|
|
|
# Use the first installed iOS runtime and the first (i.e. oldest) supported iPhone device.
|
2022-10-23 21:38:21 -07:00
|
|
|
run: |
|
2022-10-30 23:57:40 -07:00
|
|
|
RUNTIME=$(xcrun simctl list runtimes --json | jq '.runtimes | map(select(.name | contains("iOS"))) | .[0]')
|
|
|
|
RUNTIME_ID=$(echo $RUNTIME | jq -r '.identifier')
|
|
|
|
echo "Using runtime:" $RUNTIME_ID
|
|
|
|
DEVICE_ID=$(echo $RUNTIME | jq -r '.supportedDeviceTypes | map(select(.productFamily == "iPhone")) | .[0].identifier')
|
|
|
|
echo "Using device:" $DEVICE_ID
|
|
|
|
SIM_ID=$(xcrun simctl create Test-iPhone $DEVICE_ID $RUNTIME_ID)
|
|
|
|
echo "Created simulator:" $SIM_ID
|
2022-10-23 21:38:21 -07:00
|
|
|
xcrun simctl boot $SIM_ID
|
|
|
|
echo "device=$SIM_ID" >> $GITHUB_ENV
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2022-10-23 21:38:21 -07:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo dinghy -d ${{ env.device }} test
|
2020-12-14 21:50:24 +00:00
|
|
|
|
|
|
|
windows-tests:
|
2022-10-23 21:37:19 -07:00
|
|
|
name: Windows Test
|
2022-10-30 20:50:41 -07:00
|
|
|
runs-on: windows-2022
|
2020-12-14 21:50:24 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
toolchain: [
|
|
|
|
stable-x86_64-gnu,
|
|
|
|
stable-i686-gnu,
|
|
|
|
stable-i686-msvc,
|
|
|
|
]
|
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@master
|
2020-12-14 21:50:24 +00:00
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2021-01-03 05:58:33 -08:00
|
|
|
- run: cargo test --features=std
|
2020-12-14 21:50:24 +00:00
|
|
|
|
|
|
|
cross-tests:
|
2021-01-03 05:58:33 -08:00
|
|
|
name: Cross Test
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-14 21:50:24 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-01-03 05:58:33 -08:00
|
|
|
target: [
|
|
|
|
aarch64-unknown-linux-gnu,
|
|
|
|
aarch64-linux-android,
|
|
|
|
mips-unknown-linux-gnu,
|
2022-10-22 13:23:49 -07:00
|
|
|
wasm32-unknown-emscripten,
|
2021-01-03 05:58:33 -08:00
|
|
|
]
|
2020-12-14 21:50:24 +00:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-03 21:26:32 -08:00
|
|
|
- name: Install precompiled cross
|
2021-01-03 05:58:33 -08:00
|
|
|
run: |
|
2022-10-25 23:41:19 -07:00
|
|
|
VERSION=v0.2.4
|
2022-10-25 23:05:38 -07:00
|
|
|
URL=https://github.com/cross-rs/cross/releases/download/${VERSION}/cross-x86_64-unknown-linux-gnu.tar.gz
|
|
|
|
wget -O - $URL | tar -xz -C ~/.cargo/bin
|
|
|
|
cross --version
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2020-12-14 21:50:24 +00:00
|
|
|
- name: Test
|
2021-01-03 05:58:33 -08:00
|
|
|
run: cross test --no-fail-fast --target=${{ matrix.target }} --features=std
|
2020-12-14 21:50:24 +00:00
|
|
|
|
2022-10-23 21:38:21 -07:00
|
|
|
macos-link:
|
|
|
|
name: macOS ARM64 Build/Link
|
2022-10-30 21:16:36 -07:00
|
|
|
runs-on: macos-12
|
2022-10-23 21:38:21 -07:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-24 21:29:25 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
2022-10-23 21:38:21 -07:00
|
|
|
with:
|
|
|
|
targets: aarch64-apple-darwin, aarch64-apple-ios
|
2022-10-24 21:29:25 -07:00
|
|
|
components: rust-src
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2022-10-23 21:38:21 -07:00
|
|
|
- run: cargo test --no-run --target=aarch64-apple-darwin --features=std
|
|
|
|
- run: cargo test --no-run --target=aarch64-apple-ios --features=std
|
2022-10-24 21:29:25 -07:00
|
|
|
- run: cargo test --no-run --target=aarch64-apple-watchos-sim -Zbuild-std --features=std
|
2022-10-23 21:38:21 -07:00
|
|
|
|
2021-01-03 05:58:33 -08:00
|
|
|
cross-link:
|
|
|
|
name: Cross Build/Link
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-14 21:50:24 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [
|
2022-10-22 13:22:38 -07:00
|
|
|
sparcv9-sun-solaris,
|
|
|
|
x86_64-unknown-illumos,
|
|
|
|
x86_64-unknown-freebsd,
|
2021-01-03 05:58:33 -08:00
|
|
|
x86_64-unknown-netbsd,
|
|
|
|
]
|
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-03 21:26:32 -08:00
|
|
|
- name: Install precompiled cross
|
2021-01-03 05:58:33 -08:00
|
|
|
run: |
|
2022-10-25 23:41:19 -07:00
|
|
|
VERSION=v0.2.4
|
2022-10-25 23:05:38 -07:00
|
|
|
URL=https://github.com/cross-rs/cross/releases/download/${VERSION}/cross-x86_64-unknown-linux-gnu.tar.gz
|
|
|
|
wget -O - $URL | tar -xz -C ~/.cargo/bin
|
|
|
|
cross --version
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2021-01-03 05:58:33 -08:00
|
|
|
- name: Build Tests
|
|
|
|
run: cross test --no-run --target=${{ matrix.target }} --features=std
|
|
|
|
|
|
|
|
web-tests:
|
2022-10-23 21:37:19 -07:00
|
|
|
name: Web Test
|
2022-10-25 15:45:15 -07:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2022-10-30 21:14:51 -07:00
|
|
|
# Firefox isn't available on 22.04 yet, so we must use 20.04
|
|
|
|
- os: ubuntu-20.04
|
2022-10-31 00:05:08 -07:00
|
|
|
host: x86_64-unknown-linux-musl
|
2022-10-30 20:50:41 -07:00
|
|
|
- os: windows-2022
|
2022-10-31 00:05:08 -07:00
|
|
|
host: x86_64-pc-windows-msvc
|
2022-10-25 15:45:15 -07:00
|
|
|
# Reenable when Safari tests start working
|
|
|
|
# - os: macos-12
|
2022-10-31 00:05:08 -07:00
|
|
|
# host: x86_64-apple-darwin
|
2022-10-25 15:45:15 -07:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-01-03 05:58:33 -08:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2022-10-25 15:45:15 -07:00
|
|
|
- run: choco install wget
|
2022-10-30 20:48:41 -07:00
|
|
|
if: runner.os == 'Windows'
|
2022-10-25 15:45:15 -07:00
|
|
|
- name: Install precompiled wasm-pack
|
|
|
|
shell: bash
|
2021-01-03 05:58:33 -08:00
|
|
|
run: |
|
2022-10-25 23:41:19 -07:00
|
|
|
VERSION=v0.10.3
|
2022-10-31 00:05:08 -07:00
|
|
|
URL=https://github.com/rustwasm/wasm-pack/releases/download/${VERSION}/wasm-pack-${VERSION}-${{ matrix.host }}.tar.gz
|
2022-10-25 15:45:15 -07:00
|
|
|
wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
|
|
|
|
wasm-pack --version
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2021-01-03 05:58:33 -08:00
|
|
|
- name: Test (Node)
|
2022-10-25 15:45:15 -07:00
|
|
|
run: wasm-pack test --node --features=js
|
2021-01-03 05:58:33 -08:00
|
|
|
- name: Test (Firefox)
|
2022-10-25 15:45:15 -07:00
|
|
|
run: wasm-pack test --headless --firefox --features=js,test-in-browser
|
2021-01-03 05:58:33 -08:00
|
|
|
- name: Test (Chrome)
|
2022-10-25 15:45:15 -07:00
|
|
|
run: wasm-pack test --headless --chrome --features=js,test-in-browser
|
|
|
|
- name: Test (Edge)
|
2022-10-30 20:48:41 -07:00
|
|
|
if: runner.os == 'Windows'
|
2022-10-25 15:45:15 -07:00
|
|
|
run: wasm-pack test --headless --chrome --chromedriver $Env:EDGEWEBDRIVER\msedgedriver.exe --features=js,test-in-browser
|
|
|
|
# Safari tests are broken: https://github.com/rustwasm/wasm-bindgen/issues/3004
|
|
|
|
# - name: Test (Safari)
|
2022-10-30 20:48:41 -07:00
|
|
|
# if: runner.os == 'macOS'
|
2022-10-25 15:45:15 -07:00
|
|
|
# run: wasm-pack test --headless --safari --features=js,test-in-browser
|
2021-01-05 02:00:21 -08:00
|
|
|
- name: Test (custom getrandom)
|
2022-10-25 15:45:15 -07:00
|
|
|
run: wasm-pack test --node --features=custom
|
2021-01-03 05:58:33 -08:00
|
|
|
|
2022-10-21 19:12:50 -07:00
|
|
|
wasm64-tests:
|
2022-10-23 21:37:19 -07:00
|
|
|
name: wasm64 Build/Link
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2022-10-21 19:12:50 -07:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@nightly # Need to build libstd
|
2022-10-21 19:12:50 -07:00
|
|
|
with:
|
|
|
|
components: rust-src
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2022-10-21 19:12:50 -07:00
|
|
|
- name: Build and Link tests (build-std)
|
|
|
|
# This target is Tier 3, so we have to build libstd ourselves.
|
|
|
|
# We currently cannot run these tests because wasm-bindgen-test-runner
|
|
|
|
# does not yet support memory64.
|
|
|
|
run: cargo test --no-run -Z build-std=std,panic_abort --target=wasm64-unknown-unknown --features=js
|
|
|
|
|
2021-01-03 05:58:33 -08:00
|
|
|
wasi-tests:
|
2022-10-23 21:37:19 -07:00
|
|
|
name: WASI Test
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2021-01-03 05:58:33 -08:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2021-01-03 05:58:33 -08:00
|
|
|
with:
|
2022-10-23 21:32:21 -07:00
|
|
|
targets: wasm32-wasi
|
2021-01-03 21:26:32 -08:00
|
|
|
- name: Install precompiled wasmtime
|
2021-01-03 05:58:33 -08:00
|
|
|
run: |
|
2022-10-25 23:41:19 -07:00
|
|
|
VERSION=v2.0.0
|
2022-10-25 23:05:38 -07:00
|
|
|
URL=https://github.com/bytecodealliance/wasmtime/releases/download/${VERSION}/wasmtime-${VERSION}-x86_64-linux.tar.xz
|
|
|
|
wget -O - $URL | tar -xJ --strip-components=1 -C ~/.cargo/bin
|
|
|
|
wasmtime --version
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2021-01-03 05:58:33 -08:00
|
|
|
- run: cargo test --target wasm32-wasi
|
|
|
|
|
2022-10-23 21:37:19 -07:00
|
|
|
build-tier2:
|
|
|
|
name: Tier 2 Build
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2021-01-03 05:58:33 -08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [
|
2020-12-14 21:50:24 +00:00
|
|
|
x86_64-fuchsia,
|
|
|
|
x86_64-unknown-redox,
|
|
|
|
x86_64-fortanix-unknown-sgx,
|
|
|
|
]
|
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2020-12-14 21:50:24 +00:00
|
|
|
with:
|
2022-10-23 21:32:21 -07:00
|
|
|
targets: ${{ matrix.target }}
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2020-12-14 21:50:24 +00:00
|
|
|
- name: Build
|
2021-01-03 05:58:33 -08:00
|
|
|
run: cargo build --target=${{ matrix.target }} --features=std
|
2020-12-14 21:50:24 +00:00
|
|
|
|
2022-10-23 21:37:19 -07:00
|
|
|
build-tier3:
|
|
|
|
name: Tier 3 Build
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2022-10-24 00:58:41 -07:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# Supported tier 3 targets without libstd support
|
|
|
|
target: [
|
|
|
|
x86_64-unknown-hermit,
|
|
|
|
x86_64-wrs-vxworks,
|
|
|
|
aarch64-kmc-solid_asp3,
|
|
|
|
armv6k-nintendo-3ds,
|
|
|
|
riscv32imc-esp-espidf,
|
2022-10-24 21:29:25 -07:00
|
|
|
# `std` support still in progress. Can be moved up with the other
|
|
|
|
# apple targets after https://github.com/rust-lang/rust/pull/103503
|
|
|
|
aarch64-apple-tvos,
|
2022-10-24 00:58:41 -07:00
|
|
|
]
|
|
|
|
include:
|
|
|
|
# Supported tier 3 targets without libstd support
|
|
|
|
- target: x86_64-unknown-openbsd
|
|
|
|
features: ["std"]
|
|
|
|
- target: x86_64-unknown-dragonfly
|
|
|
|
features: ["std"]
|
|
|
|
- target: x86_64-unknown-haiku
|
|
|
|
features: ["std"]
|
|
|
|
# Unsupported tier 3 targets to test the rdrand feature
|
|
|
|
- target: x86_64-unknown-uefi
|
|
|
|
features: ["rdrand"]
|
|
|
|
- target: x86_64-unknown-l4re-uclibc
|
|
|
|
features: ["rdrand"]
|
2020-12-14 21:50:24 +00:00
|
|
|
steps:
|
2022-10-23 21:41:58 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@nightly # Required to build libcore
|
2020-12-14 21:50:24 +00:00
|
|
|
with:
|
|
|
|
components: rust-src
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2022-10-24 00:58:41 -07:00
|
|
|
- run: cargo build -Z build-std=${{ contains(matrix.features, 'std') && 'std' || 'core'}} --target=${{ matrix.target }} --features="${{ join(matrix.features, ',') }}"
|
2020-12-14 21:50:24 +00:00
|
|
|
|
|
|
|
clippy-fmt:
|
|
|
|
name: Clippy + rustfmt
|
2022-10-30 20:43:28 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-14 21:50:24 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2022-10-23 21:32:21 -07:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2020-12-14 21:50:24 +00:00
|
|
|
with:
|
|
|
|
components: rustfmt, clippy
|
2022-10-23 21:45:51 -07:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2020-12-14 21:50:24 +00:00
|
|
|
- name: clippy
|
2021-01-03 05:58:33 -08:00
|
|
|
run: cargo clippy --all --features=custom,std
|
2020-12-14 21:50:24 +00:00
|
|
|
- name: fmt
|
|
|
|
run: cargo fmt --all -- --check
|