ci(github): check with nix on every push

`ci.yaml` runs two jobs on GitHub-hosted runners, gated on the repository name
so that forks do not run them. `cargo-deny` checks licenses, advisories and
sources. `lint` runs `nix flake check`, which builds every check of the flake,
and the repository's own macro rules from the justfile. The triggers are the
ones komorebi for Mac uses: pull requests, pushes to master, feature and hotfix
branches, version tags, a weekly schedule and a manual run. The Nix store is
cached with cache-nix-action, which needs no account.

komorebi follows the tip of nixpkgs-unstable, so `flake.lock` moves, and KWin
with it. `update-flake-lock.yaml` opens a pull request each week with the title
`chore(deps): flake.lock: Update`; the same jobs run on it, which is what says
whether the new KWin still works.

Dependabot keeps the actions and the crates up to date, and the pull request
template carries over from komorebi for Mac. CONTRIBUTING.md describes what CI
runs.
This commit is contained in:
LGUG2Z committed 2026-10-27 09:18:55 -07:00
1 parent 9524b777b3
commit 3a20a60823
5 files changed
+108

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
assignees:
- "LGUG2Z"
commit-message:
prefix: chore
include: scope
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
assignees:
- "LGUG2Z"
commit-message:
prefix: chore
include: scope
+7
View File
@@ -0,0 +1,7 @@
<!--
Please follow the Conventional Commits specification.
If you need to update your PR with changes from `master`, please run `git rebase master`.
By opening this PR, you confirm that you have read, understood and agree to this project's `CONTRIBUTING.md`.
-->
+46
View File
@@ -0,0 +1,46 @@
# Every job is gated on the repository, so that a fork does not run them on its own runners.
name: ci
on:
pull_request:
branches:
- "*"
push:
branches:
- master
- feature/*
- hotfix/*
tags:
- v*
schedule:
- cron: "30 0 * * 0" # Every Sunday at 00:30 UTC
workflow_dispatch:
jobs:
cargo-deny:
if: github.repository == 'LGUG2Z/komorebi-for-kde'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: EmbarkStudios/cargo-deny-action@v2
# Everything that does not need a virtual machine: the formatting, clippy, rustdoc and the tests,
# as derivations. The jobs that boot KWin are separate.
lint:
if: github.repository == 'LGUG2Z/komorebi-for-kde'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v31
- uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', '**/Cargo.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size-linux: 8G
- run: nix flake check -L
- run: nix develop --command just lint
+25
View File
@@ -0,0 +1,25 @@
# komorebi tracks the tip of nixpkgs-unstable, so the lock moves every week. The pull request runs
# the same jobs as any other, which is what says whether the new KWin still works.
name: update-flake-lock
on:
schedule:
- cron: "0 3 * * 1" # Every Monday at 03:00 UTC
workflow_dispatch:
jobs:
update:
if: github.repository == 'LGUG2Z/komorebi-for-kde'
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7
- uses: cachix/install-nix-action@v31
- uses: DeterminateSystems/update-flake-lock@v29
with:
commit-msg: "chore(deps): flake.lock: Update"
pr-title: "chore(deps): flake.lock: Update"
pr-assignees: LGUG2Z
+9
View File
@@ -42,6 +42,15 @@ warnings denied. `just fmt` formats the Rust sources, and `nix fmt` every file
type the repository has. `nix flake check` is what CI runs; it builds the same
checks, plus `cargo deny`, as derivations.
## Continuous integration
[`ci.yaml`](.github/workflows/ci.yaml) runs on every pull request and on every
push to `master`, `feature/*` and `hotfix/*`, in this repository only. The
`lint` job runs `nix flake check` and the repository's own lint rules, and
`cargo-deny` checks licenses and advisories. A weekly
[workflow](.github/workflows/update-flake-lock.yaml) opens a pull request that
moves `flake.lock`, and the same jobs run on it.
## Commits
Commit messages follow the