|
| 1 | +--- |
| 2 | +name: CI |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + - 'releases/*' |
| 9 | + pull_request: |
| 10 | + branches: |
| 11 | + - master |
| 12 | + |
| 13 | +jobs: |
| 14 | + build: |
| 15 | + name: Build |
| 16 | + runs-on: macOS-latest |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + platform: ['iOS Simulator,name=iPhone 8'] |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + - name: Analyze and Test |
| 23 | + run: | |
| 24 | + xcodebuild clean analyze test \ |
| 25 | + -destination "platform=${{ matrix.platform }}" \ |
| 26 | + -sdk "iphonesimulator" \ |
| 27 | + -project PINOperation.xcodeproj \ |
| 28 | + -scheme PINOperation \ |
| 29 | + ONLY_ACTIVE_ARCH=NO \ |
| 30 | + CODE_SIGNING_REQUIRED=NO \ |
| 31 | + CLANG_ANALYZER_OUTPUT=plist-html \ |
| 32 | + CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang" \ |
| 33 | + | xcpretty |
| 34 | + if [[ -n `find $(pwd)/clang -name "*.html"` ]] ; then rm -rf $(pwd)/clang; exit 1; fi |
| 35 | + rm -rf $(pwd)/clang |
| 36 | + cocoapods: |
| 37 | + name: CocoaPods |
| 38 | + runs-on: macOS-latest |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v2 |
| 41 | + - name: Lint |
| 42 | + run: pod lib lint |
| 43 | + carthage: |
| 44 | + name: Carthage |
| 45 | + runs-on: macOS-latest |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v2 |
| 48 | + - name: Build |
| 49 | + run: carthage build --no-skip-current |
| 50 | + spm: |
| 51 | + name: Swift Package Manager tests |
| 52 | + runs-on: macOS-latest |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v2 |
| 55 | + - name: Test |
| 56 | + run: swift test |
| 57 | + example: |
| 58 | + name: Build Example project |
| 59 | + runs-on: macOS-latest |
| 60 | + strategy: |
| 61 | + matrix: |
| 62 | + platform: ['iOS Simulator,name=iPhone 8'] |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v2 |
| 65 | + - name: Install Pods |
| 66 | + run: cd Example && pod install |
| 67 | + - name: Build |
| 68 | + run: | |
| 69 | + cd Example && xcodebuild clean analyze \ |
| 70 | + -destination "platform=${{ matrix.platform }}" \ |
| 71 | + -sdk "iphonesimulator" \ |
| 72 | + -workspace PINOperationExample.xcworkspace \ |
| 73 | + -scheme PINOperationExample \ |
| 74 | + ONLY_ACTIVE_ARCH=NO \ |
| 75 | + CODE_SIGNING_REQUIRED=NO \ |
| 76 | + CLANG_ANALYZER_OUTPUT=plist-html \ |
| 77 | + CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang" \ |
| 78 | + | xcpretty |
| 79 | + if [[ -n `find $(pwd)/clang -name "*.html"` ]] ; then rm -rf $(pwd)/clang; exit 1; fi |
| 80 | + rm -rf $(pwd)/clang |
0 commit comments