Skip to content

Update framework_lib to 0.6.1 from crates.io #25

Update framework_lib to 0.6.1 from crates.io

Update framework_lib to 0.6.1 from crates.io #25

Workflow file for this run

name: Build
on:
push:
branches: [ "**" ]
pull_request:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install libudev-dev
run: sudo apt-get update && sudo apt-get install -y libudev-dev
- uses: moonrepo/setup-rust@v1
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all --check
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-make
components: clippy
- name: Run Clippy
run: cargo make lint
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-make
components: clippy
- name: Run tests
run: cargo make test
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: linux
os: ubuntu-latest
use-cross: false
target: x86_64-unknown-linux-gnu
- build: freebsd
os: ubuntu-latest
use-cross: false
target: x86_64-unknown-freebsd
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install libudev-dev (Linux)
if: matrix.build == 'linux'
run: sudo apt-get update && sudo apt-get install -y libudev-dev
- name: Build FreeBSD
if: matrix.build == 'freebsd'
uses: vmactions/freebsd-vm@v1
with:
release: "15.0"
arch: x86_64
usesh: true
mem: 8192
sync: rsync
prepare: |
pkg install -y rust hidapi pkgconf
run: |
cargo build --release --locked
- name: Install cross
if: matrix.use-cross
uses: taiki-e/install-action@v2
with:
tool: cross
- uses: moonrepo/setup-rust@v1
if: matrix.build != 'freebsd'
with:
targets: ${{ matrix.target }}
- name: Build (without cross)
if: matrix.build != 'freebsd' && !matrix.use-cross
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Build (cross)
if: matrix.use-cross
run: cross build --release --locked --target ${{ matrix.target }}