Skip to content

Commit fc06ad6

Browse files
uklotzdeorottier
authored andcommitted
GitHub CI: Add MSRV action
1 parent e964f0b commit fc06ad6

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/msrv.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
2+
3+
name: msrv
4+
5+
# read-only repo token
6+
# no access to secrets
7+
on:
8+
push:
9+
branches: [main]
10+
pull_request:
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
15+
jobs:
16+
verify-build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Install ALSA and Jack dependencies
21+
run: |
22+
sudo apt-get update && sudo apt-get install -y libasound2-dev libjack-jackd2-dev cmake
23+
24+
- name: Install Rust toolchain
25+
uses: dtolnay/rust-toolchain@master
26+
with:
27+
# Aligned with `rust-version` in `Cargo.toml`
28+
# The quoting is required, otherwise versions that end with 0 would be interpreted as a number
29+
toolchain: "1.70"
30+
31+
- name: Check out repository
32+
uses: actions/checkout@v3
33+
34+
- name: Generate Cargo.lock
35+
run: cargo generate-lockfile
36+
37+
- name: Rust Cache
38+
uses: Swatinem/rust-cache@v2
39+
with:
40+
# Distinguished by the action name to avoid sharing!
41+
shared-key: "msrv"
42+
43+
- name: Check
44+
run: cargo check --verbose --all-targets --all-features

.github/workflows/rust.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
# restore cargo cache from previous runs
3636
- name: Rust Cache
3737
uses: Swatinem/rust-cache@v2
38+
with:
39+
# Distinguished by the action name to avoid sharing!
40+
shared-key: "rust"
3841

3942
# check it builds
4043
- name: Build

0 commit comments

Comments
 (0)