| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | pull_request: |
| 5 | push: |
| 6 | branches: |
| 7 | - main |
| 8 | workflow_dispatch: |
| 9 | |
| 10 | concurrency: |
| 11 | group: ci-${{ github.ref }} |
| 12 | cancel-in-progress: true |
| 13 | |
| 14 | jobs: |
| 15 | swift-package: |
| 16 | name: Swift package |
| 17 | runs-on: macos-15 |
| 18 | |
| 19 | steps: |
| 20 | - name: Checkout |
| 21 | uses: actions/checkout@v4 |
| 22 | |
| 23 | - name: Select Xcode |
| 24 | uses: maxim-lobanov/setup-xcode@v1 |
| 25 | with: |
| 26 | xcode-version: latest-stable |
| 27 | |
| 28 | - name: Show toolchain |
| 29 | run: | |
| 30 | xcodebuild -version |
| 31 | swift --version |
| 32 | |
| 33 | - name: Build package |
| 34 | run: | |
| 35 | xcodebuild \ |
| 36 | -scheme JomloCollectionView \ |
| 37 | -destination "platform=iOS Simulator,name=iPhone 16 Pro" \ |
| 38 | CODE_SIGNING_ALLOWED=NO \ |
| 39 | build |
| 40 | |
| 41 | - name: Test package |
| 42 | run: | |
| 43 | xcodebuild \ |
| 44 | -scheme JomloCollectionView \ |
| 45 | -destination "platform=iOS Simulator,name=iPhone 16 Pro" \ |
| 46 | CODE_SIGNING_ALLOWED=NO \ |
| 47 | test |
| 48 | |
| 49 | example: |
| 50 | name: Example app |
| 51 | runs-on: macos-15 |
| 52 | |
| 53 | strategy: |
| 54 | fail-fast: false |
| 55 | matrix: |
| 56 | include: |
| 57 | - scheme: JomloCV Example iOS |
| 58 | destination: generic/platform=iOS Simulator |
| 59 | - scheme: JomloCV Example tvOS |
| 60 | destination: generic/platform=tvOS Simulator |
| 61 | |
| 62 | steps: |
| 63 | - name: Checkout |
| 64 | uses: actions/checkout@v4 |
| 65 | |
| 66 | - name: Select Xcode |
| 67 | uses: maxim-lobanov/setup-xcode@v1 |
| 68 | with: |
| 69 | xcode-version: latest-stable |
| 70 | |
| 71 | - name: Build ${{ matrix.scheme }} |
| 72 | run: | |
| 73 | xcodebuild \ |
| 74 | -project Example/JomloCollectionViewExample.xcodeproj \ |
| 75 | -scheme "${{ matrix.scheme }}" \ |
| 76 | -destination "${{ matrix.destination }}" \ |
| 77 | CODE_SIGNING_ALLOWED=NO \ |
| 78 | build |
| 79 | |
| 80 | podspec: |
| 81 | name: CocoaPods podspec |
| 82 | runs-on: macos-15 |
| 83 | |
| 84 | steps: |
| 85 | - name: Checkout |
| 86 | uses: actions/checkout@v4 |
| 87 | |
| 88 | - name: Select Xcode |
| 89 | uses: maxim-lobanov/setup-xcode@v1 |
| 90 | with: |
| 91 | xcode-version: latest-stable |
| 92 | |
| 93 | - name: Lint podspec |
| 94 | run: | |
| 95 | pod lib lint JomloCollectionView.podspec \ |
| 96 | --allow-warnings \ |
| 97 | --platforms=ios,tvos \ |
| 98 | --skip-import-validation |