Use XDG specification environment variables #802
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
push: | |
branches: master | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
RUST_FEATURES: "rodio-backend,lyric-finder,media-control,image,notify,clipboard" | |
jobs: | |
rust-ci: | |
if: github.event.pull_request.draft != true | |
strategy: | |
matrix: | |
os: [macOS-latest, windows-latest, ubuntu-latest] | |
toolchain: [stable] | |
include: | |
- os: ubuntu-latest | |
toolchain: beta | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install libssl-dev libasound2-dev libdbus-1-dev libxcb-shape0-dev libxcb-xfixes0-dev | |
if: ${{ runner.os == 'Linux' }} | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
id: install_toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: clippy, rustfmt | |
- name: Cache cargo deps | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-rustc-${{ steps.install_toolchain.outputs.cachekey }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-rustc-${{ steps.install_toolchain.outputs.cachekey }} | |
- name: Cargo format | |
run: cargo fmt --all -- --check | |
- name: Cargo test | |
run: cargo test --no-default-features --features ${{ env.RUST_FEATURES }} | |
- name: Cargo clippy with all features | |
run: cargo clippy --no-default-features --features ${{ env.RUST_FEATURES }} -- -D warnings | |
- name: Cargo clippy without features | |
run: cargo clippy --no-default-features -- -D warnings | |