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 dbeac7f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 32 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ jobs:
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 +30,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.25/libusb-1.0.25.7z
mkdir libusb
mv libusb-1.0.23.7z libusb/
mv libusb-1.0.25.7z libusb/
cd libusb
7z x libusb-1.0.23.7z
7z x libusb-1.0.25.7z
- name: Build for Linux x86_64
run: |
Expand Down Expand Up @@ -66,12 +64,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 place `libusb-1.0.dll` from `MinGW64/dll` 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 dbeac7f

Please sign in to comment.