name: Build and test on: [push, pull_request] env: CARGO_TERM_COLOR: always jobs: 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: build run: cargo build --workspace --verbose - name: run tests run: cargo test --workspace --verbose - name: build examples run: cargo build --workspace --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 build-macos: runs-on: macos-latest 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 - name: install libusb-1.0 run: sudo port -vs install libusb libusb-devel - 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' - run: rustup component add clippy - name: check formatting run: cargo fmt -- --check - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-targets