|
| 1 | +name: Xcode Build Tests |
| 2 | + |
| 3 | +# START OF COMMON SECTION |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ 'master', 'main', 'release/**' ] |
| 7 | + pull_request: |
| 8 | + branches: [ '*' ] |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | +# END OF COMMON SECTION |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + if: github.repository_owner == 'wolfssl' |
| 18 | + runs-on: macos-latest |
| 19 | + # This should be a safe limit for the tests to run. |
| 20 | + timeout-minutes: 10 |
| 21 | + strategy: |
| 22 | + matrix: |
| 23 | + include: |
| 24 | + # macOS builds |
| 25 | + - target: wolfssl_osx |
| 26 | + arch: arm64 |
| 27 | + config: Release |
| 28 | + sdk: macosx |
| 29 | + name: macOS (ARM64, Release) |
| 30 | + - target: wolfssl_osx |
| 31 | + arch: x86_64 |
| 32 | + config: Release |
| 33 | + sdk: macosx |
| 34 | + name: macOS (x86_64, Release) |
| 35 | + - target: wolfssl_osx |
| 36 | + arch: arm64 |
| 37 | + config: Debug |
| 38 | + sdk: macosx |
| 39 | + name: macOS (ARM64, Debug) |
| 40 | + - target: wolfssl_osx |
| 41 | + arch: x86_64 |
| 42 | + config: Debug |
| 43 | + sdk: macosx |
| 44 | + name: macOS (x86_64, Debug) |
| 45 | + # Universal build (both architectures) |
| 46 | + - target: wolfssl_osx |
| 47 | + arch: arm64 |
| 48 | + arch2: x86_64 |
| 49 | + config: Release |
| 50 | + sdk: macosx |
| 51 | + name: macOS (Universal, Release) |
| 52 | + universal: true |
| 53 | + # tvOS builds |
| 54 | + - target: wolfssl_tvos |
| 55 | + arch: arm64 |
| 56 | + config: Release |
| 57 | + sdk: appletvos |
| 58 | + name: tvOS (ARM64, Release) |
| 59 | + - target: wolfssl_tvos |
| 60 | + arch: arm64 |
| 61 | + config: Release |
| 62 | + sdk: appletvsimulator |
| 63 | + name: tvOS Simulator (ARM64, Release) |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v4 |
| 66 | + |
| 67 | + - name: Build wolfSSL with Xcode (${{ matrix.name }}) |
| 68 | + working-directory: ./IDE/XCODE |
| 69 | + run: | |
| 70 | + if [ "${{ matrix.universal }}" == "true" ]; then |
| 71 | + xcodebuild -project wolfssl.xcodeproj \ |
| 72 | + -target ${{ matrix.target }} \ |
| 73 | + -configuration ${{ matrix.config }} \ |
| 74 | + -arch ${{ matrix.arch }} \ |
| 75 | + -arch ${{ matrix.arch2 }} \ |
| 76 | + -sdk ${{ matrix.sdk }} \ |
| 77 | + SYMROOT=build \ |
| 78 | + OBJROOT=build \ |
| 79 | + build |
| 80 | + else |
| 81 | + xcodebuild -project wolfssl.xcodeproj \ |
| 82 | + -target ${{ matrix.target }} \ |
| 83 | + -configuration ${{ matrix.config }} \ |
| 84 | + -arch ${{ matrix.arch }} \ |
| 85 | + -sdk ${{ matrix.sdk }} \ |
| 86 | + SYMROOT=build \ |
| 87 | + OBJROOT=build \ |
| 88 | + build |
| 89 | + fi |
0 commit comments