Skip to content

Move revision-specific args to a custom flag #798

Move revision-specific args to a custom flag

Move revision-specific args to a custom flag #798

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
name: check rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Format
run: cargo fmt --check
clippy:
name: check clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Clippy
run: cargo clippy -- -D warnings
tests:
strategy:
matrix:
include:
- os: ubuntu-latest
host_target: x86_64-unknown-linux-gnu
- os: macos-latest
host_target: x86_64-apple-darwin
- os: windows-latest
host_target: i686-pc-windows-msvc
runs-on: ${{ matrix.os }}
# Run tests under a directory with a space in it to double check the windows path heuristic
defaults:
run:
working-directory: "dir with spaces/ui test"
steps:
- uses: actions/checkout@v4
with:
path: "dir with spaces/ui test"
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose
- name: Run ui tests
run: cargo test --verbose --test integration -- --check
- name: Run unit tests
run: cargo test --verbose
- name: Test no-rustc mode
run: cargo test --no-default-features
build-std:
strategy:
matrix:
include:
- os: ubuntu-latest
host_target: x86_64-unknown-linux-gnu
- os: macos-latest
host_target: x86_64-apple-darwin
- os: windows-latest
host_target: i686-pc-windows-msvc
runs-on: ${{ matrix.os }}
# Run tests under a directory with a space in it to double check the windows path heuristic
defaults:
run:
working-directory: "dir with spaces/build std"
steps:
- uses: actions/checkout@v4
with:
path: "dir with spaces/build std"
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src
- name: Run build-std test
run: cargo test --verbose --test build_std