55 branches :
66 - main
77 - 3.*
8+ workflow_call :
9+ inputs :
10+ build-number :
11+ description : " The build number to add to the built package"
12+ default : " custom"
13+ type : " string"
14+ outputs :
15+ PYTHON_VER :
16+ description : " The Python major.minor version."
17+ value : ${{ jobs.config.outputs.PYTHON_VER }}
18+ PYTHON_VERSION :
19+ description : " The full Python version."
20+ value : ${{ jobs.config.outputs.PYTHON_VERSION }}
21+ BZIP2_VERSION :
22+ description : " The BZip2 version used for the build."
23+ value : ${{ jobs.config.outputs.BZIP2_VERSION }}
24+ LIBFFI_VERSION :
25+ description : " The libFFI version used for the build."
26+ value : ${{ jobs.config.outputs.LIBFFI_VERSION }}
27+ MPDECIMAL_VERSION :
28+ description : " The mpdecimal version used for the build."
29+ value : ${{ jobs.config.outputs.MPDECIMAL_VERSION }}
30+ OPENSSL_VERSION :
31+ description : " The OpenSSL version used for the build."
32+ value : ${{ jobs.config.outputs.OPENSSL_VERSION }}
33+ XZ_VERSION :
34+ description : " The XZ version used for the build."
35+ value : ${{ jobs.config.outputs.XZ_VERSION }}
836
937env :
1038 FORCE_COLOR : " 1"
@@ -19,8 +47,49 @@ concurrency:
1947 cancel-in-progress : true
2048
2149jobs :
50+ config :
51+ runs-on : macOS-latest
52+ outputs :
53+ PYTHON_VER : ${{ steps.extract.outputs.PYTHON_VER }}
54+ PYTHON_VERSION : ${{ steps.extract.outputs.PYTHON_VERSION }}
55+ BUILD_NUMBER : ${{ steps.extract.outputs.BUILD_NUMBER }}
56+ BZIP2_VERSION : ${{ steps.extract.outputs.BZIP2_VERSION }}
57+ LIBFFI_VERSION : ${{ steps.extract.outputs.LIBFFI_VERSION }}
58+ MPDECIMAL_VERSION : ${{ steps.extract.outputs.MPDECIMAL_VERSION }}
59+ OPENSSL_VERSION : ${{ steps.extract.outputs.OPENSSL_VERSION }}
60+ XZ_VERSION : ${{ steps.extract.outputs.XZ_VERSION }}
61+
62+ steps :
63+ 64+
65+ - name : Extract config variables
66+ id : extract
67+ run : |
68+ PYTHON_VER=$(make config | grep "PYTHON_VER=" | cut -d "=" -f 2)
69+ PYTHON_VERSION=$(make config | grep "PYTHON_VERSION=" | cut -d "=" -f 2)
70+ BZIP2_VERSION=$(make config | grep "BZIP2_VERSION=" | cut -d "=" -f 2)
71+ LIBFFI_VERSION=$(make config | grep "LIBFFI_VERSION=" | cut -d "=" -f 2)
72+ MPDECIMAL_VERSION=$(make config | grep "MPDECIMAL_VERSION=" | cut -d "=" -f 2)
73+ OPENSSL_VERSION=$(make config | grep "OPENSSL_VERSION=" | cut -d "=" -f 2)
74+ XZ_VERSION=$(make config | grep "XZ_VERSION=" | cut -d "=" -f 2)
75+ if [ -z "${{ inputs.build-number }}" ]; then
76+ BUILD_NUMBER=custom
77+ else
78+ BUILD_NUMBER=${{ inputs.build-number }}
79+ fi
80+
81+ echo "PYTHON_VER=${PYTHON_VER}" | tee -a ${GITHUB_OUTPUT}
82+ echo "PYTHON_VERSION=${PYTHON_VERSION}" | tee -a ${GITHUB_OUTPUT}
83+ echo "BUILD_NUMBER=${BUILD_NUMBER}" | tee -a ${GITHUB_OUTPUT}
84+ echo "BZIP2_VERSION=${BZIP2_VERSION}" | tee -a ${GITHUB_OUTPUT}
85+ echo "LIBFFI_VERSION=${LIBFFI_VERSION}" | tee -a ${GITHUB_OUTPUT}
86+ echo "MPDECIMAL_VERSION=${MPDECIMAL_VERSION}" | tee -a ${GITHUB_OUTPUT}
87+ echo "OPENSSL_VERSION=${OPENSSL_VERSION}" | tee -a ${GITHUB_OUTPUT}
88+ echo "XZ_VERSION=${XZ_VERSION}" | tee -a ${GITHUB_OUTPUT}
89+
2290 build :
2391 runs-on : macOS-latest
92+ needs : [ config ]
2493 strategy :
2594 fail-fast : false
2695 matrix :
@@ -39,29 +108,23 @@ jobs:
39108 steps :
4010941110
42- - name : Extract config variables
43- id : config-vars
44- run : |
45- PYTHON_VER=$(make config | grep "PYTHON_VER=" | cut -d "=" -f 2)
46- echo "PYTHON_VER=${PYTHON_VER}" | tee -a ${GITHUB_OUTPUT}
47-
48111 - name : Set up Python
4911250113 with :
51114 # Appending -dev ensures that we can always build the dev release.
52115 # It's a no-op for versions that have been published.
53- python-version : ${{ steps .config-vars .outputs.PYTHON_VER }}-dev
116+ python-version : ${{ needs .config.outputs.PYTHON_VER }}-dev
54117
55118 - name : Build ${{ matrix.target }}
56119 run : |
57120 # Do the build for the requested target.
58- make ${{ matrix.target }}
121+ make ${{ matrix.target }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
59122
60123 - name : Upload build artefacts
6112462125 with :
63- name : Python-${{ steps .config-vars .outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom .tar.gz
64- path : dist/Python-${{ steps .config-vars .outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom .tar.gz
126+ name : Python-${{ needs .config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }} .tar.gz
127+ path : dist/Python-${{ needs .config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }} .tar.gz
65128
6612967130 if : matrix.run-tests
84147 timeout-minutes : 10
85148 working-directory : Python-support-testbed
86149 # TODO - remove the template_branch option.
87- 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\'
150+ run : briefcase run ${{ matrix.target }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${{ needs .config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }} .tar.gz\' -C template_branch=\'framework-lib\'
0 commit comments