Port AppWindow to blueprints #122
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
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- "README.md" | |
- "PKGBUILD" | |
- ".vscode/**" | |
pull_request: | |
paths-ignore: | |
- "README.md" | |
- "PKGBUILD" | |
- ".vscode/**" | |
name: CI | |
env: | |
KCSHOT_UBUNTU_DEPS: libdbus-1-dev pkg-config libgtk-4-dev libcairo-gobject2 libcairo2-dev meson ninja-build desktop-file-utils | |
permissions: | |
contents: read | |
# Given that this job can get quite expensive at times, we ensure that for a given PR/branch, | |
# we cancel previous jobs on new pushes. | |
# See: | |
# - this Stackoverflow post: https://stackoverflow.com/a/72408109 | |
# - GitHub docs on the matter: https://docs.github.com/en/actions/using-jobs/using-concurrency | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
rustfmt: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
id: toolchain-install | |
with: | |
components: rustfmt | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ steps.toolchain-install.outputs.cachekey }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock')}} | |
- run: cargo +nightly fmt --all -- --check | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- run: | | |
sudo apt-get update -y | |
sudo apt install -y $KCSHOT_UBUNTU_DEPS | |
- uses: actions/checkout@v3 | |
- name: Setup toolchain | |
uses: dtolnay/rust-toolchain@stable | |
id: toolchain-install | |
with: | |
components: clippy | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
subprojects/blueprint-compiler/ | |
builddir/ | |
key: ${{ runner.os }}-${{ steps.toolchain-install.outputs.cachekey }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock')}}-${{ hashFiles('subprojects/blueprint-compiler.wrap') }}-lint | |
- run: cargo cranky -h &>/dev/null || cargo install --locked cargo-cranky | |
- name: Configure meson | |
run: meson setup builddir | |
- name: cranky | |
run: KCSHOT_LINTING=1 meson devenv -C builddir cargo cranky --manifest-path=../Cargo.toml -- -D warnings | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- run: | | |
sudo apt-get update -y | |
sudo apt install -y $KCSHOT_UBUNTU_DEPS | |
- uses: actions/checkout@v3 | |
- name: Setup toolchain | |
uses: dtolnay/rust-toolchain@stable | |
id: toolchain-install | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
subprojects/blueprint-compiler/ | |
builddir/ | |
key: ${{ runner.os }}-${{ steps.toolchain-install.outputs.cachekey }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock')}}-${{ hashFiles('subprojects/blueprint-compiler.wrap') }}-test | |
- name: Configure meson | |
run: meson setup builddir | |
- name: test | |
run: meson test --verbose -C builddir |