1919 - name : Checkout
2020 uses : actions/checkout@v3
2121
22- - name : Install all Rust targets
23- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
22+ - name : Configure Rust target (v6, v7, v8.b v8.m)
23+ run : |
24+ rustup target add thumbv6m-none-eabi
25+ rustup target add thumbv7m-none-eabi
26+ rustup target add thumbv7em-none-eabihf
27+ rustup target add thumbv8m.base-none-eabi
28+ rustup target add thumbv8m.main-none-eabi
2429
2530 - name : cargo fmt --check
2631 run : find . -type f -name Cargo.toml -execdir cargo fmt --check --manifest-path {} +
@@ -29,76 +34,124 @@ jobs:
2934 check :
3035 name : check
3136 runs-on : ubuntu-22.04
37+ strategy :
38+ matrix :
39+ rticversion :
40+ - v0.5
41+ - v1
42+ - v2
3243 steps :
3344 - name : Checkout
3445 uses : actions/checkout@v3
3546
3647 - name : Cache Dependencies
3748 uses : Swatinem/rust-cache@v2
3849
39- - name : Install all Rust targets
40- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
50+ - name : Install Rust nightly
51+ run : |
52+ rustup toolchain install nightly
53+ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
54+
55+ - name : Configure Rust target (v6, v7, v8.b v8.m)
56+ run : |
57+ rustup target add thumbv6m-none-eabi
58+ rustup target add thumbv7m-none-eabi
59+ rustup target add thumbv7em-none-eabihf
60+ rustup target add thumbv8m.base-none-eabi
61+ rustup target add thumbv8m.main-none-eabi
62+
63+ - name : Install flip-link
64+ run : cargo install flip-link
4165
4266 - name : cargo check
43- run : find . -type f -name Cargo.toml -execdir cargo check --target-dir /tmp/build --manifest-path {} +
67+ if : ${{ matrix.rticversion != 'v2' }}
68+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo build --release --manifest-path {} +
69+
70+ - name : cargo check
71+ if : ${{ matrix.rticversion == 'v2' }}
72+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo +nightly build --release --manifest-path {} +
4473
4574 # Clippy
4675 clippy :
4776 name : Cargo clippy
4877 runs-on : ubuntu-22.04
78+ strategy :
79+ matrix :
80+ rticversion :
81+ - v0.5
82+ - v1
83+ - v2
84+
4985 steps :
5086 - name : Checkout
5187 uses : actions/checkout@v3
5288
5389 - name : Cache Dependencies
5490 uses : Swatinem/rust-cache@v2
5591
56- - name : Install all Rust targets
57- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
58-
59- - name : cargo clippy
60- run : find . -type f -name Cargo.toml -execdir cargo clippy --target-dir /tmp/build --manifest-path {} +
92+ - name : Install Rust nightly
93+ run : |
94+ rustup toolchain install nightly
95+ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
96+ rustup component add clippy --toolchain nightly-x86_64-unknown-linux-gnu
6197
98+ - name : Configure Rust target (v6, v7, v8.b v8.m)
99+ run : |
100+ rustup target add thumbv6m-none-eabi
101+ rustup target add thumbv7m-none-eabi
102+ rustup target add thumbv7em-none-eabihf
103+ rustup target add thumbv8m.base-none-eabi
104+ rustup target add thumbv8m.main-none-eabi
62105
63- # Compilation
64- buildv0_5 :
65- name : build v0.5
66- runs-on : ubuntu-22.04
67- steps :
68- - name : Checkout
69- uses : actions/checkout@v3
70-
71- - name : Cache Dependencies
72- uses : Swatinem/rust-cache@v2
106+ - name : cargo clippy
107+ if : ${{ matrix.rticversion != 'v2' }}
108+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo clippy --target-dir /tmp/build --manifest-path {} +
73109
74- - name : Install all Rust targets
75- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
76-
77- - name : Install flip-link
78- run : cargo install flip-link
110+ - name : cargo clippy
111+ if : ${{ matrix.rticversion == 'v2' }}
112+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo +nightly clippy --target-dir /tmp/build --manifest-path {} +
79113
80- - name : cargo build
81- run : find rtic_v0.5 -type f -name Cargo.toml -execdir cargo build --release --manifest-path {} +
82114
83115 # Compilation
84- buildv1 :
85- name : build v1
116+ build :
117+ name : build
86118 runs-on : ubuntu-22.04
119+ strategy :
120+ matrix :
121+ rticversion :
122+ - v0.5
123+ - v1
124+ - v2
87125 steps :
88126 - name : Checkout
89127 uses : actions/checkout@v3
90128
91129 - name : Cache Dependencies
92130 uses : Swatinem/rust-cache@v2
93131
94- - name : Install all Rust targets
95- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
132+ - name : Install Rust nightly
133+ run : |
134+ rustup toolchain install nightly
135+ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
136+
137+ - name : Configure Rust target (v6, v7, v8.b v8.m)
138+ run : |
139+ rustup target add thumbv6m-none-eabi
140+ rustup target add thumbv7m-none-eabi
141+ rustup target add thumbv7em-none-eabihf
142+ rustup target add thumbv8m.base-none-eabi
143+ rustup target add thumbv8m.main-none-eabi
96144
97145 - name : Install flip-link
98146 run : cargo install flip-link
99147
100148 - name : cargo build
101- run : find rtic_v1 -type f -name Cargo.toml -execdir cargo build --release --manifest-path {} +
149+ if : ${{ matrix.rticversion != 'v2' }}
150+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo build --release --manifest-path {} +
151+
152+ - name : cargo build
153+ if : ${{ matrix.rticversion == 'v2' }}
154+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo +nightly build --release --manifest-path {} +
102155
103156 check-dependabot-config :
104157 name : Ensure that `dependabot.yml` is up to date
@@ -122,8 +175,7 @@ jobs:
122175 - style
123176 - check
124177 - clippy
125- - buildv0_5
126- - buildv1
178+ - build
127179 - check-dependabot-config
128180 runs-on : ubuntu-22.04
129181 steps :
0 commit comments