aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-02-03 05:15:13 +0100
committerDario Nieuwenhuis <[email protected]>2021-02-03 05:15:13 +0100
commit10cd5bddc91280009d6951e34a67b1a01c7e2166 (patch)
treea66730a16751a1565e61b1853b64f660dff23218
parentcb5931d583d283dda3a1b5ed2014c086bb8f98ae (diff)
Add CI
-rw-r--r--.cargo/config2
-rw-r--r--.github/workflows/rust.yml24
-rw-r--r--embassy-net/Cargo.toml1
-rw-r--r--embassy-net/src/tcp_socket.rs1
-rwxr-xr-xtest-build.sh26
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]
2namespaced-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 @@
1name: Rust
2
3on:
4 push:
5 branches: [master]
6 pull_request:
7 branches: [master]
8
9env:
10 CARGO_TERM_COLOR: always
11
12jobs:
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 = []
11defmt-info = [] 11defmt-info = []
12defmt-warn = [] 12defmt-warn = []
13defmt-error = [] 13defmt-error = []
14defmt = [ "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
114fn to_ioerr(e: Error) -> io::Error { 114fn 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
3set -euxo pipefail 3set -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)