fix: dispatch ReadingContext generic context via TypeContextDescriptorProtocol #49
Workflow file for this run
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
| name: macOS | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| macos_test: | |
| name: Execute tests on macOS | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Apple Silicon runners only: MachOFileTests.preferredArchitecture == .arm64. | |
| # Adding an Intel runner would load a different arch slice and drift snapshots. | |
| os: [macos-26] | |
| xcode-version: ["26.4"] | |
| env: | |
| MACHO_SWIFT_SECTION_SILENT_TEST: 1 | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ matrix.xcode-version }} | |
| - name: Swift version | |
| run: swift --version | |
| - name: Resolve SPM dependencies | |
| run: swift package update | |
| - name: Cache SymbolTests DerivedData | |
| uses: actions/cache@v4 | |
| with: | |
| path: Tests/Projects/SymbolTests/DerivedData | |
| key: symboltests-${{ matrix.xcode-version }}-${{ hashFiles('Tests/Projects/SymbolTests/**/*.swift', 'Tests/Projects/SymbolTests/**/*.pbxproj') }} | |
| - name: Build SymbolTestsCore fixture | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| set -o pipefail | |
| xcodebuild \ | |
| -project Tests/Projects/SymbolTests/SymbolTests.xcodeproj \ | |
| -scheme SymbolTestsCore \ | |
| -configuration Release \ | |
| -derivedDataPath Tests/Projects/SymbolTests/DerivedData \ | |
| -destination 'generic/platform=macOS' \ | |
| -quiet \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| ARCHS=arm64 \ | |
| build | |
| - name: Normalize SymbolTestsCore fixture path | |
| run: | | |
| set -eo pipefail | |
| expected="Tests/Projects/SymbolTests/DerivedData/SymbolTests/Build/Products/Release/SymbolTestsCore.framework" | |
| echo "--- find SymbolTestsCore.framework under DerivedData ---" | |
| find Tests/Projects/SymbolTests/DerivedData -name "SymbolTestsCore.framework" -type d 2>/dev/null || true | |
| if [ -d "$expected" ]; then | |
| echo "Framework already at expected path; nothing to do." | |
| exit 0 | |
| fi | |
| # Prefer a Release build product (skip Intermediates and Debug). | |
| found=$(find Tests/Projects/SymbolTests/DerivedData -path '*/Build/Products/Release/SymbolTestsCore.framework' -type d 2>/dev/null | head -1) | |
| if [ -z "$found" ]; then | |
| echo "ERROR: SymbolTestsCore.framework not found at any Build/Products/Release/ path." | |
| echo "--- DerivedData top 3 levels ---" | |
| find Tests/Projects/SymbolTests/DerivedData -maxdepth 3 -type d | |
| exit 1 | |
| fi | |
| mkdir -p "$(dirname "$expected")" | |
| ln -sfn "$(realpath "$found")" "$expected" | |
| echo "Linked $found -> $expected" | |
| ls -la "$expected/Versions/A/SymbolTestsCore" | |
| - name: Upload xcodebuild logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: symboltests-derived-data-logs | |
| path: Tests/Projects/SymbolTests/DerivedData/Logs | |
| if-no-files-found: ignore | |
| - name: Build and run tests in debug mode | |
| run: | | |
| swift test \ | |
| -c debug \ | |
| --build-path .build-test-debug \ | |
| --filter '\.(SymbolTestsCoreDumpSnapshotTests|SymbolTestsCoreInterfaceSnapshotTests|SymbolTestsCoreCoverageInvariantTests|STCoreE2ETests|STCoreTests|GenericSpecializationTests|GenericSpecializerAPITests|MultiPayloadEnumTests|MetadataReaderDemanglingTests)(/|$)' | |
| - name: Build and run tests in release mode | |
| run: | | |
| swift test \ | |
| -c release \ | |
| --build-path .build-test-release \ | |
| --filter '\.(SymbolTestsCoreDumpSnapshotTests|SymbolTestsCoreInterfaceSnapshotTests|SymbolTestsCoreCoverageInvariantTests|STCoreE2ETests|STCoreTests|GenericSpecializationTests|GenericSpecializerAPITests|MultiPayloadEnumTests|MetadataReaderDemanglingTests)(/|$)' |