Skip to content

Commit

Permalink
Add min rust version check
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh committed Jul 26, 2024
1 parent 0aef808 commit d1215a8
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Rust

env:
min_rust_version: "1.64.0"

on:
push:
branches:
Expand All @@ -20,6 +23,28 @@ on:
- 'Cargo.toml'

jobs:
min-rust-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install Rust Unix
run: |
if rustup --version >/dev/null 2>&1; then
rustup install ${{ env.min_rust_version }}
rustup default ${{ env.min_rust_version }}
else
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain ${{ env.min_rust_version }}
echo ::add-path::$HOME/.cargo/bin
fi
- name: Rust version
run: |
cargo --version
rustc --version
- name: Check
run: |
cargo check --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3
full-test:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
Expand Down Expand Up @@ -77,7 +102,7 @@ jobs:
# cargo +nightly miri test --release --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3

wasm-platform-test:
needs: full-test
needs: [full-test, min-rust-check]
runs-on: ubuntu-latest
container: ghcr.io/webassembly/wasi-sdk
if: github.event.pull_request.draft == false
Expand Down

0 comments on commit d1215a8

Please sign in to comment.