embassy/.github/workflows/rust.yml

73 lines
2 KiB
YAML
Raw Normal View History

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
2022-02-11 23:26:30 +00:00
needs: [build-nightly, build-stable, test]
2021-10-11 23:48:06 +00:00
steps:
- name: Done
run: exit 0
2022-02-11 23:26:30 +00:00
build-nightly:
2020-10-31 22:03:46 +00:00
runs-on: ubuntu-latest
2021-11-24 02:18:30 +00:00
permissions:
id-token: write
contents: read
2020-10-31 22:03:46 +00:00
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
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: |
2022-04-07 22:35:00 +00: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 19:14:59 +00:00
chmod +x /usr/local/bin/cargo-batch
./ci.sh
rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
2022-02-11 23:26:30 +00: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-07 22:35:00 +00: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-11 23:26:30 +00: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 01:05:44 +00:00
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test
run: cd embassy && cargo test