Repository navigation
chore(ci): silence test warnings, deflake cache benchmark, fix CodeQL Swift, slim legacy workflows - #152
Merged
Conversation
…ctions tokens - Relax `testCachePerformanceBenchmark` invalidation bound from 1µs to 50µs (iOS Simulator/CI clocked it at ~2µs, well within the new bound and still catching catastrophic regressions). - Eliminate all 60 Xcode Cloud test compile warnings: unused immutable values (`_ = ...`), `var → let`, `#file → #filePath`, dead branches in constant-folded `if/else`, `var` written-but-unread, and a non-Sendable `self` capture in `testThreadSafety`. - Make `ZFightingDepthBiasTests.tearDown` async so MainActor-isolated properties can be reset without an isolation warning. - Add explicit `permissions: contents: read` to both GitHub Actions workflows (release job overrides to `contents: write` for tag releases).
Default-setup autobuild ran `/usr/bin/swift build` with the runner's Xcode 16.x default, which lacks Swift 6.2 — the version Package.swift declares — so extraction failed before CodeQL could index any sources. Switch Swift to advanced setup: - Drop Swift from default setup (kept actions there). - Add .github/workflows/codeql.yml on macos-latest. - Probe step prints installed Xcodes / SDKs / toolchains so future drift is debuggable from logs alone. - Select highest /Applications/Xcode_26* (or 27+) and `xcode-select -s` before init/build, so `swift build` runs against Swift 6.2. - Manual build mode + scoped per-job permissions (security-events: write, actions: read).
Now that Xcode Cloud handles the full macOS/iOS build + test on Apple infrastructure (PR #151) and CodeQL has an advanced setup with Xcode 26 selection, the legacy GH Actions workflows had significant overlap and one piece of dead code: - Rename feature.yaml → lint.yaml; drop steps that duplicate the build: `swift package dump-package`, `swift package resolve`, and per-file `swift -frontend -parse` are all subsumed by Xcode Cloud's compile and CodeQL's `swift build`. Keep the value-add lints (license headers, conflict markers, hardcoded paths, executable bit, trailing whitespace). - Delete release.yaml: triggers on `v*` tag pushes that this project doesn't use, and would fail anyway because `macos-latest`'s default Xcode is 16.x while Package.swift requires Swift 6.2 (Xcode 26). - codeql.yaml: fold the `actions` analysis into the same workflow so both languages live under one advanced configuration. Required because GitHub rejects SARIF uploads from advanced setup whenever default setup is enabled at all (even for non-overlapping languages), and we just disabled default setup repo-wide.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Multi-part CI hygiene pass. Originally targeted the Xcode Cloud iOS test failure (1 fail + 60 warnings), then expanded to fix CodeQL Swift (autobuild was failing) and prune redundant legacy workflows now that Xcode Cloud + advanced CodeQL handle the heavy lifting.
1. Test fixes (original scope)
ARKitBodyDriverTests.testCachePerformanceBenchmark— relax cache-invalidation bound from< 1µsto< 50µs. iOS Simulator clocked ~1.95µs in CI.var → let, unused values →_,#file → #filePath, dead constant-folded branches,@MainActortearDownmadeasync, non-Sendableselfcapture replaced with locallet, etc.2. CodeQL Swift (new)
/usr/bin/swift buildagainst themacos-latestrunner's Xcode 16.x, which lacks Swift 6.2. Extraction failed before any Swift source was indexed..github/workflows/codeql.yamlwith two jobs:actionsanalysis onubuntu-latest(build-mode: none).swiftanalysis onmacos-latest— picks the highest-versionedXcode_26*/Xcode_27*viaxcode-select, thenswift buildwith build-mode: manual.3. Legacy workflow re-evaluation (new)
feature.yaml→lint.yamland drop steps that overlap with Xcode Cloud + CodeQL builds:swift package dump-package,swift package resolve, per-fileswift -frontend -parseare all subsumed by the actual builds those workflows perform. Keep the value-add lints: license headers, conflict markers, hardcoded paths, executable bit, trailing whitespace.release.yaml— it triggered onv*tag pushes that this project doesn't use, and would have failed the same way CodeQL did becausemacos-latest's default Xcode is 16.x.4. GH Actions token scoping (original scope)
lint.yaml,codeql.yaml) have explicitpermissions: contents: readat the workflow level; CodeQL job overrides tosecurity-events: writefor SARIF upload.Test plan
swift package clean && swift build --target VRMMetalKitTests— clean build, zero warningsswift test --filter ARKitBodyDriverTests/testCachePerformanceBenchmarkpasses