From 13cad64c299cec7d2ea5158a254e729db12a7495 Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Fri, 26 Aug 2022 03:42:33 +0100 Subject: [PATCH] remove unused dependencies & add GHA flow (#429) --- .github/workflows/build_and_test.yml | 27 ++++++++++++++++++++------ boards/arduino_nano_connect/Cargo.toml | 1 - boards/pimoroni-badger2040/Cargo.toml | 4 ---- boards/rp-pico/Cargo.toml | 4 ++-- boards/vcc-gnd-yd-rp2040/Cargo.toml | 9 --------- rp2040-hal-macros/Cargo.toml | 1 - 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 9e2d73f..f511ef1 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -2,7 +2,7 @@ on: [push, pull_request] name: Build and Test check jobs: builds: - name: "Build checks" + name: Build checks runs-on: ubuntu-20.04 strategy: matrix: @@ -16,26 +16,41 @@ jobs: target: thumbv6m-none-eabi override: true profile: minimal - - name: "Build workspace" + - name: Build workspace uses: actions-rs/cargo@v1 with: command: build args: ${{ matrix.mode }} --workspace ${{ matrix.features }} - - name: "Build workspace and examples" + - name: Build workspace and examples uses: actions-rs/cargo@v1 with: command: build args: ${{ matrix.mode }} --workspace --examples ${{ matrix.features }} - - name: "List built examples and clean" + - name: List built examples and clean run: rm -vrf target/thumbv6m-none-eabi/*/examples/* | sed -e "s/removed '\(.*\)'/\1/" | xargs -l basename | grep -Ev '(-|\.d)' - - name: "Test" + - name: Test uses: actions-rs/cargo@v1 with: command: test args: --tests --target x86_64-unknown-linux-gnu ${{ matrix.features }} - - name: "Test docs" + - name: Test docs uses: actions-rs/cargo@v1 with: command: test args: --doc --target x86_64-unknown-linux-gnu ${{ matrix.features }} + - name: Clean + uses: actions-rs/cargo@v1 + with: + command: clean + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + target: thumbv6m-none-eabi + override: true + profile: minimal + - name: Check unused deps + uses: aig787/cargo-udeps-action@v1 + with: + version: latest + args: ${{ matrix.mode }} --workspace ${{ matrix.features }} diff --git a/boards/arduino_nano_connect/Cargo.toml b/boards/arduino_nano_connect/Cargo.toml index 58110ed..f8d269c 100644 --- a/boards/arduino_nano_connect/Cargo.toml +++ b/boards/arduino_nano_connect/Cargo.toml @@ -16,7 +16,6 @@ rp2040-boot2 = { version = "0.2.0", optional = true } rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" } cortex-m-rt = { version = "0.7.0", optional = true } embedded-hal = { version = "0.2.4", features = ["unproven"] } -panic-probe = { version = "0.3.0", features = ["print-defmt"] } [dev-dependencies] panic-halt= "0.2.0" diff --git a/boards/pimoroni-badger2040/Cargo.toml b/boards/pimoroni-badger2040/Cargo.toml index d7dd3b1..288e69c 100644 --- a/boards/pimoroni-badger2040/Cargo.toml +++ b/boards/pimoroni-badger2040/Cargo.toml @@ -21,10 +21,6 @@ embedded-hal ="0.2.5" [dev-dependencies] panic-halt= "0.2.0" nb = "1.0" -embedded-graphics = "0.7.1" - -defmt = "0.3.0" -defmt-rtt = "0.3.0" [features] default = ["boot2", "rt"] diff --git a/boards/rp-pico/Cargo.toml b/boards/rp-pico/Cargo.toml index f85c5e9..f832aa9 100644 --- a/boards/rp-pico/Cargo.toml +++ b/boards/rp-pico/Cargo.toml @@ -17,8 +17,6 @@ rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" } cortex-m-rt = { version = "0.7", optional = true } fugit = "0.3.5" usb-device= "0.2.9" -usbd-serial = "0.1.1" -usbd-hid = "0.5.1" futures = { version = "0.3", default-features = false, optional = true } [dev-dependencies] @@ -38,6 +36,8 @@ hd44780-driver = "0.4.0" pio = "0.2.0" pio-proc = "0.2.1" critical-section = "1.0.0" +usbd-serial = "0.1.1" +usbd-hid = "0.5.1" defmt = "0.3.0" defmt-rtt = "0.3.0" diff --git a/boards/vcc-gnd-yd-rp2040/Cargo.toml b/boards/vcc-gnd-yd-rp2040/Cargo.toml index c36d37b..0a505ba 100644 --- a/boards/vcc-gnd-yd-rp2040/Cargo.toml +++ b/boards/vcc-gnd-yd-rp2040/Cargo.toml @@ -17,24 +17,15 @@ rp2040-hal = { path = "../../rp2040-hal", version = "0.5.0" } cortex-m-rt = { version = "0.7", optional = true } fugit = "0.3.5" usb-device= "0.2.9" -usbd-serial = "0.1.1" -usbd-hid = "0.5.1" futures = { version = "0.3", default-features = false, optional = true } [dev-dependencies] panic-halt= "0.2.0" embedded-hal ="0.2.5" -cortex-m-rtic = "1.1.2" nb = "1.0" -i2c-pio = "0.4.0" -heapless = "0.7.9" smart-leds = "0.3.0" ws2812-pio = "0.4.0" -ssd1306 = "0.7.0" -embedded-graphics = "0.7.1" -hd44780-driver = "0.4.0" pio = "0.2.0" -pio-proc = "0.2.1" [features] default = ["boot2", "rt"] diff --git a/rp2040-hal-macros/Cargo.toml b/rp2040-hal-macros/Cargo.toml index 64e6cfc..a00df82 100644 --- a/rp2040-hal-macros/Cargo.toml +++ b/rp2040-hal-macros/Cargo.toml @@ -12,7 +12,6 @@ proc-macro = true [dependencies] quote = "1.0" proc-macro2 = "1.0" -cortex-m-rt = "0.7.0" [dependencies.syn] features = ["extra-traits", "full"]