Fix/windows multi window run output leak #788
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 CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: macos-ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| name: Classify changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| swift: ${{ steps.classify.outputs.swift }} | |
| rust_core: ${{ steps.classify.outputs.rust_core }} | |
| macos_release: ${{ steps.classify.outputs.macos_release }} | |
| rust_comments: ${{ steps.classify.outputs.rust_comments }} | |
| metadata: ${{ steps.classify.outputs.metadata }} | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Test CI change classifier | |
| shell: bash | |
| run: ./scripts/test-classify-ci-changes.sh | |
| - name: Resolve comparison base | |
| id: base | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| PUSH_BASE_SHA: ${{ github.event.before }} | |
| shell: bash | |
| run: | | |
| if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then | |
| echo "manual=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| base_sha="$PUSH_BASE_SHA" | |
| if [[ "$EVENT_NAME" == "pull_request" ]]; then | |
| base_sha="$PR_BASE_SHA" | |
| fi | |
| { | |
| echo "manual=false" | |
| echo "base_sha=$base_sha" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Classify changed paths | |
| id: classify | |
| env: | |
| MANUAL: ${{ steps.base.outputs.manual }} | |
| BASE_SHA: ${{ steps.base.outputs.base_sha }} | |
| shell: bash | |
| run: | | |
| if [[ "$MANUAL" == "true" ]]; then | |
| { | |
| echo "swift=true" | |
| echo "rust_core=true" | |
| echo "macos_release=true" | |
| echo "rust_comments=false" | |
| echo "metadata=true" | |
| } >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| ./scripts/classify-ci-changes.sh "$BASE_SHA" "$GITHUB_SHA" >> "$GITHUB_OUTPUT" | |
| - name: Validate changed text | |
| if: steps.base.outputs.manual == 'false' | |
| env: | |
| BASE_SHA: ${{ steps.base.outputs.base_sha }} | |
| shell: bash | |
| run: git diff --check "$BASE_SHA" "$GITHUB_SHA" | |
| - name: Reject newly added blocking test patterns | |
| if: steps.base.outputs.manual == 'false' | |
| env: | |
| BASE_SHA: ${{ steps.base.outputs.base_sha }} | |
| shell: bash | |
| run: ./.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --platform all --base "$BASE_SHA" --head "$GITHUB_SHA" | |
| - name: Set up Rust for comment verification | |
| if: steps.classify.outputs.rust_core == 'false' && steps.classify.outputs.rust_comments == 'true' | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Validate Rust Core comment-only changes | |
| if: steps.classify.outputs.rust_core == 'false' && steps.classify.outputs.rust_comments == 'true' | |
| shell: bash | |
| run: ./scripts/verify-rust-core-comments.sh | |
| - name: Validate lightweight metadata changes | |
| if: steps.classify.outputs.metadata == 'true' | |
| shell: bash | |
| run: | | |
| ruby -c Casks/lithe.rb | |
| ruby -c scripts/update-homebrew-cask.rb | |
| - name: Summarize selected lanes | |
| shell: bash | |
| env: | |
| SWIFT: ${{ steps.classify.outputs.swift }} | |
| RUST_CORE: ${{ steps.classify.outputs.rust_core }} | |
| MACOS_RELEASE: ${{ steps.classify.outputs.macos_release }} | |
| RUST_COMMENTS: ${{ steps.classify.outputs.rust_comments }} | |
| METADATA: ${{ steps.classify.outputs.metadata }} | |
| run: | | |
| { | |
| echo "### macOS CI lanes" | |
| echo "| Lane | Run |" | |
| echo "| --- | --- |" | |
| echo "| Swift tests | $SWIFT |" | |
| echo "| Rust Core tests | $RUST_CORE |" | |
| echo "| Release package verification | $MACOS_RELEASE |" | |
| echo "| Rust comment verification | $RUST_COMMENTS |" | |
| echo "| Metadata validation | $METADATA |" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| swift-tests: | |
| name: Swift tests | |
| needs: changes | |
| if: needs.changes.outputs.swift == 'true' | |
| runs-on: macos-14 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@v7 | |
| - name: Set up Swift | |
| uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: "6.2" | |
| - name: Prepare verified SwiftPM cache | |
| uses: ./.github/actions/prepare-macos-dependency-cache | |
| with: | |
| swiftpm: "true" | |
| - name: Run Swift unit tests | |
| timeout-minutes: 12 | |
| run: | | |
| ./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh \ | |
| --report .artifacts/test-stability/macos-unit.json \ | |
| --suite-timeout-seconds 660 -- \ | |
| --skip WebKitIntegrationTests \ | |
| --skip GitStatusObservationTests \ | |
| --skip '(LitheDatabaseModuleTests|LitheTests\.LitheCoreLogicTests/database)' \ | |
| --skip '([Pp]lugin|LitheGoSupportModuleTests|LinuxDo)' | |
| - name: Run Git status observation tests | |
| timeout-minutes: 3 | |
| run: | | |
| ./scripts/test-macos.sh \ | |
| --skip-build \ | |
| --filter GitStatusObservationTests | |
| - name: Run WebKit lifecycle integration tests | |
| timeout-minutes: 3 | |
| run: | | |
| ./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh \ | |
| --report .artifacts/test-stability/macos-webkit.json \ | |
| --max-seconds 60 --suite-timeout-seconds 150 -- \ | |
| --skip-build \ | |
| --filter WebKitIntegrationTests | |
| - name: Generate combined Swift test report | |
| if: always() | |
| run: node .agents/skills/write-stable-tests/scripts/generate-test-report.mjs | |
| - name: Upload Swift test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-stability-macos | |
| path: .artifacts/test-stability/ | |
| if-no-files-found: ignore | |
| retention-days: 14 | |
| rust-core-tests: | |
| name: Rust Core and Swift bridge tests | |
| needs: changes | |
| if: needs.changes.outputs.rust_core == 'true' | |
| runs-on: macos-14 | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@v7 | |
| - name: Set up Swift | |
| uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: "6.2" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Prepare verified dependency caches | |
| uses: ./.github/actions/prepare-macos-dependency-cache | |
| with: | |
| swiftpm: "true" | |
| cargo: "true" | |
| - name: Run Rust Core tests and verify the Swift bridge | |
| run: ./scripts/verify-rust-core.sh | |
| release-build: | |
| name: Release package verification | |
| needs: changes | |
| if: needs.changes.outputs.macos_release == 'true' | |
| runs-on: macos-14 | |
| timeout-minutes: 40 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@v7 | |
| - name: Set up Swift | |
| uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: "6.2" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin,x86_64-apple-darwin | |
| - name: Prepare verified dependency caches | |
| uses: ./.github/actions/prepare-macos-dependency-cache | |
| with: | |
| swiftpm: "true" | |
| cargo: "true" | |
| - name: Check packaging scripts and metadata | |
| shell: zsh {0} | |
| run: | | |
| for script in scripts/*.sh; do | |
| if [[ "$(head -n 1 "$script")" == "#!/bin/zsh" ]]; then | |
| zsh -n "$script" | |
| fi | |
| done | |
| ruby -c scripts/update-homebrew-cask.rb | |
| ruby -c scripts/create-macos-update-manifest.rb | |
| ruby -c scripts/test-macos-update-manifest.rb | |
| ruby scripts/test-macos-update-manifest.rb | |
| plutil -lint macos/Resources/Info.plist | |
| - name: Build and verify default universal package | |
| run: ./scripts/verify-macos-package.sh | |
| gate: | |
| name: macOS CI gate | |
| needs: | |
| - changes | |
| - swift-tests | |
| - rust-core-tests | |
| - release-build | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Verify required jobs | |
| env: | |
| CHANGES_RESULT: ${{ needs.changes.result }} | |
| SWIFT_RESULT: ${{ needs.swift-tests.result }} | |
| RUST_CORE_RESULT: ${{ needs.rust-core-tests.result }} | |
| SWIFT_SELECTED: ${{ needs.changes.outputs.swift }} | |
| RUST_CORE_SELECTED: ${{ needs.changes.outputs.rust_core }} | |
| RELEASE_SELECTED: ${{ needs.changes.outputs.macos_release }} | |
| RELEASE_RESULT: ${{ needs.release-build.result }} | |
| shell: bash | |
| run: | | |
| [[ "$CHANGES_RESULT" == "success" ]] | |
| require_selected_job() { | |
| local selected="$1" | |
| local result="$2" | |
| if [[ "$selected" == "true" ]]; then | |
| [[ "$result" == "success" ]] | |
| else | |
| [[ "$result" == "skipped" ]] | |
| fi | |
| } | |
| require_selected_job "$SWIFT_SELECTED" "$SWIFT_RESULT" | |
| require_selected_job "$RUST_CORE_SELECTED" "$RUST_CORE_RESULT" | |
| require_selected_job "$RELEASE_SELECTED" "$RELEASE_RESULT" |