diff --git a/.github/workflows/build_artifact.yml b/.github/workflows/build_artifact.yml index eeb8556..65f4f04 100644 --- a/.github/workflows/build_artifact.yml +++ b/.github/workflows/build_artifact.yml @@ -14,15 +14,19 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: ref: ${{ inputs.branch }} - name: Select Xcode run: sudo xcode-select -s /Applications/Xcode.app + - name: Install xcbeautify + run: brew install xcbeautify + - name: Build for iOS Simulator run: | + set -o pipefail xcodebuild \ -project App/Landmarks.xcodeproj \ -scheme Landmarks \ @@ -30,7 +34,7 @@ jobs: -configuration Debug \ -destination 'platform=iOS Simulator,name=iPhone 17' \ -derivedDataPath build \ - clean build + clean build | xcbeautify - name: Zip .app run: | @@ -38,7 +42,7 @@ jobs: zip -r Landmarks.app.zip Landmarks.app - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: Landmarks-iOS path: build/Build/Products/Debug-iphonesimulator/Landmarks.app.zip diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d9f825..51f9c19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,47 @@ on: workflow_dispatch: jobs: - macos-test: - runs-on: macOS-12 + package-tests: + runs-on: macos-latest steps: - - uses: actions/checkout@v3 - - name: Run tests - run: swift test + - uses: actions/checkout@v6 + + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode.app + + - name: Run Swift package tests + run: swift test + + app-builds: + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + include: + - name: iOS app + scheme: Landmarks + destination: platform=iOS Simulator,name=iPhone 17 + extra_args: "" + - name: macOS app + scheme: MacLandmarks + destination: platform=macOS + extra_args: CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO + steps: + - uses: actions/checkout@v6 + + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode.app + + - name: Install xcbeautify + run: brew install xcbeautify + + - name: Build ${{ matrix.name }} + run: | + set -o pipefail + xcodebuild \ + -project App/Landmarks.xcodeproj \ + -scheme "${{ matrix.scheme }}" \ + -configuration Debug \ + -destination "${{ matrix.destination }}" \ + ${{ matrix.extra_args }} \ + build | xcbeautify