Repository navigation
feat: Move generated app state to XDG state/cache dirs #461
Workflow file for this run
This file contains hidden or 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
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| name: Continuous Integration | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Workaround for making Github Actions skip based on commit message `[skip ci]` | |
| # Source https://gist.github.com/ybiquitous/c80f15c18319c63cae8447a3be341267 | |
| prepare: | |
| runs-on: ubuntu-latest | |
| if: | | |
| !contains(format('{0} {1} {2}', github.event.head_commit.message, github.event.pull_request.title, github.event.pull_request.body), '[skip ci]') | |
| steps: | |
| - run: | | |
| cat <<'MESSAGE' | |
| github.event_name: ${{ toJson(github.event_name) }} | |
| github.event: | |
| ${{ toJson(github.event) }} | |
| MESSAGE | |
| check: | |
| name: Check (${{ matrix.name }}) | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Default `cargo run` build. | |
| - name: default | |
| args: "--locked" | |
| # The exact feature set shipped for Linux by cd.yml, so every new | |
| # source subsystem (local-files, subsonic, internet-radio, youtube) | |
| # and cover-art is compiled and tested in CI. | |
| - name: all-sources | |
| args: "--locked --no-default-features --features telemetry,streaming,discord-rpc,cover-art,self-update,scripting,audio-viz,mpris,local-files,subsonic,internet-radio,youtube" | |
| # Slim build used for fast local iteration (matches CLAUDE.md). | |
| - name: slim | |
| args: "--locked --no-default-features --features telemetry" | |
| env: | |
| RUSTFLAGS: "-C linker-features=-lld" | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| override: true | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libpipewire-0.3-dev libspa-0.2-dev libasound2-dev | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: ${{ matrix.args }} | |
| test: | |
| name: Test Suite (${{ matrix.name }}) | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: default | |
| args: "--locked" | |
| - name: all-sources | |
| args: "--locked --no-default-features --features telemetry,streaming,discord-rpc,cover-art,self-update,scripting,audio-viz,mpris,local-files,subsonic,internet-radio,youtube" | |
| - name: slim | |
| args: "--locked --no-default-features --features telemetry" | |
| env: | |
| RUSTFLAGS: "-C linker-features=-lld" | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| override: true | |
| # These dependencies are required for `clipboard` and the audio backends. | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libpipewire-0.3-dev libspa-0.2-dev libasound2-dev | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: ${{ matrix.args }} | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| override: true | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| clippy: | |
| name: Clippy (${{ matrix.name }}) | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: default | |
| args: "--locked" | |
| - name: all-sources | |
| args: "--locked --no-default-features --features telemetry,streaming,discord-rpc,cover-art,self-update,scripting,audio-viz,mpris,local-files,subsonic,internet-radio,youtube" | |
| - name: slim | |
| args: "--locked --no-default-features --features telemetry" | |
| env: | |
| RUSTFLAGS: "-C linker-features=-lld" | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| override: true | |
| components: clippy | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libpipewire-0.3-dev libspa-0.2-dev libasound2-dev | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: ${{ matrix.args }} -- -D warnings |