aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/rust.yml
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-02-12 00:30:47 +0000
committerGitHub <[email protected]>2022-02-12 00:30:47 +0000
commite728a32672d9cb108d73ba017a6a153dbc6c2d15 (patch)
tree25cdf290d138929ebf0ff292fc6934e0a266400a /.github/workflows/rust.yml
parentd708be7fe5e8fec8f2feea269fcb6964b6c73dcb (diff)
parent1904906b363d2bbe32e95546f53201a3179dcb60 (diff)
Merge #613
613: Rust stable support r=Dirbaio a=Dirbaio This PR adds (limited) stable Rust support! The drawbacks are: - No `#[embassy::task]`, `#[embassy::main]`. (requires `type_alias_impl_trait`). You have to manually allocate the tasks somewhere they'll live forever. See [example](https://github.com/embassy-rs/embassy/blob/master/examples/nrf/src/bin/raw_spawn.rs) - No async trait impls (requires GATs). Note that the full API surface of HALs is still available through inherent methods: #552 #581 - Some stuff is not constructible in const (requires `const_fn_trait_bound`), although there's an (ugly) workaround for the generic `Mutex`. So it's not that bad in the end, it's fully usable for shipping production-ready firmwares. We'll still recommend nightly as the default, until GATs and `type_alias_impl_trait` are stable. Co-authored-by: Dario Nieuwenhuis <[email protected]>
Diffstat (limited to '.github/workflows/rust.yml')
-rw-r--r--.github/workflows/rust.yml26
1 files changed, 24 insertions, 2 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 767e42243..f1256320d 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -12,11 +12,11 @@ env:
12jobs: 12jobs:
13 all: 13 all:
14 runs-on: ubuntu-20.04 14 runs-on: ubuntu-20.04
15 needs: [build, test] 15 needs: [build-nightly, build-stable, test]
16 steps: 16 steps:
17 - name: Done 17 - name: Done
18 run: exit 0 18 run: exit 0
19 build: 19 build-nightly:
20 runs-on: ubuntu-latest 20 runs-on: ubuntu-latest
21 permissions: 21 permissions:
22 id-token: write 22 id-token: write
@@ -41,6 +41,28 @@ jobs:
41 chmod +x /usr/local/bin/cargo-batch 41 chmod +x /usr/local/bin/cargo-batch
42 ./ci.sh 42 ./ci.sh
43 rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}* 43 rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
44 build-stable:
45 runs-on: ubuntu-latest
46 steps:
47 - uses: actions/checkout@v2
48 with:
49 submodules: true
50 - name: Cache multiple paths
51 uses: actions/cache@v2
52 with:
53 path: |
54 ~/.cargo/bin/
55 ~/.cargo/registry/index/
56 ~/.cargo/registry/cache/
57 ~/.cargo/git/db/
58 target_ci_stable
59 key: rust-stable-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}
60 - name: build
61 run: |
62 curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.1.0/cargo-batch
63 chmod +x /usr/local/bin/cargo-batch
64 ./ci_stable.sh
65 rm -rf target_ci_stable/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
44 66
45 test: 67 test:
46 runs-on: ubuntu-latest 68 runs-on: ubuntu-latest