Skip to content

Commit 4c00b93

Browse files
committed
introduce nightly-version file (copied from rust-bitcoin) and use it in CI
1 parent 720992b commit 4c00b93

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

.github/workflows/rust.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ 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
Stable:
718
name: Test - stable toolchain
819
runs-on: ubuntu-latest
@@ -38,14 +49,17 @@ jobs:
3849

3950
Nightly:
4051
name: Test - nightly toolchain
52+
needs: Prepare
4153
runs-on: ubuntu-latest
4254
strategy:
4355
fail-fast: false
4456
steps:
4557
- name: Checkout Crate
4658
uses: actions/checkout@v3
4759
- name: Checkout Toolchain
48-
uses: dtolnay/rust-toolchain@nightly
60+
uses: dtolnay/rust-toolchain@v1
61+
with:
62+
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
4963
- name: Running test script
5064
env:
5165
DO_DOCSRS: true
@@ -70,6 +84,7 @@ jobs:
7084

7185
EmbeddedWithAlloc:
7286
name: no_std with alloc
87+
needs: Prepare
7388
runs-on: ubuntu-latest
7489
strategy:
7590
fail-fast: false
@@ -79,9 +94,10 @@ jobs:
7994
- name: Set up QEMU
8095
run: sudo apt update && sudo apt install -y qemu-system-arm gcc-arm-none-eabi
8196
- name: Checkout Toolchain
82-
uses: dtolnay/rust-toolchain@nightly
97+
uses: dtolnay/rust-toolchain@v1
8398
with:
8499
targets: thumbv7m-none-eabi
100+
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
85101
- name: Run
86102
env:
87103
RUSTFLAGS: "-C link-arg=-Tlink.x"
@@ -90,6 +106,7 @@ jobs:
90106

91107
EmbeddedNoAlloc:
92108
name: no_std no alloc
109+
needs: Prepare
93110
runs-on: ubuntu-latest
94111
strategy:
95112
fail-fast: false
@@ -99,9 +116,10 @@ jobs:
99116
- name: Set up QEMU
100117
run: sudo apt update && sudo apt install -y qemu-system-arm gcc-arm-none-eabi
101118
- name: Checkout Toolchain
102-
uses: dtolnay/rust-toolchain@nightly
119+
uses: dtolnay/rust-toolchain@v1
103120
with:
104121
targets: thumbv7m-none-eabi
122+
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
105123
- name: Run
106124
env:
107125
RUSTFLAGS: "-C link-arg=-Tlink.x"

nightly-version

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

0 commit comments

Comments
 (0)