Skip to content

chore: Bump cargo version to 0.8.1 #376

chore: Bump cargo version to 0.8.1

chore: Bump cargo version to 0.8.1 #376

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
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:
bins: cargo-make
components: rustfmt,clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "lint"
- name: Check formatting
run: cargo fmt --all --check
- name: Run Clippy
run: cargo make lint
- name: Run tests
run: cargo make test
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: freebsd
os: ubuntu-latest
target: x86_64-unknown-freebsd
- build: windows
os: windows-2025
target: x86_64-pc-windows-msvc
# TODO: Remove rustflags workaround when framework_lib updates to built v0.8+ with gix feature.
# Issue: libgit2-sys v0.14.x doesn't link advapi32.lib on Windows.
# See: https://github.com/rust-lang/git2-rs/issues/1016
rustflags: "-C link-arg=advapi32.lib"
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
- uses: moonrepo/setup-rust@v1
if: matrix.build != 'freebsd'
with:
targets: ${{ matrix.target }}
- name: Rust Cache
if: matrix.build != 'freebsd'
uses: Swatinem/rust-cache@v2
with:
shared-key: "build-${{ matrix.target }}"
cache-on-failure: true
- name: Build
if: matrix.build != 'freebsd'
run: cargo build --release --locked
env:
RUSTFLAGS: ${{ matrix.rustflags }}