Skip to content

Commit

Permalink
update release workflow to use latest libusb and update instructions …
Browse files Browse the repository at this point in the history
…for windows users
  • Loading branch information
adamgreig committed Sep 30, 2023
1 parent 96aa2f4 commit 965ce73
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 33 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ on:
push:
tags:
- 'v*'
branches:
- ci

jobs:
build:
name: Create Release
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
run: |
rustup self update
rustup toolchain install stable --profile minimal
- name: Install additional targets
run: |
Expand All @@ -32,11 +32,11 @@ jobs:
- name: Download libusb DLLs for Windows
run: |
wget https://github.com/libusb/libusb/releases/download/v1.0.23/libusb-1.0.23.7z
wget https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26-binaries.7z
mkdir libusb
mv libusb-1.0.23.7z libusb/
mv libusb-1.0.26-binaries.7z libusb/
cd libusb
7z x libusb-1.0.23.7z
7z x libusb-1.0.26-binaries.7z
- name: Build for Linux x86_64
run: |
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Build for Windows x86_64
env:
PKG_CONFIG_ALLOW_CROSS: 1
RUSTFLAGS: -L ${{ github.workspace }}/libusb/MinGW64/dll/
RUSTFLAGS: -L ${{ github.workspace }}/libusb/libusb-1.0.26-binaries/libusb-MinGW-x64/bin/
run: |
cargo clean
cargo build --release --target x86_64-pc-windows-gnu
Expand All @@ -66,12 +66,14 @@ jobs:
body: |
In this release:
The following pre-built files are available:
* `ecpdap_linux_x86_64`: ecpdap software for Linux (64-bit)
* `ecpdap_windows_x86_64.exe`: ecpdap software for Windows (64-bit)
ecpdap recommends libusb be installed; on Linux it should suffice to install libusb-1.0, on Windows download the pre-built DLLs from [libusb.info](https://libusb.info/) and either install them system-wide or put them in the same directory as your executable. Without libusb, only the slower HID-based CMSIS-DAPv1 protocol is available.
ecpdap requires libusb:
* on Linux, it usually suffices to install libusb-1.0
* on Windows, download the pre-built DLLs from [libusb.info](https://libusb.info) and either install them system-wide or place `msys-usb-1.0.dll` from `libusb-MinGW-x64/bin` in the same directory as the ecpdap executable.
- name: Upload ecpdap for Linux x86_64
uses: actions/upload-release-asset@v1
Expand Down
33 changes: 15 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,32 @@ on:

jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Install libusb
run: |
sudo apt-get update
sudo apt-get install -y libusb-dev libusb-1.0
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v4
- name: Setup Rust
run: |
rustup self update
rustup toolchain install stable --profile minimal
- name: Run tests
run: cargo test --all
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Install libusb
run: |
sudo apt-get update
sudo apt-get install -y libusb-dev libusb-1.0
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Install Rust
run: |
rustup self update
rustup toolchain install stable --profile minimal
rustup component add clippy
- name: Clippy
run: cargo clippy
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ ECPDAP is also packaged for NixOS under the `ecpdap` attribute.

* You must have a working Rust compiler installed.
Visit [rustup.rs](https://rustup.rs) to install Rust.
* [libusb] is recommended to use the higher-speed CMSIS-DAPv2 protocol, where
supported by your probe.
* You may need to set up drivers or permissions to access the USB device.
* [libusb] is required to use the higher-speed CMSIS-DAPv2 protocol, where supported by your probe.
* You may need to set up drivers or permissions to access the USB device, see `drivers/` for details

To build and install for your user, without checking out the repository:

Expand Down

0 comments on commit 965ce73

Please sign in to comment.