embassy/.github/workflows/rust.yml

73 lines
2.0 KiB
YAML
Raw Normal View History

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
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
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-02-11 20:31:37 +01:00
curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.2.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: |
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_stable.sh
rm -rf target_ci_stable/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
2021-06-10 03:05:44 +02:00
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test
run: cd embassy && cargo test