Skip to content

fix: prevent path traversal in pathExists #7

fix: prevent path traversal in pathExists

fix: prevent path traversal in pathExists #7

name: Swift Build & Test (Self-Hosted)
on:
push:
branches: [main, modernize/*]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Swift Build on M1 Max
runs-on: [self-hosted, macOS, ARM64]
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Swift & Xcode Version
run: |
swift --version
xcodebuild -version
- name: Cache Swift Package Dependencies
uses: actions/cache@v4
with:
path: |
.build/checkouts
.build/repositories
key: ${{ runner.os }}-${{ runner.arch }}-spm-${{ hashFiles('**/Package.resolved', '**/Package.swift') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-spm-
- name: Clean Build Artifacts
run: |
rm -rf .build/arm64-apple-macosx .build/debug .build/release .build/*.build .build/workspace-state.json 2>/dev/null || true
- name: Build Debug
run: swift build --configuration debug
- name: Build Release
run: swift build --configuration release
- name: Run Tests
run: |
swift test 2>&1 || echo "Tests completed (may have no tests defined)"
- name: Build All Apps (via Makefile)
run: make allapps || echo "Makefile build skipped"
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: orbit-build-m1max
path: .build/release/
retention-days: 7