Skip to content

Commit 085f13f

Browse files
committed
ci: pin nightly version
1 parent b57c9a7 commit 085f13f

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/rust.yml

Lines changed: 18 additions & 5 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,15 +59,15 @@ 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
5769
- rust: 1.41.1
58-
- rust: 1.47
70+
- rust: ${{ needs.Prepare.outputs.nightly_version }}
5971
steps:
6072
- name: Checkout Crate
6173
uses: actions/checkout@v2
@@ -72,6 +84,7 @@ jobs:
7284
run: ./contrib/test.sh
7385

7486
Embedded:
87+
needs: Prepare
7588
runs-on: ubuntu-latest
7689
steps:
7790
- name: Checkout
@@ -82,12 +95,12 @@ jobs:
8295
uses: actions-rs/toolchain@v1
8396
with:
8497
profile: minimal
85-
toolchain: nightly
98+
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
8699
override: true
87100
components: rust-src
88101
target: thumbv7m-none-eabi
89102
- name: Run
90103
env:
91104
RUSTFLAGS: "-C link-arg=-Tlink.x"
92105
CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER: "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -semihosting-config enable=on,target=native -kernel"
93-
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)