From 4935cac4b1b53da9bc0eab157742f9cd6b858cb1 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:34:03 -0600 Subject: [PATCH 1/4] ci: build on the shared ci-workflows macOS workflow Runs the repository's build (and tests where it has them) on the KOF macOS host runner through ci-workflows macos.yaml. Co-Authored-By: Claude Opus 5.5 --- .gitea/NATIVE-CI.md | 17 ----------------- .gitea/workflows/build.yaml | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 .gitea/NATIVE-CI.md create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/NATIVE-CI.md b/.gitea/NATIVE-CI.md deleted file mode 100644 index 84cec1a..0000000 --- a/.gitea/NATIVE-CI.md +++ /dev/null @@ -1,17 +0,0 @@ -# Native CI verification - -VisionPOC is a native Apple project (`VisionPOC.xcodeproj`, generated with XcodeGen). Its native verification is **centralized**: -this repository carries no workflow that selects a host or a runner label. - -- The owner-level `native.yaml` in the KofTwentyTwo CI policy repository dispatches the shared `swift` profile for - `KofTwentyTwo/VisionPOC` with inputs declared centrally (`xcode-build` of the `VisionPOC` scheme, project generated by XcodeGen). -- It runs on pushes to the protected branches, on manual dispatch, and on pull requests opened from a branch of this same - repository. A pull request from a fork never runs on a host: a Linux `fork-deny` job fails it instead. -- This is a **build-only** verification plus a secrets scan. The project declares no unit-test suite, so no test result is - produced or claimed. Hardware, UI and signing checks are out of scope and are not waived by this document. -- The `native-result` check aggregates the native jobs. It fails unless the native build and the secrets scan succeeded, - so a skipped, failed or cancelled native run cannot pass. -- The primary `ci-result` check (source/config lint and secrets scan) continues to run on every pull request. - -Both `ci-result` and `native-result` are required checks for `main`. Changing what runs, where, or with which inputs is -done in the CI policy repository, never in a pull request to this repository. diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..30740a9 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,14 @@ +name: build +on: + push: + branches: ['**'] + tags: ['v*'] +jobs: + macos: + uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@native-workflows + secrets: inherit + with: + commands: | + xcodegen generate + xcodebuild -quiet -project VisionPOC.xcodeproj -scheme VisionPOC -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build + xcodebuild -quiet -project VisionPOC.xcodeproj -scheme VisionPOC -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO test -- 2.54.0 From ff06f7801ba93a4fb3e4659d3549062694d05bb0 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:37:21 -0600 Subject: [PATCH 2/4] ci: fetch the LFS Core ML model for the build Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 30740a9..a48435a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -12,3 +12,4 @@ jobs: xcodegen generate xcodebuild -quiet -project VisionPOC.xcodeproj -scheme VisionPOC -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build xcodebuild -quiet -project VisionPOC.xcodeproj -scheme VisionPOC -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO test + lfs: true -- 2.54.0 From 31334fe6e16fecf6867f9616b13d62e383fe1fb5 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:46:21 -0600 Subject: [PATCH 3/4] ci: pin the shared workflow to v1 Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index a48435a..c1094df 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -5,7 +5,7 @@ on: tags: ['v*'] jobs: macos: - uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@native-workflows + uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@v1 secrets: inherit with: commands: | -- 2.54.0 From 5bfa30f022293f1a2adf143f3685d71c23d0657d Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 17:25:53 -0600 Subject: [PATCH 4/4] ci: build only, without LFS; run the app-hosted tests locally grogu has no git-lfs, so the Core ML model is a pointer file coremlc cannot compile. CI removes the pointer-only mlpackage before xcodegen generate (ObjectDetector loads the model by URL and falls back to the Vision built-ins when it is missing) and compiles the app and the test bundle unsigned with build-for-testing. The tests are app-hosted XCTests and the runner has no GUI session for testmanagerd; the README documents running them locally. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 15 ++++++++++++--- README.md | 9 ++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index c1094df..21813da 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -8,8 +8,17 @@ jobs: uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@v1 secrets: inherit with: + # Build only, without LFS: the runner has no git-lfs, so the Core ML model is a pointer file that + # coremlc cannot compile. It is left out of the build; ObjectDetector loads it by URL at runtime and + # falls back to the Vision built-ins when it is missing. The app and the test bundle are compiled + # unsigned but the tests are not run: they are app-hosted XCTests and the grogu runner has no GUI + # session for testmanagerd. Run them locally before merging (README, Tests). + lfs: false commands: | + model=Sources/Resources/Models/yolov8x-oiv7.mlpackage + if head -c 40 "$model/Data/com.apple.CoreML/model.mlmodel" | grep -q '^version https://git-lfs'; then + echo "$model is an LFS pointer (no git-lfs on the runner): building without the model" + rm -rf "$model" + fi xcodegen generate - xcodebuild -quiet -project VisionPOC.xcodeproj -scheme VisionPOC -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build - xcodebuild -quiet -project VisionPOC.xcodeproj -scheme VisionPOC -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO test - lfs: true + xcodebuild -quiet -project VisionPOC.xcodeproj -scheme VisionPOC -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build-for-testing diff --git a/README.md b/README.md index d709af2..6218bd1 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,16 @@ xcodebuild -project VisionPOC.xcodeproj -scheme VisionPOC -configuration Debug - 24 unit tests across IoU, aspect-fit, LogStream ring buffer, and DetectionEventBus pub/sub. +The tests are app-hosted XCTests (`TEST_HOST` is the app). CI compiles them but does not run them (the CI +macOS runner has no GUI session), so run the command above locally before merging. + ### Continuous integration -GitHub Actions builds + tests on every push to `main` — see `.github/workflows/build.yml`. LFS is skipped on CI (the build tolerates a missing model since `ObjectDetector` falls back to the Vision built-ins). +Gitea Actions (`.gitea/workflows/build.yaml`, the shared `KofTwentyTwo/ci-workflows` macOS workflow on grogu) +builds the app and the test bundle unsigned (`build-for-testing`) on every push. It is build only: the tests +run locally (above). LFS is skipped on CI: the pointer-only model is removed before `xcodegen generate`, and +`ObjectDetector` falls back to the Vision built-ins when the model is missing. The `.github` workflow still +runs on the GitHub mirror. --- -- 2.54.0