Updated github actions

pull/7/head
ko1N 4 years ago
parent ada67bae28
commit 6580b3ca14

@ -7,7 +7,24 @@ env:
jobs: jobs:
build-windows: build_ubuntu_x86-64:
name: Build for ubuntu-latest (x86-64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install libusb-1.0
run: sudo apt-get install libusb-1.0-0-dev
- name: build
run: cargo build --workspace --all-features --verbose
- name: run tests
run: cargo test --workspace --verbose
- name: build examples
run: cargo build --workspace --all-features --examples --verbose
build_windows_x86-64:
name: Build for windows-latest (x86-64)
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -22,28 +39,13 @@ jobs:
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: build - name: build
shell: bash shell: bash
run: cargo build --workspace --verbose run: cargo build --workspace --all-features --verbose
- name: run tests - name: run tests
shell: bash shell: bash
run: cargo test --workspace --verbose run: cargo test --workspace --verbose
- name: build examples - name: build examples
shell: bash shell: bash
run: cargo build --workspace --examples --verbose run: cargo build --workspace --all-features --examples --verbose
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install libusb-1.0
run: sudo apt-get install libusb-1.0-0-dev
- name: build
run: cargo build --workspace --verbose
- name: run tests
run: cargo test --workspace --verbose
- name: build examples
run: cargo build --workspace --examples --verbose
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest

@ -0,0 +1,81 @@
name: Release binaries
on:
release:
types: [created]
env:
CARGO_TERM_COLOR: always
jobs:
build_ubuntu_x86-64:
name: Build artifacts for ubuntu-latest (x86-64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install libusb-1.0
run: sudo apt-get install libusb-1.0-0-dev
- name: build
run: cargo build --workspace --all-features --verbose
- uses: actions/upload-artifact@v2
with:
name: library-ubuntu
path: target/release/*.so
build_windows_x86-64:
name: Build artifacts for windows-latest (x86-64)
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install llvm and clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
directory: ${{ runner.temp }}/llvm
- name: set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: build
shell: bash
run: cargo build --workspace --all-features --verbose
- uses: actions/upload-artifact@v2
with:
name: library-windows
path: target/release/*.dll
publish_artifacts:
name: Publish artifacts for x86-64/windows-latest
runs-on: ubuntu-latest
needs: [build_ubuntu_x86-64, build_windows_x86-64, build_macos_x86-64]
steps:
- uses: actions/download-artifact@v2
with:
name: library-ubuntu
- name: Upload ubuntu artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: '*.so'
- uses: actions/download-artifact@v2
with:
name: library-windows
- name: Upload windows artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: '*.dll'
- uses: actions/download-artifact@v2
with:
name: library-macos
- name: Upload macos artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: '*.dylib'

@ -17,7 +17,7 @@ Install the following build tools:
- clang - clang
- libusb-1.0 (only required on linux) - libusb-1.0 (only required on linux)
Make sure that libclang can be found by either adding it to your `PATH` or via the `LIBCLANG_PATH=` environment variable. Make sure that libclang can be found by either adding it to your `PATH` or via the `LIBCLANG_PATH` environment variable.
On Windows you additionally need to supply the proprietary `FTD3XX.dll`. It can be downloaded from the [FTDI Website](https://www.ftdichip.com/Drivers/D3XX.htm) in the `Application Library (DLL)` column. On Windows you additionally need to supply the proprietary `FTD3XX.dll`. It can be downloaded from the [FTDI Website](https://www.ftdichip.com/Drivers/D3XX.htm) in the `Application Library (DLL)` column.

Loading…
Cancel
Save