aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/rust.yml29
-rw-r--r--Cargo.toml6
-rwxr-xr-xci.sh18
3 files changed, 53 insertions, 0 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
new file mode 100644
index 000000000..2cd3ba5d7
--- /dev/null
+++ b/.github/workflows/rust.yml
@@ -0,0 +1,29 @@
1name: Rust
2
3on:
4 push:
5 branches: [master]
6 pull_request:
7 branches: [master]
8 merge_group:
9
10env:
11 CARGO_TERM_COLOR: always
12
13jobs:
14 build-nightly:
15 runs-on: ubuntu-latest
16 steps:
17 - uses: actions/checkout@v2
18 - uses: actions/cache@v2
19 with:
20 path: |
21 ~/.cargo/registry
22 ~/.cargo/git
23 target
24 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
25
26 - name: Check fmt
27 run: cargo fmt -- --check
28 - name: Build
29 run: ./ci.sh
diff --git a/Cargo.toml b/Cargo.toml
index 3bdeb0cfb..a307a6cc3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,3 +26,9 @@ futures = { version = "0.3.17", default-features = false, features = ["async-awa
26 26
27embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.9" } 27embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.9" }
28num_enum = { version = "0.5.7", default-features = false } 28num_enum = { version = "0.5.7", default-features = false }
29
30[patch.crates-io]
31embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
32embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
33embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
34embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
diff --git a/ci.sh b/ci.sh
new file mode 100755
index 000000000..1b33564fb
--- /dev/null
+++ b/ci.sh
@@ -0,0 +1,18 @@
1#!/bin/bash
2
3set -euxo pipefail
4
5# build examples
6#==================
7
8(cd examples/rpi-pico-w; WIFI_NETWORK=foo WIFI_PASSWORD=bar cargo build --release)
9
10
11# build with log/defmt combinations
12#=====================================
13
14cargo build --target thumbv6m-none-eabi --features ''
15cargo build --target thumbv6m-none-eabi --features 'log'
16cargo build --target thumbv6m-none-eabi --features 'defmt'
17cargo build --target thumbv6m-none-eabi --features 'log,firmware-logs'
18cargo build --target thumbv6m-none-eabi --features 'defmt,firmware-logs'