Skip to content

Rewrite CI build workflow #902

Rewrite CI build workflow

Rewrite CI build workflow #902

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '-Dwarnings'
jobs:
rustfmt:
runs-on: ubuntu-latest
name: 'Formatting'
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
name: 'Clippy'
steps:
- uses: actions/checkout@v4
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev libgtk-layer-shell-dev
- name: Clippy - Base features
run: cargo clippy --no-default-features --features config+json
- name: Clippy - All features
run: cargo clippy --all-targets --all-features
build:
name: 'Build & Test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
name: Cache dependencies
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev libgtk-layer-shell-dev
- name: Build
run: cargo build --verbose
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test