Skip to content

Commit 5a6b339

Browse files
authored
ci: filter to SymbolTestsCore fixture tests + bump to macOS 26 + Xcode 26.4 (#65)
* Add CI test filter and macOS 26.2 upgrade spec Documents the plan to restrict CI test runs to the four SymbolTestsCore fixture test classes, build the fixture framework via xcodebuild in the workflow, and bump both workflows to macOS 26.2 + Xcode 26.2. * Refine CI filter spec to current state and add implementation plan Spec now reflects that Build SymbolTestsCore fixture, DerivedData cache, and SPM resolve steps already exist on main; only the --filter regex and macOS 26.2 / Xcode 26.2 bumps remain. Plan walks through verification of the regex locally followed by separate workflow commits and a PR. * Correct CI filter spec/plan: actual class names + add coverage invariant Snapshot test classes were renamed from MachOFile* to SymbolTestsCore* on main; the spec/plan still referenced the old names. Adds the existing SymbolTestsCoreCoverageInvariantTests (pure-Swift invariant over fixture sources) to the CI whitelist. Also switches the verification recipe from the deprecated `swift test --list-tests --filter` to `swift test list` + local `grep -E`, which matches what current toolchains support. * ci(macOS): pin to macos-26 + Xcode 26.2 and filter to fixture tests Restrict swift test runs to the five SymbolTestsCore-based test classes (SymbolTestsCoreDumpSnapshotTests, SymbolTestsCoreInterfaceSnapshotTests, SymbolTestsCoreCoverageInvariantTests, STCoreE2ETests, STCoreTests) so the CI runner only executes tests that do not depend on a developer- machine environment. Spec: docs/superpowers/specs/2026-04-18-ci-test-filter-design.md * ci(release): bump runner to macos-26 + Xcode 26.2 Aligns the release workflow with the macOS test workflow. * ci(macOS): disable code signing for SymbolTestsCore fixture build The CI runner doesn't have the developer certificate for team D5Q73692VW that the SymbolTests xcodeproj requests. xcodebuild only needs to produce the SymbolTestsCore.framework binary so swift test can load it for snapshot/fixture tests; the framework does not need a valid code signature for that. Pass CODE_SIGNING_ALLOWED=NO to skip signing entirely. Refs PR #65. * ci(macOS): force arm64 slice and skip swiftinterface verify Two follow-up fixes to make the SymbolTestsCore xcodebuild step succeed on the macos-26 runner: 1. ARCHS=arm64 — `-destination generic/platform=macOS` defaults to a universal build (arm64 + x86_64). The workflow's own comment notes that snapshot tests assume the arm64 slice; an x86_64 slice would drift snapshots. Restrict to arm64 to match the documented invariant. 2. SWIFT_VERIFY_EMITTED_MODULE_INTERFACE=NO — Swift 6.2.3 in library-evolution mode emits a .swiftinterface that contains `nonisolated(nonsending)` (from the NonisolatedNonsendingByDefault upcoming feature) but then fails to verify its own output, with "'nonisolated' may only be used on parameters" and friends. Skip the verifier pass; the .swiftinterface is still emitted, and the Mach-O binary that snapshot tests load is unaffected. Refs PR #65. * ci: bump Xcode pin from 26.2 to 26.4 Xcode 26.2 ships Swift 6.2.3, whose compiler emits a .swiftinterface containing nonisolated(nonsending) syntax (auto-enabled by the macOS 26 SDK's default upcoming features) but then fails to verify its own output ("'nonisolated' may only be used on parameters", etc.). Xcode 26.4 / Swift 6.3 fixed this — local builds with 26.4 succeed using the identical xcodebuild command. Refs PR #65. * deps: bump swift-demangling pin from 0.1.0 to 0.1.1 0.1.1 adds DemangleOptions.removeReferenceStoragePrefix, which SwiftDump's StructDumper and ClassDumper use. Local builds with useLocalDemangling=1 picked up the new API from a sibling checkout, but CI resolves the remote pin and was failing to compile against 0.1.0. Refs PR #65. * ci(macOS): symlink SymbolTestsCore fixture to expected path xcodebuild on the macos-26 runner emits the fixture at DerivedData/Build/Products/Release/SymbolTestsCore.framework, but MachOFileName.SymbolTestsCore reads it from DerivedData/SymbolTests/Build/Products/Release/SymbolTestsCore.framework (the layout xcodebuild produces locally on Apple Silicon with Xcode 26.4). Add a step that finds the produced framework and symlinks it to the expected path. Logs the discovered locations for future debugging. Refs PR #65. * docs: sync spec/plan with implementation outcome (Xcode 26.4 + 5 followups) Spec now states the workflows pin Xcode 26.4 (with a note explaining why the originally-targeted 26.2 didn't work — Swift 6.2.3 swiftinterface bug). Plan keeps the original Task 1-4 wording (which matches the executed commits) and adds an "Implementation Outcome" section listing the five follow-up commits CI feedback required. * ci(macOS): drop SWIFT_VERIFY_EMITTED_MODULE_INTERFACE=NO workaround Originally added to try to suppress the Swift 6.2.3 swiftinterface emit/verify mismatch, but the flag never actually worked under Xcode 26's explicit-module pipeline (which uses a separate verifier path). Now that the Xcode pin is 26.4 / Swift 6.3 — which fixed the underlying emitter bug — the flag is dead code; keeping it would silently swallow any future emit/verify regressions instead of letting them surface. Also retitle the plan from "macOS 26.2 Upgrade" to "macOS 26 Upgrade" to match the actual outcome (runner image macos-26, Xcode 26.4). Refs PR #65.
1 parent 4365e8e commit 5a6b339

5 files changed

Lines changed: 603 additions & 7 deletions

File tree

‎.github/workflows/macOS.yml‎

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
matrix:
1616
# Apple Silicon runners only: MachOFileTests.preferredArchitecture == .arm64.
1717
# Adding an Intel runner would load a different arch slice and drift snapshots.
18-
os: [macos-15]
19-
xcode-version: ["16.3"]
18+
os: [macos-26]
19+
xcode-version: ["26.4"]
2020
env:
2121
MACHO_SWIFT_SECTION_SILENT_TEST: 1
2222
GH_TOKEN: ${{ github.token }}
@@ -49,8 +49,33 @@ jobs:
4949
-derivedDataPath Tests/Projects/SymbolTests/DerivedData \
5050
-destination 'generic/platform=macOS' \
5151
-quiet \
52+
CODE_SIGNING_ALLOWED=NO \
53+
ARCHS=arm64 \
5254
build
5355
56+
- name: Normalize SymbolTestsCore fixture path
57+
run: |
58+
set -eo pipefail
59+
expected="Tests/Projects/SymbolTests/DerivedData/SymbolTests/Build/Products/Release/SymbolTestsCore.framework"
60+
echo "--- find SymbolTestsCore.framework under DerivedData ---"
61+
find Tests/Projects/SymbolTests/DerivedData -name "SymbolTestsCore.framework" -type d 2>/dev/null || true
62+
if [ -d "$expected" ]; then
63+
echo "Framework already at expected path; nothing to do."
64+
exit 0
65+
fi
66+
# Prefer a Release build product (skip Intermediates and Debug).
67+
found=$(find Tests/Projects/SymbolTests/DerivedData -path '*/Build/Products/Release/SymbolTestsCore.framework' -type d 2>/dev/null | head -1)
68+
if [ -z "$found" ]; then
69+
echo "ERROR: SymbolTestsCore.framework not found at any Build/Products/Release/ path."
70+
echo "--- DerivedData top 3 levels ---"
71+
find Tests/Projects/SymbolTests/DerivedData -maxdepth 3 -type d
72+
exit 1
73+
fi
74+
mkdir -p "$(dirname "$expected")"
75+
ln -sfn "$(realpath "$found")" "$expected"
76+
echo "Linked $found -> $expected"
77+
ls -la "$expected/Versions/A/SymbolTestsCore"
78+
5479
- name: Upload xcodebuild logs on failure
5580
if: failure()
5681
uses: actions/upload-artifact@v4
@@ -63,10 +88,12 @@ jobs:
6388
run: |
6489
swift test \
6590
-c debug \
66-
--build-path .build-test-debug
91+
--build-path .build-test-debug \
92+
--filter '\.(SymbolTestsCoreDumpSnapshotTests|SymbolTestsCoreInterfaceSnapshotTests|SymbolTestsCoreCoverageInvariantTests|STCoreE2ETests|STCoreTests)(/|$)'
6793
6894
- name: Build and run tests in release mode
6995
run: |
7096
swift test \
7197
-c release \
72-
--build-path .build-test-release
98+
--build-path .build-test-release \
99+
--filter '\.(SymbolTestsCoreDumpSnapshotTests|SymbolTestsCoreInterfaceSnapshotTests|SymbolTestsCoreCoverageInvariantTests|STCoreE2ETests|STCoreTests)(/|$)'

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
build-and-release:
1313
name: Build and publish release
14-
runs-on: macos-15
14+
runs-on: macos-26
1515
env:
1616
GH_TOKEN: ${{ github.token }}
1717
steps:
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Xcode
2121
uses: maxim-lobanov/setup-xcode@v1
2222
with:
23-
xcode-version: "16.3"
23+
xcode-version: "26.4"
2424

2525
- name: Swift version
2626
run: swift --version

‎Package.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ extension Package.Dependency {
227227
),
228228
remote: .package(
229229
url: "https://github.com/MxIris-Reverse-Engineering/swift-demangling",
230-
from: "0.1.0"
230+
from: "0.1.1"
231231
)
232232
)
233233

0 commit comments

Comments
 (0)