Skip to content

Commit 5059407

Browse files
committed
ci: pin nightly version
1 parent 9b14d7a commit 5059407

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.github/workflows/rust.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,20 @@ on: [push, pull_request]
33
name: Continuous integration
44

55
jobs:
6+
Prepare:
7+
runs-on: ubuntu-24.04
8+
outputs:
9+
nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }}
10+
steps:
11+
- name: "Checkout repo"
12+
uses: actions/checkout@v4
13+
- name: "Read nightly version"
14+
id: read_toolchain
15+
run: echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
16+
617
Nightly:
718
name: Nightly - Bench + Docs + Fmt
19+
needs: Prepare
820
runs-on: ubuntu-latest
921
steps:
1022
- name: Checkout Crate
@@ -13,7 +25,7 @@ jobs:
1325
uses: actions-rs/toolchain@v1
1426
with:
1527
profile: minimal
16-
toolchain: nightly
28+
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
1729
override: true
1830
- name: Running benchmarks
1931
env:
@@ -47,13 +59,14 @@ jobs:
4759

4860
Tests:
4961
name: Tests
62+
needs: Prepare
5063
runs-on: ubuntu-latest
5164
strategy:
5265
matrix:
5366
include:
5467
- rust: stable
5568
- rust: beta
56-
- rust: nightly
69+
- rust: ${{ needs.Prepare.outputs.nightly_version }}
5770
- rust: 1.48
5871
steps:
5972
- name: Checkout Crate
@@ -71,6 +84,7 @@ jobs:
7184
run: ./contrib/test.sh
7285

7386
Embedded:
87+
needs: Prepare
7488
runs-on: ubuntu-latest
7589
steps:
7690
- name: Checkout
@@ -81,12 +95,12 @@ jobs:
8195
uses: actions-rs/toolchain@v1
8296
with:
8397
profile: minimal
84-
toolchain: nightly
98+
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
8599
override: true
86100
components: rust-src
87101
target: thumbv7m-none-eabi
88102
- name: Run
89103
env:
90104
RUSTFLAGS: "-C link-arg=-Tlink.x"
91105
CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER: "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -semihosting-config enable=on,target=native -kernel"
92-
run: cd embedded && cargo run --target thumbv7m-none-eabi --release
106+
run: cp Cargo-recent.lock Cargo.lock && cd embedded && cargo run --target thumbv7m-none-eabi --release

nightly-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nightly-2025-03-21

0 commit comments

Comments
 (0)