3030 matrix :
3131 include :
3232 - task : make -f Makefile fmt-ci
33- toolchain : 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
3433 components : rustfmt
3534 - task : make -f Makefile check-typos
36- toolchain : 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
3735 components : cargo
3836 runs-on : ubuntu-24.04
3937 container :
@@ -52,17 +50,16 @@ jobs:
5250 make
5351 ncurses
5452 systemd-devel
55- - uses : dtolnay/rust-toolchain@master
53+ - uses : actions/checkout@v6
54+ with :
55+ persist-credentials : false
56+ - uses : actions-rust-lang/setup-rust-toolchain@v1
5657 with :
5758 components : ${{ matrix.components }}
58- toolchain : ${{ matrix.toolchain }}
5959 - uses : baptiste0928/cargo-install@v3
6060 with :
6161 crate : typos-cli
62- - uses : actions/checkout@v6
63- with :
64- persist-credentials : false
65- - name : Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain
62+ - name : Test ${{ matrix.task }} on CURRENT DEVELOPMENT RUST TOOLCHAIN
6663 run : ${{ matrix.task }}
6764
6865 stratis-cli-checks :
@@ -94,14 +91,21 @@ jobs:
9491 python3-psutil
9592 python3-wcwidth
9693 systemd-devel
97- - uses : dtolnay/rust-toolchain@master
98- with :
99- components : cargo
100- toolchain : 1.85.0 # LOWEST SUPPORTED RUST TOOLCHAIN
94+ toml-cli
10195 - uses : actions/checkout@v6
10296 with :
10397 path : stratisd
10498 persist-credentials : false
99+ - name : Get package MSRV
100+ id : msrv
101+ run : |
102+ MSRV=$(toml get --toml-path Cargo.toml "workspace.package.rust-version")
103+ echo "MSRV=$MSRV" >> "$GITHUB_OUTPUT"
104+ working-directory : stratisd
105+ - uses : actions-rust-lang/setup-rust-toolchain@v1
106+ with :
107+ components : cargo
108+ toolchain : ${{ steps.msrv.outputs.MSRV }}
105109 - name : Overwrite stratisd dependencies as necessary
106110 uses : stratis-storage/github-actions/stratisd-modify@HEAD
107111 with :
@@ -161,13 +165,12 @@ jobs:
161165 python3-wcwidth
162166 systemd-devel
163167 xfsprogs
164- - uses : dtolnay/rust-toolchain@master
165- with :
166- components : cargo
167- toolchain : 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
168168 - uses : actions/checkout@v6
169169 with :
170170 persist-credentials : false
171+ - uses : actions-rust-lang/setup-rust-toolchain@v1
172+ with :
173+ components : cargo
171174 - name : Overwrite stratisd dependencies as necessary
172175 uses : stratis-storage/github-actions/stratisd-modify@HEAD
173176 - name : Run stratisd-min cli tests
@@ -222,13 +225,12 @@ jobs:
222225 systemd-devel
223226 systemd-udev
224227 xfsprogs
225- - uses : dtolnay/rust-toolchain@master
226- with :
227- components : cargo
228- toolchain : 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
229228 - uses : actions/checkout@v6
230229 with :
231230 persist-credentials : false
231+ - uses : actions-rust-lang/setup-rust-toolchain@v1
232+ with :
233+ components : cargo
232234 - name : Overwrite stratisd dependencies as necessary
233235 uses : stratis-storage/github-actions/stratisd-modify@HEAD
234236 - name : Build stratisd
@@ -265,6 +267,7 @@ jobs:
265267 libsystemd-dev
266268 libudev-dev
267269 make
270+ pip
268271 pkg-config
269272 thin-provisioning-tools
270273 udev
@@ -276,14 +279,22 @@ jobs:
276279 dbus-python-client-gen
277280 justbytes
278281 psutil
279- - uses : dtolnay/rust-toolchain@master
280- with :
281- components : cargo
282- toolchain : 1.85.0 # LOWEST SUPPORTED RUST TOOLCHAIN
282+ - name : Install toml-cli
283+ run : pip install --user toml-cli
283284 - uses : actions/checkout@v6
284285 with :
285286 path : stratisd
286287 persist-credentials : false
288+ - name : Get package MSRV
289+ id : msrv
290+ run : |
291+ PATH="$PATH:$(python3 -m site --user-base)/bin" MSRV=$(toml get --toml-path Cargo.toml "workspace.package.rust-version")
292+ echo "MSRV=$MSRV" >> "$GITHUB_OUTPUT"
293+ working-directory : stratisd
294+ - uses : actions-rust-lang/setup-rust-toolchain@v1
295+ with :
296+ components : cargo
297+ toolchain : ${{ steps.msrv.outputs.MSRV }}
287298 - name : Overwrite stratisd dependencies as necessary
288299 uses : stratis-storage/github-actions/stratisd-modify@HEAD
289300 with :
0 commit comments