From 65d130175a773aa0b09992adc12c1d87ebf2f782 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Mon, 15 Jun 2020 16:09:31 +0200 Subject: [PATCH 1/3] Create rust.yml --- .github/workflows/rust.yml | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..3ef2a84 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,62 @@ +name: Rust + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: check out repository + uses: actions/checkout@v2 + + - name: set up rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: set up actions.rs + uses: actions-rs/cargo@v1 + + - name: cache rust dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: cache linux dependencies + uses: actions/cache@v2 + if: startsWith(runner.os, 'Linux') + with: + path: ~/.local/share/renv + key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} + restore-keys: | + ${{ runner.os }}-renv- + + - name: install all dependencies + run: | + sudo apt-get install libudev-dev libusb-1.0-0-dev + rustup +stable target add thumbv7em-none-eabi + + - name: build tools + working-directory: ./tools + run: cargo build --verbose + + - name: build beginner/apps + working-directory: ./beginner/apps + run: cargo build --verbose + + - name: build advanced/common/usb + working-directory: ./advanced/common/usb + run: cargo build --verbose From 95de849c4a1ba57d8fb4ebc8386c993f59930453 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Tue, 16 Jun 2020 16:33:32 +0200 Subject: [PATCH 2/3] drive-by: note libusb and libudev-dev deps --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 44f1468..8ec2144 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,15 @@ $ nrfutil version nrfutil version 6.1.0 ``` -### USB permissions (Linux only) +### USB (Linux only) + +Some of our tools depend on `pkg-config` and `libudev.pc`. Ensure you have the proper packages installed; on Debian based distributions you can use: + +``` console +$ sudo apt-get install libudev-dev libusb-1.0-0-dev +``` + +To access the USB devices as a non-root user, follow these steps: 1. (Optional) Connect the dongle and check its permissions with these commands: From b50f46ae59fc29f3c3822ec4e42bc3c3aa55abc9 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Wed, 17 Jun 2020 11:16:40 +0200 Subject: [PATCH 3/3] build advanced/irmware instead --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3ef2a84..17e339c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -57,6 +57,6 @@ jobs: working-directory: ./beginner/apps run: cargo build --verbose - - name: build advanced/common/usb - working-directory: ./advanced/common/usb + - name: build advanced/firmware + working-directory: ./advanced/firmware run: cargo build --verbose