aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxoviat <[email protected]>2021-03-19 09:09:56 -0500
committerxoviat <[email protected]>2021-03-19 09:09:56 -0500
commitc565deb34a22d3c93fe138bcd9fa5c0244b7bcb1 (patch)
treeeba11c1273f11871a47317902fbb5343f9ee3302
parent01fd0cd92d93306502dbe9714432cb00264c8e03 (diff)
ci: parallelize and use cache
-rw-r--r--.github/workflows/rust.yml89
-rwxr-xr-xci.sh33
2 files changed, 87 insertions, 35 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 17b8353e3..2ba650ee1 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -10,17 +10,100 @@ env:
10 CARGO_TERM_COLOR: always 10 CARGO_TERM_COLOR: always
11 11
12jobs: 12jobs:
13 build: 13 ci:
14 runs-on: ubuntu-latest 14 runs-on: ubuntu-latest
15 strategy:
16 matrix:
17 include:
18 - package: embassy
19 target: thumbv7em-none-eabi
20 - package: embassy
21 target: thumbv7em-none-eabi
22 features: log
23 - package: embassy
24 target: thumbv7em-none-eabi
25 features: defmt
26 - package: embassy
27 target: thumbv6m-none-eabi
28 features: defmt
29# - package: embassy-nrf-examples
30# target: thumbv7em-none-eabi
31 - package: embassy-nrf
32 target: thumbv7em-none-eabi
33 features: 52810
34 - package: embassy-nrf
35 target: thumbv7em-none-eabi
36 features: 52832
37 - package: embassy-nrf
38 target: thumbv7em-none-eabi
39 features: 52833
40 - package: embassy-nrf
41 target: thumbv7em-none-eabi
42 features: 52840
43 - package: embassy-nrf
44 target: thumbv7em-none-eabi
45 features: 52840,log
46 - package: embassy-nrf
47 target: thumbv7em-none-eabi
48 features: 52840,defmt
49 - package: embassy-stm32f4-examples
50 target: thumbv7em-none-eabi
51 features: stm32f405
52 - package: embassy-stm32f4
53 target: thumbv7em-none-eabi
54 features: stm32f405
55 - package: embassy-stm32f4
56 target: thumbv7em-none-eabi
57 features: stm32f405,defmt
58 - package: embassy-stm32l0
59 target: thumbv6m-none-eabi
60 features: stm32l0x2
61 - package: embassy-stm32l0
62 target: thumbv6m-none-eabi
63 features: stm32l0x2,defmt
15 64
16 steps: 65 steps:
17 - uses: actions/checkout@v2 66 - uses: actions/checkout@v2
18 - uses: actions-rs/toolchain@v1 67 - uses: actions-rs/toolchain@v1
19 with: 68 with:
20 toolchain: nightly 69 toolchain: nightly
70 target: ${{ matrix.target }}
21 components: rust-src, rustfmt 71 components: rust-src, rustfmt
22 override: true 72 override: true
23 - name: install 73 - name: cache
24 run: rustup target add thumbv7em-none-eabi thumbv6m-none-eabi 74 id: cache-target
75 uses: actions/cache@v2
76 with:
77 path: target
78 key: ${{ runner.os }}-${{ matrix.target }}
79 - uses: actions-rs/cargo@v1
80 with:
81 command: check
82 args: --package ${{ matrix.package }} --features=${{ matrix.features }}
83
84 fmt:
85 runs-on: ubuntu-latest
86 steps:
87 - uses: actions/checkout@v2
88 - uses: actions-rs/toolchain@v1
89 with:
90 toolchain: nightly
91 components: rustfmt
92 override: true
93 - uses: actions-rs/cargo@v1
94 with:
95 command: fmt
96 args: --all -- --check
97
98 nrf_examples:
99 runs-on: ubuntu-latest
100 steps:
101 - uses: actions/checkout@v2
102 - uses: actions-rs/toolchain@v1
103 with:
104 toolchain: nightly
105 components: rust-src, rustfmt
106 target: thumbv7em-none-eabi
107 override: true
25 - name: Build 108 - name: Build
26 run: ./ci.sh 109 run: ./ci.sh
diff --git a/ci.sh b/ci.sh
index 05b1d0ad7..62e59cf30 100755
--- a/ci.sh
+++ b/ci.sh
@@ -4,37 +4,6 @@ set -euxo pipefail
4 4
5cd $(dirname $0) 5cd $(dirname $0)
6 6
7cargo fmt --all -- --check
8
9# embassy std
10(cd embassy-std-examples; cargo build)
11
12# embassy embedded
13(cd embassy; cargo build --target thumbv7em-none-eabi)
14(cd embassy; cargo build --target thumbv7em-none-eabi --features log)
15(cd embassy; cargo build --target thumbv7em-none-eabi --features defmt)
16(cd embassy; cargo build --target thumbv6m-none-eabi --features defmt)
17
18# embassy-nrf 7# embassy-nrf
19 8
20(cd embassy-nrf-examples; cargo build --target thumbv7em-none-eabi --bins) 9(cd embassy-nrf-examples; cargo build --target thumbv7em-none-eabi --bins) \ No newline at end of file
21
22(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52810)
23#(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52811) # nrf52811-hal doesn't exist yet
24(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52832)
25(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52833)
26(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840)
27
28(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840,log)
29(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840,defmt)
30
31# embassy-stm32f4
32
33(cd embassy-stm32f4-examples; cargo build --target thumbv7em-none-eabi --bins --features stm32f405)
34(cd embassy-stm32f4; cargo build --target thumbv7em-none-eabi --features stm32f405)
35(cd embassy-stm32f4; cargo build --target thumbv7em-none-eabi --features stm32f405,defmt)
36
37# embassy-stm32l0
38
39(cd embassy-stm32l0; cargo build --target thumbv6m-none-eabi --features stm32l0x2)
40(cd embassy-stm32l0; cargo build --target thumbv6m-none-eabi --features stm32l0x2,defmt)