diff options
| -rw-r--r-- | .github/workflows/rust.yml | 26 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rwxr-xr-x | ci_stable.sh | 30 |
3 files changed, 55 insertions, 2 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 767e42243..f1256320d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml | |||
| @@ -12,11 +12,11 @@ env: | |||
| 12 | jobs: | 12 | jobs: |
| 13 | all: | 13 | all: |
| 14 | runs-on: ubuntu-20.04 | 14 | runs-on: ubuntu-20.04 |
| 15 | needs: [build, test] | 15 | needs: [build-nightly, build-stable, test] |
| 16 | steps: | 16 | steps: |
| 17 | - name: Done | 17 | - name: Done |
| 18 | run: exit 0 | 18 | run: exit 0 |
| 19 | build: | 19 | build-nightly: |
| 20 | runs-on: ubuntu-latest | 20 | runs-on: ubuntu-latest |
| 21 | permissions: | 21 | permissions: |
| 22 | id-token: write | 22 | id-token: write |
| @@ -41,6 +41,28 @@ jobs: | |||
| 41 | chmod +x /usr/local/bin/cargo-batch | 41 | chmod +x /usr/local/bin/cargo-batch |
| 42 | ./ci.sh | 42 | ./ci.sh |
| 43 | rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}* | 43 | rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}* |
| 44 | build-stable: | ||
| 45 | runs-on: ubuntu-latest | ||
| 46 | steps: | ||
| 47 | - uses: actions/checkout@v2 | ||
| 48 | with: | ||
| 49 | submodules: true | ||
| 50 | - name: Cache multiple paths | ||
| 51 | uses: actions/cache@v2 | ||
| 52 | with: | ||
| 53 | path: | | ||
| 54 | ~/.cargo/bin/ | ||
| 55 | ~/.cargo/registry/index/ | ||
| 56 | ~/.cargo/registry/cache/ | ||
| 57 | ~/.cargo/git/db/ | ||
| 58 | target_ci_stable | ||
| 59 | key: rust-stable-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }} | ||
| 60 | - name: build | ||
| 61 | run: | | ||
| 62 | curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.1.0/cargo-batch | ||
| 63 | chmod +x /usr/local/bin/cargo-batch | ||
| 64 | ./ci_stable.sh | ||
| 65 | rm -rf target_ci_stable/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}* | ||
| 44 | 66 | ||
| 45 | test: | 67 | test: |
| 46 | runs-on: ubuntu-latest | 68 | runs-on: ubuntu-latest |
diff --git a/.gitignore b/.gitignore index 92f9a32b2..144dd703f 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | target | 1 | target |
| 2 | target_ci | 2 | target_ci |
| 3 | target_ci_stable | ||
| 3 | Cargo.lock | 4 | Cargo.lock |
| 4 | third_party | 5 | third_party |
| 5 | /Cargo.toml | 6 | /Cargo.toml |
diff --git a/ci_stable.sh b/ci_stable.sh new file mode 100755 index 000000000..c4ec30824 --- /dev/null +++ b/ci_stable.sh | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | set -euo pipefail | ||
| 4 | |||
| 5 | export CARGO_TARGET_DIR=$PWD/target_ci_stable | ||
| 6 | export RUSTFLAGS=-Dwarnings | ||
| 7 | export DEFMT_LOG=trace | ||
| 8 | |||
| 9 | sed -i 's/channel.*/channel = "stable"/g' rust-toolchain.toml | ||
| 10 | |||
| 11 | cargo batch \ | ||
| 12 | --- build --release --manifest-path embassy/Cargo.toml --target thumbv7em-none-eabi \ | ||
| 13 | --- build --release --manifest-path embassy/Cargo.toml --target thumbv7em-none-eabi --features log,executor-agnostic \ | ||
| 14 | --- build --release --manifest-path embassy/Cargo.toml --target thumbv7em-none-eabi --features defmt \ | ||
| 15 | --- build --release --manifest-path embassy/Cargo.toml --target thumbv6m-none-eabi --features defmt \ | ||
| 16 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52805,gpiote,time-driver-rtc1 \ | ||
| 17 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52810,gpiote,time-driver-rtc1 \ | ||
| 18 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52811,gpiote,time-driver-rtc1 \ | ||
| 19 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52820,gpiote,time-driver-rtc1 \ | ||
| 20 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52832,gpiote,time-driver-rtc1 \ | ||
| 21 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52833,gpiote,time-driver-rtc1,unstable-traits \ | ||
| 22 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features nrf9160-s,gpiote,time-driver-rtc1 \ | ||
| 23 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features nrf9160-ns,gpiote,time-driver-rtc1,unstable-traits \ | ||
| 24 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features nrf5340-app-s,gpiote,time-driver-rtc1,unstable-traits \ | ||
| 25 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features nrf5340-app-ns,gpiote,time-driver-rtc1 \ | ||
| 26 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features nrf5340-net,gpiote,time-driver-rtc1,unstable-traits \ | ||
| 27 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52840,gpiote,time-driver-rtc1 \ | ||
| 28 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52840,log,gpiote,time-driver-rtc1 \ | ||
| 29 | --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52840,defmt,gpiote,time-driver-rtc1,unstable-traits \ | ||
| 30 | --- build --release --manifest-path examples/nrf/Cargo.toml --target thumbv7em-none-eabi --no-default-features --out-dir out/examples/nrf --bin raw_spawn \ | ||
