diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 000000000..93b20ab3f --- /dev/null +++ b/.cargo/config @@ -0,0 +1,2 @@ +[unstable] +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 @@ +name: Rust + +on: + push: + branches: [master] + pull_request: + branches: [master] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + target: thumbv7em-none-eabi + override: true + - name: Build + 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 = [] defmt-info = [] defmt-warn = [] defmt-error = [] +defmt = [ "dep:defmt", "smoltcp/defmt" ] [dependencies] 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> { } fn to_ioerr(e: Error) -> io::Error { - warn!("smoltcp err: {:?}", e); // todo io::Error::Other } 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 @@ set -euxo pipefail -# embassy std -(cd embassy; cargo build --features log,std) +# build for std +(cd embassy-net; cargo build --features log) -# embassy embedded -(cd embassy; cargo build --target thumbv7em-none-eabi) -(cd embassy; cargo build --target thumbv7em-none-eabi --features log) -(cd embassy; cargo build --target thumbv7em-none-eabi --features defmt) - -# embassy-nrf - -(cd embassy-nrf-examples; cargo build --target thumbv7em-none-eabi --bins) - -(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52810) -#(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52811) # nrf52811-hal doesn't exist yet -(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52832) -(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52833) -(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840) - -(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840,log) -(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52840,defmt) +# build for embedded +(cd embassy-net; cargo build --target thumbv7em-none-eabi --features log) +(cd embassy-net; cargo build --target thumbv7em-none-eabi --features defmt) +# build examples +(cd embassy-net-examples; cargo build)