refactor: chat page #215
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: Build | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| spm-tests: | |
| name: SPM Package Tests | |
| runs-on: macos-26 | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Test MeshCore | |
| run: | | |
| run_tests() { | |
| rm -f "$RUNNER_TEMP/watchdog-fired" | |
| swift test --package-path MeshCore --no-parallel & | |
| TEST_PID=$! | |
| ( | |
| sleep 480 | |
| touch "$RUNNER_TEMP/watchdog-fired" | |
| echo "::warning::swift test still running after 8 minutes - sampling process tree" | |
| for pid in $(pgrep -f "MeshCorePackageTests|swiftpm-testing-helper|swift-test" || true); do | |
| echo "=== sample of PID $pid ===" | |
| sample "$pid" 5 2>/dev/null || true | |
| done | |
| kill -9 $TEST_PID 2>/dev/null || true | |
| ) & | |
| WATCHDOG=$! | |
| if wait $TEST_PID; then | |
| kill $WATCHDOG 2>/dev/null || true | |
| return 0 | |
| else | |
| STATUS=$? | |
| kill $WATCHDOG 2>/dev/null || true | |
| return $STATUS | |
| fi | |
| } | |
| STATUS=0 | |
| run_tests || STATUS=$? | |
| if [ "$STATUS" -eq 0 ]; then | |
| exit 0 | |
| fi | |
| if [ -f "$RUNNER_TEMP/watchdog-fired" ]; then | |
| echo "::warning::first attempt hung - retrying once" | |
| run_tests | |
| else | |
| exit "$STATUS" | |
| fi | |
| - name: Test MC1Services | |
| run: | | |
| run_tests() { | |
| rm -f "$RUNNER_TEMP/watchdog-fired" | |
| swift test --package-path MC1Services --no-parallel & | |
| TEST_PID=$! | |
| ( | |
| sleep 480 | |
| touch "$RUNNER_TEMP/watchdog-fired" | |
| echo "::warning::swift test still running after 8 minutes - sampling process tree" | |
| for pid in $(pgrep -f "MC1ServicesPackageTests|swiftpm-testing-helper|swift-test" || true); do | |
| echo "=== sample of PID $pid ===" | |
| sample "$pid" 5 2>/dev/null || true | |
| done | |
| kill -9 $TEST_PID 2>/dev/null || true | |
| ) & | |
| WATCHDOG=$! | |
| if wait $TEST_PID; then | |
| kill $WATCHDOG 2>/dev/null || true | |
| return 0 | |
| else | |
| STATUS=$? | |
| kill $WATCHDOG 2>/dev/null || true | |
| return $STATUS | |
| fi | |
| } | |
| STATUS=0 | |
| run_tests || STATUS=$? | |
| if [ "$STATUS" -eq 0 ]; then | |
| exit 0 | |
| fi | |
| if [ -f "$RUNNER_TEMP/watchdog-fired" ]; then | |
| echo "::warning::first attempt hung - retrying once" | |
| run_tests | |
| else | |
| exit "$STATUS" | |
| fi | |
| xcode-build: | |
| name: Xcode Build | |
| runs-on: macos-26 | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| brew install make | |
| echo "$(brew --prefix make)/libexec/gnubin" >> "$GITHUB_PATH" | |
| command -v xcodegen >/dev/null 2>&1 || brew install xcodegen | |
| command -v swiftgen >/dev/null 2>&1 || brew install swiftgen | |
| - name: Generate Xcode project | |
| run: make generate | |
| - name: Cache Xcode build | |
| uses: irgaly/xcode-cache@v1 | |
| with: | |
| key: xcode-deriveddata-${{ github.workflow }}-${{ github.sha }} | |
| restore-keys: | | |
| xcode-deriveddata-${{ github.workflow }}- | |
| deriveddata-directory: .derivedData | |
| delete-used-deriveddata-cache: true | |
| - name: Build | |
| run: | | |
| xcodebuild build \ | |
| -project MC1.xcodeproj \ | |
| -scheme MC1 \ | |
| -destination "generic/platform=iOS Simulator" \ | |
| -derivedDataPath .derivedData \ | |
| CODE_SIGN_IDENTITY="-" \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| COMPILER_INDEX_STORE_ENABLE=NO |