@@ -2,90 +2,167 @@ on: [push, pull_request]
22
33name : Continuous Integration
44
5+ permissions : {}
6+
57jobs :
68 Prepare :
7- runs-on : ubuntu-latest
9+ runs-on : ubuntu-24.04
10+ permissions :
11+ contents : read
812 outputs :
913 nightly_version : ${{ steps.read_toolchain.outputs.nightly_version }}
14+ maintainer_tools_version : ${{ steps.read_toolchain.outputs.maintainer_tools_version }}
1015 steps :
1116 - name : " Checkout repo"
12- uses : actions/checkout@v4
13- - name : " Read nightly version"
17+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18+ with :
19+ persist-credentials : false
20+ - name : " Read workspace versions"
1421 id : read_toolchain
15- run : echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
22+ run : |
23+ echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
24+ echo "maintainer_tools_version=$(cat maintainer-tools-version)" >> $GITHUB_OUTPUT
1625
17- Stable :
26+ Stable : # 2 jobs, one per manifest.
1827 name : Test - stable toolchain
19- runs-on : ubuntu-latest
28+ runs-on : ubuntu-24.04
29+ permissions :
30+ contents : read
2031 strategy :
2132 fail-fast : false
33+ matrix :
34+ dep : [minimal, recent]
2235 steps :
23- - name : Checkout Crate
24- uses : actions/checkout@v4
25- - name : Checkout Toolchain
26- # https://github.com/dtolnay/rust-toolchain
27- uses : dtolnay/rust-toolchain@stable
28- - name : Running test script
29- env :
30- DO_LINT : true
31- DO_DOCS : true
32- DO_FEATURE_MATRIX : true
33- run : ./contrib/test.sh
36+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37+ with :
38+ persist-credentials : false
39+ - uses : ./.github/actions/prepare
40+ with :
41+ toolchain : stable
42+ - name : " Run tests"
43+ run : cargo rbmt test stable --lock-file ${{ matrix.dep }}
3444
35- Beta :
36- name : Test - beta toolchain
37- runs-on : ubuntu-latest
45+ Nightly : # 2 jobs, one per manifest.
46+ name : Test - nightly toolchain
47+ runs-on : ubuntu-24.04
48+ permissions :
49+ contents : read
3850 strategy :
3951 fail-fast : false
52+ matrix :
53+ dep : [minimal, recent]
4054 steps :
41- - name : Checkout Crate
42- uses : actions/checkout@v4
43- - name : Checkout Toolchain
44- uses : dtolnay/rust-toolchain@beta
45- - name : Running test script
46- env :
47- DO_FEATURE_MATRIX : true
48- run : ./contrib/ test.sh
55+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
56+ with :
57+ persist-credentials : false
58+ - uses : ./.github/actions/prepare
59+ with :
60+ toolchain : nightly
61+ - name : " Run tests "
62+ run : cargo rbmt test nightly --lock-file ${{ matrix.dep }}
4963
50- Nightly :
51- name : Test - nightly toolchain
52- needs : Prepare
53- runs-on : ubuntu-latest
64+ MSRV : # 2 jobs, one per manifest.
65+ name : Test - MSRV toolchain
66+ runs-on : ubuntu-24.04
67+ permissions :
68+ contents : read
5469 strategy :
5570 fail-fast : false
71+ matrix :
72+ dep : [minimal, recent]
5673 steps :
57- - name : Checkout Crate
58- uses : actions/checkout@v4
59- - name : Checkout Toolchain
60- uses : dtolnay/rust-toolchain@v1
74+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6175 with :
62- toolchain : ${{ needs.Prepare.outputs.nightly_version }}
63- - name : Running test script
64- env :
65- DO_DOCSRS : true
66- DO_FMT : true
67- DO_BENCH : true
68- run : ./contrib/test.sh
76+ persist-credentials : false
77+ - uses : ./.github/actions/prepare
78+ with :
79+ toolchain : " 1.56.1"
80+ - name : " Run tests"
81+ run : cargo rbmt test msrv --lock-file ${{ matrix.dep }}
6982
70- MSRV :
71- name : Test - 1.56.1 toolchain
72- runs-on : ubuntu-latest
83+ Lint :
84+ name : Lint - nightly toolchain
85+ runs-on : ubuntu-24.04
86+ permissions :
87+ contents : read
7388 strategy :
7489 fail-fast : false
90+ matrix :
91+ dep : [recent]
7592 steps :
76- - name : Checkout Crate
77- uses : actions/checkout@v4
78- - name : Checkout Toolchain
79- uses : dtolnay/rust-toolchain@1.56.1
80- - name : Running test script
81- env :
82- DO_FEATURE_MATRIX : true
83- run : ./contrib/test.sh
93+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
94+ with :
95+ persist-credentials : false
96+ - uses : ./.github/actions/prepare
97+ with :
98+ toolchain : nightly
99+ components : clippy
100+ - name : " Run lint"
101+ run : cargo rbmt lint
102+
103+ Docs :
104+ name : Docs - stable toolchain
105+ runs-on : ubuntu-24.04
106+ permissions :
107+ contents : read
108+ strategy :
109+ fail-fast : false
110+ matrix :
111+ dep : [recent]
112+ steps :
113+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
114+ with :
115+ persist-credentials : false
116+ - uses : ./.github/actions/prepare
117+ with :
118+ toolchain : stable
119+ - name : " Build docs"
120+ run : cargo rbmt docs
121+
122+ Docsrs :
123+ name : Docs - nightly toolchain
124+ runs-on : ubuntu-24.04
125+ permissions :
126+ contents : read
127+ strategy :
128+ fail-fast : false
129+ matrix :
130+ dep : [recent]
131+ steps :
132+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
133+ with :
134+ persist-credentials : false
135+ - uses : ./.github/actions/prepare
136+ with :
137+ toolchain : nightly
138+ - name : " Build docs.rs docs"
139+ run : cargo rbmt docsrs
140+
141+ Bench :
142+ name : Bench - nightly toolchain
143+ runs-on : ubuntu-24.04
144+ permissions :
145+ contents : read
146+ strategy :
147+ fail-fast : false
148+ matrix :
149+ dep : [recent]
150+ steps :
151+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
152+ with :
153+ persist-credentials : false
154+ - uses : ./.github/actions/prepare
155+ with :
156+ toolchain : nightly
157+ - name : " Run benches"
158+ run : cargo rbmt test nightly --lock-file ${{ matrix.dep }}
84159
85160 EmbeddedWithAlloc :
86161 name : no_std with alloc
87162 needs : Prepare
88163 runs-on : ubuntu-latest
164+ permissions :
165+ contents : read
89166 strategy :
90167 fail-fast : false
91168 steps :
@@ -108,6 +185,8 @@ jobs:
108185 name : no_std no alloc
109186 needs : Prepare
110187 runs-on : ubuntu-latest
188+ permissions :
189+ contents : read
111190 strategy :
112191 fail-fast : false
113192 steps :
@@ -129,6 +208,8 @@ jobs:
129208 Arch32bit :
130209 name : Test 32-bit version
131210 runs-on : ubuntu-latest
211+ permissions :
212+ contents : read
132213 steps :
133214 - name : Checkout Crate
134215 uses : actions/checkout@v4
@@ -147,6 +228,8 @@ jobs:
147228 name : Cross test
148229 if : ${{ !github.event.act }}
149230 runs-on : ubuntu-latest
231+ permissions :
232+ contents : read
150233 steps :
151234 - name : Checkout Crate
152235 uses : actions/checkout@v4
0 commit comments