build #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -Dwarnings | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install libgtk-3-dev libgtk-layer-shell-dev libdbusmenu-gtk3-dev | |
- uses: actions/checkout@v4 | |
- name: Setup rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy,rustfmt | |
- name: Load rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Setup problem matchers | |
uses: r7kamura/rust-problem-matchers@v1 | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Run tests | |
run: cargo test | |
- name: Check with default features | |
run: cargo clippy | |
- name: Check x11 only | |
run: cargo clippy --no-default-features --features=x11 | |
- name: Check wayland only | |
run: cargo clippy --no-default-features --features=wayland | |
- name: Check no-backend | |
run: cargo clippy --no-default-features |