xcodebuild.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: xcodebuild
  2. on:
  3. push:
  4. branches: [master]
  5. paths:
  6. - '.github/workflows/xcodebuild.yml'
  7. - 'Base32.xcodeproj/**'
  8. - 'Sources/**'
  9. - 'Tests/**'
  10. - '!Tests/LinuxMain.swift'
  11. pull_request:
  12. paths:
  13. - '.github/workflows/xcodebuild.yml'
  14. - 'Base32.xcodeproj/**'
  15. - 'Sources/**'
  16. - 'Tests/**'
  17. - '!Tests/LinuxMain.swift'
  18. jobs:
  19. xcodebuild:
  20. strategy:
  21. fail-fast: false
  22. matrix:
  23. xcode_version: ['11.3.1', '11.7', '12']
  24. xcode_flags: ['-scheme Base32 -enableCodeCoverage YES -parallel-testing-enabled NO test']
  25. xcode_flags_for_build_only: ['-scheme Base32 build']
  26. runs-on: macOS-10.15
  27. env:
  28. DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
  29. steps:
  30. - uses: actions/checkout@v1
  31. - run: xcodebuild -version
  32. - name: macOS
  33. run: xcodebuild ${{ matrix.xcode_flags }} | xcpretty
  34. shell: bash
  35. - name: iPhone Simulator
  36. run: xcodebuild ${{ matrix.xcode_flags }} -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty
  37. shell: bash
  38. - name: Apple TV Simulator
  39. run: xcodebuild ${{ matrix.xcode_flags }} -sdk appletvsimulator -destination "name=Apple TV 4K" | xcpretty
  40. shell: bash
  41. - name: watchOS Simulator
  42. run: xcodebuild ${{ matrix.xcode_flags_for_build_only }} -sdk watchsimulator | xcpretty
  43. shell: bash
  44. - name: Codecov
  45. if: matrix.xcode_version == '12'
  46. run: curl -s https://codecov.io/bash | bash -s -- -t ${{ secrets.CODECOV_TOKEN }}
  47. shell: bash