Skip to content

Clean flatpak builder remnants #472

Clean flatpak builder remnants

Clean flatpak builder remnants #472

Workflow file for this run

name: Test
on:
push:
branches: ["main", "devel"]
pull_request:
branches: ["main"]
# Run this workflow also when a PR becomes ready for review; this enables us
# to open automated PRs as draft, and then explicitly make them ready for
# review manually to trigger the workflow.
types: [opened, reopened, synchronize, ready_for_review]
env:
CARGO_TERM_COLOR: always
jobs:
flatpak:
name: Lint flatpak manifest and metadata
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub/flatpak-builder-lint:latest
steps:
- uses: actions/checkout@v4
- run: flatpak-builder-lint appstream resources/de.swsnr.turnon.metainfo.xml.in
- run: flatpak-builder-lint manifest flatpak/de.swsnr.turnon.yaml
# See https://mozilla.github.io/cargo-vet/configuring-ci.html
cargo-vet:
name: Vet Dependencies
runs-on: ubuntu-latest
env:
CARGO_VET_VERSION: 0.10.0
steps:
- uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
with:
path: ${{ runner.tool_cache }}/cargo-vet
key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }}
- run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH
- run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet
- run: cargo vet --locked
build:
name: Build & lint
runs-on: ubuntu-latest
container:
image: ghcr.io/gtk-rs/gtk4-rs/gtk4:latest
env:
# Skip blueprint compilation because the gtk4-rs container lacks the
# typelib files required for blueprint to resolve imports.
SKIP_BLUEPRINT: 1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
components: rustfmt, clippy
# See https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-rust-${{ steps.toolchain.outputs.cachekey }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo fmt --check
- run: blueprint-compiler format resources/**/*.blp
# Make the glob work
shell: bash
- run: cargo build
- run: cargo clippy --all-targets
- run: cargo test
- name: cargo deny check
uses: EmbarkStudios/cargo-deny-action@v2
- run: appstreamcli validate --explain resources/de.swsnr.turnon.metainfo.xml