workflows: Rust toolchain (#31)
Make the rust flow fast, though it doesn't build for windows and mac anymore
This commit is contained in:
parent
7f04b39a15
commit
2ce725c76b
1 changed files with 21 additions and 51 deletions
72
.github/workflows/rust.yml
vendored
72
.github/workflows/rust.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: CI
|
name: rust build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -9,48 +9,27 @@ permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre_ci:
|
check:
|
||||||
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
|
name: cargo check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
test:
|
|
||||||
name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
|
|
||||||
needs: pre_ci
|
|
||||||
if: needs.pre_ci.outputs.continue
|
|
||||||
runs-on: ${{matrix.os}}-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
rust: [nightly]
|
|
||||||
os: [ubuntu]
|
|
||||||
include:
|
|
||||||
- name: macOS
|
|
||||||
os: macos
|
|
||||||
rust: nightly
|
|
||||||
- name: Windows (gnu)
|
|
||||||
os: windows
|
|
||||||
rust: nightly-x86_64-pc-windows-gnu
|
|
||||||
- name: Windows (msvc)
|
|
||||||
os: windows
|
|
||||||
rust: nightly-x86_64-pc-windows-msvc
|
|
||||||
timeout-minutes: 45
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@master
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: ${{matrix.rust}}
|
toolchain: nightly
|
||||||
- name: Enable type layout randomization
|
|
||||||
run: echo -Zrandomize-layout\ --cfg=exhaustive >> $GITHUB_ENV
|
|
||||||
if: matrix.rust == 'nightly'
|
|
||||||
- run: cargo check --locked
|
|
||||||
- run: cargo update
|
|
||||||
- run: cargo check
|
- run: cargo check
|
||||||
- run: cargo test
|
|
||||||
if: matrix.os == 'ubuntu' && matrix.rust == 'nightly'
|
test:
|
||||||
- uses: actions/upload-artifact@v4
|
name: cargo test
|
||||||
if: matrix.os == 'ubuntu' && matrix.rust == 'nightly' && always()
|
runs-on: ubuntu-latest
|
||||||
|
needs: check
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
name: Cargo.lock
|
toolchain: nightly
|
||||||
path: Cargo.lock
|
- run: cargo test
|
||||||
|
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: Clippy
|
name: Clippy
|
||||||
|
|
@ -59,17 +38,8 @@ jobs:
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@clippy
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
components: clippy
|
||||||
- run: cargo clippy --tests -- -Dclippy::all
|
- run: cargo clippy --tests -- -Dclippy::all
|
||||||
|
|
||||||
# outdated:
|
|
||||||
# name: Outdated
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# if: github.event_name != 'pull_request'
|
|
||||||
# timeout-minutes: 45
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v4
|
|
||||||
# - uses: dtolnay/rust-toolchain@stable
|
|
||||||
# - uses: dtolnay/install@cargo-outdated
|
|
||||||
# - run: cargo update
|
|
||||||
# - run: cargo outdated --workspace --exit-code 1
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue