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:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-11-24 01:43:53 +01:00
|
|
|
needs: [build, test]
|
2021-10-12 01:48:06 +02:00
|
|
|
steps:
|
|
|
|
- name: Done
|
|
|
|
run: exit 0
|
|
|
|
build:
|
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: |
|
2021-11-15 20:14:59 +01: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 03:05:44 +02:00
|
|
|
|
2021-07-06 04:23:51 +02:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Test
|
2021-07-28 15:24:45 +02:00
|
|
|
run: cd embassy && cargo test
|