99 branches : main
1010
1111 pull_request :
12- branches : main
1312 types :
1413 - opened
1514 - reopened
1918 - ' cargo-concordium/**/*.rs'
2019 - ' cargo-concordium/**/*.toml'
2120 - ' rustfmt.toml'
21+ - ' Cargo.toml'
22+ - ' rust-toolchain.toml'
2223 - ' concordium-base'
2324
2425 workflow_dispatch : # allows manual trigger
2526
26- env :
27- RUST_VERSION : 1.85
28-
2927jobs :
3028 " lint_fmt " :
31- name : ${{ matrix.build-dir }} lint:fmt
29+ name : lint:fmt
3230 # Don't run on draft pull requests
3331 if : ${{ !github.event.pull_request.draft }}
3432 runs-on : ubuntu-latest
35- strategy :
36- matrix :
37- build-dir :
38- - ' cargo-concordium'
3933 steps :
4034 - name : Checkout
4135 uses : actions/checkout@v3
42- - name : Install Rust
43- uses : actions-rs/toolchain@v1
44- with :
45- profile : minimal
46- toolchain : ${{ env.RUST_VERSION }}
47- override : true
48- components : rustfmt
4936 - name : Format
50- working-directory : ${{ matrix.build-dir }}
5137 run : |
38+ rustup component add rustfmt
5239 cargo fmt -- --color=always --check
5340
54- # For binaries we additionally commit the lock file. And we want to ensure
55- # that the file is up-to-date.
5641 " lint_clippy_binaries " :
57- name : ${{ matrix.build-dir }} lint:clippy
42+ name : lint:clippy
5843 # Don't run on draft pull requests
5944 if : ${{ !github.event.pull_request.draft }}
6045 runs-on : ubuntu-latest
61- strategy :
62- matrix :
63- build-dir :
64- - ' cargo-concordium'
6546 steps :
6647 - name : Checkout
6748 uses : actions/checkout@v3
6849 with :
6950 submodules : recursive
70- - name : Install Rust
71- uses : actions-rs/toolchain@v1
72- with :
73- profile : minimal
74- toolchain : ${{ env.RUST_VERSION }}
75- override : true
76- components : clippy
7751 - name : Clippy
78- working-directory : ${{ matrix.build-dir }}
7952 run : |
80- git config --global url."https://github.com/".insteadOf "git@github.com:"
81- cargo clippy --locked -- color=always --tests --benches -- -Dclippy::all
53+ rustup component add clippy
54+ cargo clippy --color=always --all-targets --all-features --locked -- -D warnings
8255
83- " cargo-concordium_cargo_build-bench " :
84- name : cargo-concordium cargo:build-bench
56+ " cargo_test " :
57+ name : cargo:test
8558 runs-on : ubuntu-latest
86- needs :
87- - lint_clippy_binaries
88- - lint_fmt
89- strategy :
90- matrix :
91- build-dir :
92- - ' cargo-concordium'
9359 steps :
9460 - name : Checkout
9561 uses : actions/checkout@v3
9662 with :
9763 submodules : recursive
98- - name : Install Rust
99- uses : actions-rs/toolchain@v1
100- with :
101- profile : minimal
102- toolchain : ${{ env.RUST_VERSION }}
103- override : true
104- components : clippy
105- - name : Cargo check
106- working-directory : ${{ matrix.build-dir }}
107- run : cargo check --benches --tests
64+ - name : Test
65+ run : cargo test --all-features
10866
109- " cargo_test " :
110- name : ${{ matrix.build-dir }} cargo:test
67+ rustdoc :
68+ name : cargo:doc
69+ if : ${{ !github.event.pull_request.draft }}
11170 runs-on : ubuntu-latest
112- needs :
113- - cargo-concordium_cargo_build-bench
114- strategy :
115- matrix :
116- build-dir :
117- - ' cargo-concordium'
11871 steps :
11972 - name : Checkout
120- uses : actions/checkout@v3
73+ uses : actions/checkout@v2
12174 with :
12275 submodules : recursive
123- - name : Install Rust
124- uses : actions-rs/toolchain@v1
125- with :
126- profile : minimal
127- toolchain : ${{ env.RUST_VERSION }}
128- override : true
129- - name : Test
130- working-directory : ${{ matrix.build-dir }}
131- run : cargo test
76+ - name : Docs
77+ run : |
78+ rustup component add rust-docs
79+ RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
0 commit comments