2020-10-31 22:03:46 +00:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-11-15 19:14:59 +00:00
|
|
|
branches: [staging, trying, master]
|
2020-10-31 22:03:46 +00:00
|
|
|
pull_request:
|
2021-11-15 19:14:59 +00:00
|
|
|
branches: [master]
|
2020-10-31 22:03:46 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
2021-10-11 23:48:06 +00:00
|
|
|
all:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-11-15 19:14:59 +00:00
|
|
|
needs: [build, test, metapac_gen]
|
2021-10-11 23:48:06 +00:00
|
|
|
steps:
|
|
|
|
- name: Done
|
|
|
|
run: exit 0
|
|
|
|
build:
|
2020-10-31 22:03:46 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-12-01 16:52:06 +00:00
|
|
|
- uses: actions/checkout@v2
|
2021-05-31 01:07:46 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2021-11-15 19:14:59 +00:00
|
|
|
- name: Cache multiple paths
|
2021-07-28 13:24:45 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2021-11-15 19:14:59 +00: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 00:33:29 +00:00
|
|
|
run: |
|
2021-11-15 19:14:59 +00:00
|
|
|
curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.1.0/cargo-batch
|
|
|
|
chmod +x /usr/local/bin/cargo-batch
|
|
|
|
./ci.sh
|
|
|
|
rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
|
2021-06-10 01:05:44 +00:00
|
|
|
|
2021-07-06 02:23:51 +00:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Test
|
2021-07-28 13:24:45 +00:00
|
|
|
run: cd embassy && cargo test
|
2021-07-06 02:23:51 +00:00
|
|
|
|
2021-06-10 01:05:44 +00:00
|
|
|
metapac_gen:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Generate pregenerated metapac
|
2021-07-28 13:24:45 +00:00
|
|
|
run: cd stm32-metapac-gen; cargo run --release
|