Add Gitea Actions pipeline with basic checks
check / lint (push) Successful in 7m16s
check / macos (push) Canceled after 0s

scripts/check.sh (also `make check`) parses the Swift sources, validates
Info.plist and its placeholders, checks the Makefile VERSION against the
newest CHANGELOG release, and flags whitespace errors and conflict markers.

The lint job runs it on the existing Linux runners in a swift:6.3
container. A full macOS build job is included but skipped until a macOS
runner is registered and the MACOS_RUNNER repo variable is set to true.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Gary Hansen
2026-09-28 15:14:13 +10:00
co-authored by Claude Opus 5.5
parent e184197073
commit 757f1ed64a
4 changed files with 105 additions and 1 deletions
+48
View File
@@ -0,0 +1,48 @@
name: check
on:
push:
workflow_dispatch:
jobs:
# Runs on the existing Linux runners. Wakeful links AppKit, IOKit and Carbon,
# so this can parse the Swift but not compile it; see the macos job below.
lint:
runs-on: ubuntu-latest
container:
image: swift:6.3
steps:
# actions/checkout needs Node, which the Swift image doesn't have.
- name: Checkout
env:
TOKEN: ${{ gitea.token }}
run: |
git config --global --add safe.directory "$PWD"
git init -q .
auth=$(printf 'x-access-token:%s' "$TOKEN" | base64 | tr -d '\n')
git -c http.extraHeader="Authorization: Basic $auth" \
fetch -q --depth=1 "${{ gitea.server_url }}/${{ gitea.repository }}.git" "${{ gitea.sha }}"
git checkout -q FETCH_HEAD
git log -1 --oneline
- name: Check
run: scripts/check.sh
# A real build. Off until a macOS act_runner with the "macos" label is
# registered; then set the repo variable MACOS_RUNNER=true to enable it.
macos:
if: vars.MACOS_RUNNER == 'true'
runs-on: macos
steps:
- uses: actions/checkout@v4
- name: Check
run: scripts/check.sh
- name: Build (warnings are errors)
run: swift build -c release -Xswiftc -warnings-as-errors
- name: Bundle and ad-hoc sign
run: |
make bundle
plutil -lint dist/Wakeful.app/Contents/Info.plist