You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
memflow-pcileech/.github/workflows/build.yml

82 lines
2.2 KiB
YAML

name: Build and test
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
4 years ago
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install libclang
uses: crazy-max/ghaction-chocolatey@master
with:
args: install llvm
- name: add clang path to $PATH env
shell: bash
run: echo "PATH=$PATH:C:\msys64\mingw64\bin" >> $GITHUB_ENV
4 years ago
- name: build
shell: bash
4 years ago
run: cargo build --workspace --verbose
- name: run tests
shell: bash
4 years ago
run: cargo test --workspace --verbose
- name: build examples
shell: bash
4 years ago
run: cargo build --workspace --examples --verbose
4 years ago
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
4 years ago
- name: install libusb-1.0
4 years ago
run: sudo apt-get install libusb-1.0-0-dev
4 years ago
- name: build
run: cargo build --workspace --verbose
4 years ago
- name: run tests
run: cargo test --workspace --verbose
- name: build examples
run: cargo build --workspace --examples --verbose
4 years ago
build-macos:
runs-on: macos-latest
4 years ago
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: install macports
run: |
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci
source ./macports-ci install
4 years ago
- name: install libusb-1.0
run: sudo port -vs install libusb-devel
4 years ago
- 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:
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
- run: rustup component add clippy
4 years ago
- name: check formatting
run: cargo fmt -- --check
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets