Repository navigation
chore: replace custom versioning scripts with nx release version plans #17
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: iOS | |
| # Native iOS pipeline: Swift 6 + SwiftPM + Xcode. Do not fold these jobs into ci.yml — those | |
| # Linux runners have no Swift or Xcode, and `nx affected --target=test` would otherwise invoke | |
| # `swift test` for any project tagged `platform:ios`. | |
| # | |
| # Path filters are the inverse of ci.yml's paths-ignore, so an iOS-only change runs here and not | |
| # there, a JS-only change runs there and not here, and a mixed PR runs both. Keep the two lists in | |
| # sync when adding iOS paths. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'ios/**' | |
| - 'packages/cds-ios/**' | |
| - 'apps/ios-gallery/**' | |
| - '.github/workflows/ios.yml' | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - 'ios/**' | |
| - 'packages/cds-ios/**' | |
| - 'apps/ios-gallery/**' | |
| - '.github/workflows/ios.yml' | |
| concurrency: | |
| group: iOS-${{github.ref_name}}-${{github.event_name == 'pull_request' && github.event.pull_request.number || github.sha}} | |
| cancel-in-progress: ${{github.event_name == 'pull_request'}} | |
| permissions: | |
| contents: read | |
| env: | |
| CI: true | |
| # No step-security/harden-runner step: that action only supports Ubuntu, and iOS builds must run on | |
| # macOS. This workflow needs no secrets. | |
| jobs: | |
| test: | |
| name: Build & Test (theme library) | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| # Same commands as `yarn nx run cds-ios:test` / `cds-ios:build-ios` (packages/cds-ios/project.json), | |
| # invoked directly so this workflow needs no Yarn, Node, or the JS install. | |
| - name: Swift test | |
| working-directory: packages/cds-ios | |
| run: swift test | |
| - name: Swift build (release) | |
| working-directory: packages/cds-ios | |
| run: swift build -c release | |
| simulator-build: | |
| name: iOS Simulator build (gallery app) | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install XcodeGen | |
| run: brew install xcodegen | |
| # Regenerate the (git-ignored) Xcode project from project.yml, then compile the iOS app | |
| # target for a simulator. This validates that the gallery sources — and the local | |
| # packages/cds-ios dependency — compile for the iOS SDK. Mirrors `yarn nx run ios-gallery:build-ios`. | |
| - name: Generate Xcode project | |
| working-directory: apps/ios-gallery | |
| run: xcodegen generate | |
| - name: Build CDSGalleryiOS for the Simulator | |
| working-directory: apps/ios-gallery | |
| run: | | |
| xcodebuild -project CDSGallery.xcodeproj -scheme CDSGalleryiOS \ | |
| -destination 'generic/platform=iOS Simulator' \ | |
| -derivedDataPath .build/xcode \ | |
| build |