|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + |
| 5 | +env: |
| 6 | + FORCE_COLOR: "1" |
| 7 | + |
| 8 | +defaults: |
| 9 | + run: |
| 10 | + shell: bash |
| 11 | + |
| 12 | +# Cancel active CI runs for a PR before starting another run |
| 13 | +concurrency: |
| 14 | + group: ${{ github.ref }} |
| 15 | + cancel-in-progress: true |
| 16 | + |
| 17 | +jobs: |
| 18 | + build: |
| 19 | + runs-on: macOS-latest |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + target: ['macOS', 'iOS', 'tvOS', 'watchOS'] |
| 24 | + include: |
| 25 | + - briefcase-run-args: |
| 26 | + - run-tests: false |
| 27 | + |
| 28 | + - target: macOS |
| 29 | + run-tests: true |
| 30 | + |
| 31 | + - target: iOS |
| 32 | + briefcase-run-args: ' -d "iPhone SE (3rd generation)"' |
| 33 | + run-tests: true |
| 34 | + |
| 35 | + steps: |
| 36 | + |
| 37 | + |
| 38 | + - name: Extract config variables |
| 39 | + id: config-vars |
| 40 | + run: | |
| 41 | + PYTHON_VER=$(make config | grep "PYTHON_VER=" | cut -d "=" -f 2) |
| 42 | + echo "PYTHON_VER=${PYTHON_VER}" | tee -a ${GITHUB_OUTPUT} |
| 43 | +
|
| 44 | + - name: Set up Python |
| 45 | + |
| 46 | + with: |
| 47 | + # Appending -dev ensures that we can always build the dev release. |
| 48 | + # It's a no-op for versions that have been published. |
| 49 | + python-version: ${{ steps.config-vars.outputs.PYTHON_VER }}-dev |
| 50 | + |
| 51 | + - name: Build ${{ matrix.target }} |
| 52 | + run: | |
| 53 | + # Do the build for the requested target. |
| 54 | + make ${{ matrix.target }} |
| 55 | +
|
| 56 | + - name: Upload build artefacts |
| 57 | + |
| 58 | + with: |
| 59 | + name: Python-${{ steps.config-vars.outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom.tar.gz |
| 60 | + path: dist/Python-${{ steps.config-vars.outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom.tar.gz |
| 61 | + |
| 62 | + |
| 63 | + if: matrix.run-tests |
| 64 | + with: |
| 65 | + repository: beeware/Python-support-testbed |
| 66 | + path: Python-support-testbed |
| 67 | + # TODO - remove the py3.13 reference option. |
| 68 | + ref: py3.13-support |
| 69 | + |
| 70 | + - name: Install dependencies |
| 71 | + if: matrix.run-tests |
| 72 | + run: | |
| 73 | + # TODO - Revert to the development version of Briefcase |
| 74 | + # Use the development version of Briefcase |
| 75 | + # python -m pip install git+https://github.com/beeware/briefcase.git |
| 76 | + python -m pip install git+https://github.com/freakboy3742/briefcase.git@version-bumps |
| 77 | +
|
| 78 | + - name: Run support testbed check |
| 79 | + if: matrix.run-tests |
| 80 | + timeout-minutes: 10 |
| 81 | + working-directory: Python-support-testbed |
| 82 | + # TODO - remove the template_branch option. |
| 83 | + run: briefcase run ${{ matrix.target }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${{ steps.config-vars.outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom.tar.gz\' -C template_branch=\'framework-lib\' |
0 commit comments