diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-02-03 05:15:13 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-02-03 05:15:13 +0100 |
| commit | 10cd5bddc91280009d6951e34a67b1a01c7e2166 (patch) | |
| tree | a66730a16751a1565e61b1853b64f660dff23218 | |
| parent | cb5931d583d283dda3a1b5ed2014c086bb8f98ae (diff) | |
Add CI
| -rw-r--r-- | .cargo/config | 2 | ||||
| -rw-r--r-- | .github/workflows/rust.yml | 24 | ||||
| -rw-r--r-- | embassy-net/Cargo.toml | 1 | ||||
| -rw-r--r-- | embassy-net/src/tcp_socket.rs | 1 | ||||
| -rwxr-xr-x | test-build.sh | 26 |
5 files changed, 34 insertions, 20 deletions
diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 000000000..93b20ab3f --- /dev/null +++ b/.cargo/config | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | [unstable] | ||
| 2 | namespaced-features = true \ No newline at end of file | ||
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 000000000..a0eefd3a9 --- /dev/null +++ b/.github/workflows/rust.yml | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | name: Rust | ||
| 2 | |||
| 3 | on: | ||
| 4 | push: | ||
| 5 | branches: [master] | ||
| 6 | pull_request: | ||
| 7 | branches: [master] | ||
| 8 | |||
| 9 | env: | ||
| 10 | CARGO_TERM_COLOR: always | ||
| 11 | |||
| 12 | jobs: | ||
| 13 | build: | ||
| 14 | runs-on: ubuntu-latest | ||
| 15 | |||
| 16 | steps: | ||
| 17 | - uses: actions/checkout@v2 | ||
| 18 | - uses: actions-rs/toolchain@v1 | ||
| 19 | with: | ||
| 20 | toolchain: nightly | ||
| 21 | target: thumbv7em-none-eabi | ||
| 22 | override: true | ||
| 23 | - name: Build | ||
| 24 | run: ./test-build.sh | ||
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index aec6b7965..185992ddc 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -11,6 +11,7 @@ defmt-debug = [] | |||
| 11 | defmt-info = [] | 11 | defmt-info = [] |
| 12 | defmt-warn = [] | 12 | defmt-warn = [] |
| 13 | defmt-error = [] | 13 | defmt-error = [] |
| 14 | defmt = [ "dep:defmt", "smoltcp/defmt" ] | ||
| 14 | 15 | ||
| 15 | [dependencies] | 16 | [dependencies] |
| 16 | 17 | ||
diff --git a/embassy-net/src/tcp_socket.rs b/embassy-net/src/tcp_socket.rs index 7f4eb014c..eab8189de 100644 --- a/embassy-net/src/tcp_socket.rs +++ b/embassy-net/src/tcp_socket.rs | |||
| @@ -112,7 +112,6 @@ impl<'a> TcpSocket<'a> { | |||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | fn to_ioerr(e: Error) -> io::Error { | 114 | fn to_ioerr(e: Error) -> io::Error { |
| 115 | warn!("smoltcp err: {:?}", e); | ||
| 116 | // todo | 115 | // todo |
| 117 | io::Error::Other | 116 | io::Error::Other |
| 118 | } | 117 | } |
diff --git a/test-build.sh b/test-build.sh index f67cc5b2b..ec35f5da3 100755 --- a/test-build.sh +++ b/test-build.sh | |||
| @@ -2,24 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | set -euxo pipefail | 3 | set -euxo pipefail |
| 4 | 4 | ||
| 5 | # embassy std | 5 | # build for std |
| 6 | (cd embassy; cargo build --features log,std) | 6 | (cd embassy-net; cargo build --features log) |
| 7 | 7 | ||
| 8 | # embassy embedded | 8 | # build for embedded |
| 9 | (cd embassy; cargo build --target thumbv7em-none-eabi) | 9 | (cd embassy-net; cargo build --target thumbv7em-none-eabi --features log) |
| 10 | (cd embassy; cargo build --target thumbv7em-none-eabi --features log) | 10 | (cd embassy-net; cargo build --target thumbv7em-none-eabi --features defmt) |
| 11 | (cd embassy; cargo build --target thumbv7em-none-eabi --features defmt) | ||
| 12 | |||
| 13 | # embassy-nrf | ||
| 14 | |||
| 15 | (cd embassy-nrf-examples; cargo build --target thumbv7em-none-eabi --bins) | ||
| 16 | |||
| 17 | (cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52810) | ||
| 18 | #(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52811) # nrf52811-hal doesn't exist yet | ||
| 19 | (cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52832) | ||
| 20 | (cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52833) | ||
| 21 | (cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840) | ||
| 22 | |||
| 23 | (cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840,log) | ||
| 24 | (cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840,defmt) | ||
| 25 | 11 | ||
| 12 | # build examples | ||
| 13 | (cd embassy-net-examples; cargo build) | ||
