Skip to content

deps: Lock file maintenance (#134) #487

deps: Lock file maintenance (#134)

deps: Lock file maintenance (#134) #487

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libayatana-appindicator3-dev
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: linux-x64
cache-on-failure: true
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
build-and-test:
name: Build & Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cache-key: linux-x64
- os: macos-latest
target: aarch64-apple-darwin
cache-key: macos-universal
- os: windows-latest
target: x86_64-pc-windows-msvc
cache-key: windows-x64
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libayatana-appindicator3-dev
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.cache-key }}
cache-on-failure: true
- name: Run tests
run: cargo test --all
- name: Build
run: cargo build --release --target ${{ matrix.target }}