diff options
| -rw-r--r-- | .github/workflows/rust.yml | 29 | ||||
| -rw-r--r-- | Cargo.toml | 6 | ||||
| -rwxr-xr-x | ci.sh | 18 |
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 @@ | |||
| 1 | name: Rust | ||
| 2 | |||
| 3 | on: | ||
| 4 | push: | ||
| 5 | branches: [master] | ||
| 6 | pull_request: | ||
| 7 | branches: [master] | ||
| 8 | merge_group: | ||
| 9 | |||
| 10 | env: | ||
| 11 | CARGO_TERM_COLOR: always | ||
| 12 | |||
| 13 | jobs: | ||
| 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 | ||
| 27 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.9" } | 27 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.9" } |
| 28 | num_enum = { version = "0.5.7", default-features = false } | 28 | num_enum = { version = "0.5.7", default-features = false } |
| 29 | |||
| 30 | [patch.crates-io] | ||
| 31 | embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } | ||
| 32 | embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } | ||
| 33 | embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } | ||
| 34 | embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } | ||
| @@ -0,0 +1,18 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | set -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 | |||
| 14 | cargo build --target thumbv6m-none-eabi --features '' | ||
| 15 | cargo build --target thumbv6m-none-eabi --features 'log' | ||
| 16 | cargo build --target thumbv6m-none-eabi --features 'defmt' | ||
| 17 | cargo build --target thumbv6m-none-eabi --features 'log,firmware-logs' | ||
| 18 | cargo build --target thumbv6m-none-eabi --features 'defmt,firmware-logs' | ||
