PureXML/.github/workflows/ci.yml
Mihaela Mihaljevic 9e7576bd7e chore(hooks): make attribution gates tool-agnostic and wire roadmap into style
Conform to the vendor-neutral github-discipline canon: the commit-msg and
pre-commit hooks and check-style.sh now reject AI attribution for every
assistant (Codex, Copilot, Gemini, ChatGPT, OpenAI, Anthropic), not just
Claude and Cursor. The no-cursor-attribution workflow is excluded from the
file-content scan since it legitimately quotes the tokens to detect them.

Also wire scripts/check-roadmap.sh into check-style.sh (and grant the CI gates
step issues:read + a token for the epic-coverage query), per the rule that the
roadmap gate runs in the style check.
2026-06-08 01:42:07 +02:00

90 lines
2.5 KiB
YAML

name: CI
# PureXML is a root Swift package. CI must prove macOS, Linux, Windows, and WASM.
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1"
permissions:
contents: read
issues: read
jobs:
macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Install format and lint tools
run: brew install swiftformat swiftlint
- name: Repository gates
env:
GH_TOKEN: ${{ github.token }}
run: |
bash scripts/check-style.sh
bash scripts/check-namespacing.sh
bash scripts/check-forbidden-patterns.sh
- name: Format and lint
run: |
swiftformat . --config .swiftformat --lint
swiftlint --config .swiftlint.yml --strict
- name: Build and test
run: |
swift build
swift test
swift build -c release
swift test -c release
linux:
name: Linux
runs-on: ubuntu-latest
container: swift:6.2
steps:
- uses: actions/checkout@v6
- name: Build and test
run: bash scripts/check-linux.sh
windows:
name: Windows
runs-on: windows-2022
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- name: Install Swift
uses: compnerd/gha-setup-swift@main
with:
swift-version: swift-6.3.2-release
swift-build: 6.3.2-RELEASE
- name: Build and test
shell: pwsh
run: ./scripts/check-windows.ps1
wasm:
name: WASM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Swift toolchain dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Install swiftly
run: |
curl -L https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz > swiftly.tar.gz
tar zxf swiftly.tar.gz
./swiftly init --quiet-shell-followup --assume-yes --skip-install
- name: Install Swift 6.3.2 and Wasm SDK
run: |
. "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh"
swiftly install --use 6.3.2
swift sdk install https://download.swift.org/swift-6.3.2-release/wasm-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_wasm.artifactbundle.tar.gz --checksum a61f0584c93283589f8b2f42db05c1f9a182b506c2957271402992655591dd7c
- name: Build for WASM
run: |
. "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh"
bash scripts/check-wasm.sh