2020-10-31 23:03:46 +01:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-11-15 20:14:59 +01:00
|
|
|
branches: [staging, trying, master]
|
2020-10-31 23:03:46 +01:00
|
|
|
pull_request:
|
2021-11-15 20:14:59 +01:00
|
|
|
branches: [master]
|
2020-10-31 23:03:46 +01:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
2021-10-12 01:48:06 +02:00
|
|
|
all:
|
2022-10-02 22:24:59 +02:00
|
|
|
runs-on: ubuntu-latest
|
2022-02-12 00:26:30 +01:00
|
|
|
needs: [build-nightly, build-stable, test]
|
2021-10-12 01:48:06 +02:00
|
|
|
steps:
|
|
|
|
- name: Done
|
|
|
|
run: exit 0
|
2022-02-12 00:26:30 +01:00
|
|
|
build-nightly:
|
2020-10-31 23:03:46 +01:00
|
|
|
runs-on: ubuntu-latest
|
2021-11-24 03:18:30 +01:00
|
|
|
permissions:
|
|
|
|
id-token: write
|
|
|
|
contents: read
|
2020-10-31 23:03:46 +01:00
|
|
|
steps:
|
2020-12-01 17:52:06 +01:00
|
|
|
- uses: actions/checkout@v2
|
2021-05-31 03:07:46 +02:00
|
|
|
with:
|
|
|
|
submodules: true
|
2021-11-15 20:14:59 +01:00
|
|
|
- name: Cache multiple paths
|
2021-07-28 15:24:45 +02:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2021-11-15 20:14:59 +01:00
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target_ci
|
|
|
|
key: rust3-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}
|
|
|
|
- name: build
|
2021-07-05 02:33:29 +02:00
|
|
|
run: |
|
2022-04-08 00:35:00 +02:00
|
|
|
curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.3.0/cargo-batch
|
2021-11-15 20:14:59 +01:00
|
|
|
chmod +x /usr/local/bin/cargo-batch
|
|
|
|
./ci.sh
|
|
|
|
rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
|
2022-02-12 00:26:30 +01:00
|
|
|
build-stable:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Cache multiple paths
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target_ci_stable
|
|
|
|
key: rust-stable-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}
|
|
|
|
- name: build
|
|
|
|
run: |
|
2022-04-08 00:35:00 +02:00
|
|
|
curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.3.0/cargo-batch
|
2022-02-12 00:26:30 +01:00
|
|
|
chmod +x /usr/local/bin/cargo-batch
|
|
|
|
./ci_stable.sh
|
|
|
|
rm -rf target_ci_stable/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
|
2021-06-10 03:05:44 +02:00
|
|
|
|
2021-07-06 04:23:51 +02:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-01-06 12:21:39 +01:00
|
|
|
|
|
|
|
- name: Test boot
|
|
|
|
working-directory: ./embassy-boot/boot
|
2023-04-20 10:56:59 +02:00
|
|
|
run: cargo test && cargo test --features nightly && cargo test --features "ed25519-dalek,nightly" && cargo test --features "ed25519-salty,nightly"
|
2023-01-06 12:21:39 +01:00
|
|
|
|
|
|
|
- name: Test sync
|
|
|
|
working-directory: ./embassy-sync
|
|
|
|
run: cargo test
|