Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
name: Backend tests

# The code: formatting, Clippy, the workspace's tests, rustdoc links, the
# privileged helper's authorization refusals and the translations. The
# package itself is build-package.yml's. See docs/ci-workflows-audit.md.
# privileged helper's authorization refusals and the translations.
#
# Not run on its own for pushes or pull requests: build-package.yml calls it
# beside the package, so each push or pull request is one run with both
# jobs (see docs/ci-workflows-audit.md). A manual run checks any branch.

on:
pull_request:
push:
branches: [main]
workflow_call:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: backend-tests-${{ github.ref }}
# A newer commit on a pull request makes the older run moot; every commit
# on main keeps its own result.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
rust:
name: Rust workspace, helper authorization and translations
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Build Package

# Builds the commit under test with pkgbuild/PKGBUILD, in Arch's own
# container, validates the package and keeps it as an artifact.
# container, validates the package and keeps it as an artifact. Beside it,
# backend-tests.yml checks the code: one run per push or pull request, with
# both jobs.
#
# This workflow's success is what the BigLinux package builders act on: when
# a "Build Package" run of biglinux/bigamemode ends in success, they build
Expand Down Expand Up @@ -33,6 +35,11 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
# The code's checks, in parallel with the package. A run is successful,
# and so handed to the BigLinux builders, only when both pass.
rust:
uses: ./.github/workflows/backend-tests.yml

package:
name: Build and validate the Arch package
runs-on: ubuntu-24.04
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/package-check.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Package check

# The package build and every check of build-package.yml, for pull requests
# and manual runs of any branch. Under this name a successful run is not
# handed to the BigLinux package builders, which act on "Build Package"
# runs only (see build-package.yml). See docs/ci-workflows-audit.md.
# Everything build-package.yml runs (the code's checks of backend-tests.yml
# and the package), for pull requests and manual runs of any branch, as one
# run. Under this name a successful run is not handed to the BigLinux package
# builders, which act on "Build Package" runs only (see build-package.yml).
# See docs/ci-workflows-audit.md.

on:
pull_request:
Expand All @@ -13,5 +14,5 @@ permissions:
contents: read

jobs:
package:
check:
uses: ./.github/workflows/build-package.yml
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,20 +470,22 @@ BIGAME_LOCALEDIR=/tmp/bgm-locale LANGUAGE=pt_BR bigame-engine/target/debug/bigam
template, compiles the catalogues and runs `cargo test --release --frozen
--workspace` in `check()`.

Two workflows check every pull request (details in
[`docs/ci-workflows-audit.md`](docs/ci-workflows-audit.md)):

- `.github/workflows/backend-tests.yml`, also on every push to `main`:
formatting, Clippy with warnings as errors, the tests, `cargo doc` with
warnings as errors, the helper's authorization test as an ordinary user, the
translation template and catalogues.
- `.github/workflows/build-package.yml`, also on every push to `main`,
`testing-*` and `stable-*`: a `makepkg` build of that very commit with
`pkgbuild/PKGBUILD`, checked with namcap, `desktop-file-validate`,
`appstreamcli` and a look at every file it installs; the package is kept as
an artifact. A successful run of it is what the BigLinux package builders
build. Pull requests run the same build as `package-check.yml`, which is
not handed to them.
One run checks every pull request and every push (details in
[`docs/ci-workflows-audit.md`](docs/ci-workflows-audit.md)), with two jobs in
parallel:

- the code (`.github/workflows/backend-tests.yml`): formatting, Clippy with
warnings as errors, the tests, `cargo doc` with warnings as errors, the
helper's authorization test as an ordinary user, the translation template
and catalogues;
- the package (`.github/workflows/build-package.yml`): a `makepkg` build of
that very commit with `pkgbuild/PKGBUILD`, checked with namcap,
`desktop-file-validate`, `appstreamcli` and a look at every file it
installs; the package is kept as an artifact.

Pushes to `main`, `testing-*` and `stable-*` run as *Build Package*; a
successful one is what the BigLinux package builders build. Pull requests run
as *Package check*, which is not handed to them.

## Author

Expand Down
30 changes: 18 additions & 12 deletions docs/ci-workflows-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,26 @@ outside CI is the test above, in `bigame-core/src/graphics/optiscaler.rs`.
## Final architecture

```text
pull_request ─┬─► backend-tests ─── rust: fmt · clippy · test · doc · authorization · translations
push main ────┤
│
└─► package-check ──┐
│ workflow_call
push main, ▼
testing-*, stable-* ──► build-package ─── package: prepare source of $GITHUB_SHA → makepkg -s
→ identify → metadata → contents → desktop
→ AppStream → namcap → SHA256SUMS → artifact
│
└─ a successful "Build Package" run: the BigLinux
builders build its branch
pull_request ──► "Package check" (package-check.yml) ─┐
│ workflow_call
push main, ▼
testing-*, stable-* ──► "Build Package" (build-package.yml)
├─ rust (backend-tests.yml, workflow_call):
│ fmt · clippy · test · doc · authorization · translations
└─ package: prepare source of $GITHUB_SHA → makepkg -s
→ identify → metadata → contents → desktop
→ AppStream → namcap → SHA256SUMS → artifact

A successful "Build Package" run (both jobs): the BigLinux builders build
its branch.
```

One run per push or pull request, with both jobs in parallel. Until
2026-10-09 the code's checks were a workflow of their own, so every push
and pull request showed two runs, and a push to `main` repeated, as two more
runs, what its pull request had just run. `backend-tests.yml` now only runs
when called (or by hand).

## How the BigLinux builders are triggered

The BigLinux builders (GitLab, `gitlab.bigib.org/builder/packagebuilder`)
Expand Down