File tree Expand file tree Collapse file tree 5 files changed +51
-16
lines changed
Expand file tree Collapse file tree 5 files changed +51
-16
lines changed Original file line number Diff line number Diff line change 11name : CI
2- on :
3- push :
4- branches :
5- - staging
6- - trying
2+ on : merge_group
73
84jobs :
95
2117 ]
2218 steps :
2319 - uses : actions/checkout@v4
20+ - uses : actions/cache@v4
21+ if : startsWith(matrix.rust, '1')
22+ with :
23+ path : ~/.cargo/registry/index
24+ key : cargo-${{ matrix.rust }}-git-index
2425 - uses : dtolnay/rust-toolchain@master
2526 with :
2627 toolchain : ${{ matrix.rust }}
4445 runs-on : ubuntu-latest
4546 steps :
4647 - uses : actions/checkout@v4
48+ - uses : actions/cache@v4
49+ with :
50+ path : ~/.cargo/registry/index
51+ key : cargo-1.31.0-git-index
47524853 with :
4954 target : thumbv6m-none-eabi
5863 with :
5964 components : rustfmt
6065 - run : cargo fmt --all --check
66+
67+ # One job that "summarizes" the success state of this pipeline. This can then be added to branch
68+ # protection, rather than having to add each job separately.
69+ success :
70+ name : Success
71+ runs-on : ubuntu-latest
72+ needs : [test, no_std_131, no_std_stable, fmt]
73+ # Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
74+ # failed" as success. So we have to do some contortions to ensure the job fails if any of its
75+ # dependencies fails.
76+ if : always() # make sure this is never "skipped"
77+ steps :
78+ # Manually check the status of all dependencies. `if: failure()` does not work.
79+ - name : check if any dependency failed
80+ run : jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
Original file line number Diff line number Diff line change 1616 rust : [1.31.0, stable]
1717 steps :
1818 - uses : actions/checkout@v4
19+ - uses : actions/cache@v4
20+ if : startsWith(matrix.rust, '1')
21+ with :
22+ path : ~/.cargo/registry/index
23+ key : cargo-${{ matrix.rust }}-git-index
1924 - uses : dtolnay/rust-toolchain@master
2025 with :
2126 toolchain : ${{ matrix.rust }}
Original file line number Diff line number Diff line change 1212 rust : [1.31.0, stable]
1313 steps :
1414 - uses : actions/checkout@v4
15+ - uses : actions/cache@v4
16+ if : startsWith(matrix.rust, '1')
17+ with :
18+ path : ~/.cargo/registry/index
19+ key : cargo-${{ matrix.rust }}-git-index
1520 - uses : dtolnay/rust-toolchain@master
1621 with :
1722 toolchain : ${{ matrix.rust }}
2732 with :
2833 components : rustfmt
2934 - run : cargo fmt --all --check
35+
36+ # One job that "summarizes" the success state of this pipeline. This can then be added to branch
37+ # protection, rather than having to add each job separately.
38+ success :
39+ name : Success
40+ runs-on : ubuntu-latest
41+ needs : [test, fmt]
42+ # Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
43+ # failed" as success. So we have to do some contortions to ensure the job fails if any of its
44+ # dependencies fails.
45+ if : always() # make sure this is never "skipped"
46+ steps :
47+ # Manually check the status of all dependencies. `if: failure()` does not work.
48+ - name : check if any dependency failed
49+ run : jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ name = "num-rational"
1010repository = " https://github.com/rust-num/num-rational"
1111version = " 0.4.1"
1212readme = " README.md"
13- exclude = [" /bors.toml " , " / ci/*" , " /.github/*" ]
13+ exclude = [" /ci/*" , " /.github/*" ]
1414edition = " 2018"
1515
1616[package .metadata .docs .rs ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments