9 jobs: |
9 jobs: |
10 clear-cache: |
10 clear-cache: |
11 name: clear-cache |
11 name: clear-cache |
12 runs-on: ubuntu-latest |
12 runs-on: ubuntu-latest |
13 steps: |
13 steps: |
|
14 - name: Dump github context |
|
15 run: echo "$GITHUB_CONTEXT" |
|
16 shell: bash |
|
17 env: |
|
18 GITHUB_CONTEXT: ${{ toJson(github) }} |
14 - name: setup python for clear-cache |
19 - name: setup python for clear-cache |
|
20 if: github.event.repository.name == 'pyRXP-mirror' |
15 uses: actions/setup-python@v2 |
21 uses: actions/setup-python@v2 |
16 with: |
22 with: |
17 python-version: 3.9 |
23 python-version: 3.9 |
18 - name: clear |
24 - name: clear |
|
25 if: github.event.repository.name == 'pyRXP-mirror' |
19 env: |
26 env: |
20 CITOOLS_USER: "${{secrets.CITOOLS_USER}}" |
27 CITOOLS_USER: "${{secrets.CITOOLS_USER}}" |
21 CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}" |
28 CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}" |
22 run: | |
29 run: | |
23 python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U |
30 python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U |
24 python -mrl_ci_tools clear-cache "cibuildwheel/pyRXP" |
31 python -mrl_ci_tools clear-cache "pyRXP" |
25 echo "cleared remote cache for cibuildwheel/pyRXP" |
32 echo "cleared remote cache for pyRXP" |
26 build-wheels-linux-mac-windows: |
33 build-wheels-linux-mac-windows: |
27 needs: [clear-cache] |
34 needs: [clear-cache] |
28 name: Build wheels on ${{ matrix.os }} |
35 name: Build wheels on ${{ matrix.os }} |
29 runs-on: ${{ matrix.os }} |
36 runs-on: ${{ matrix.os }} |
30 env: |
37 env: |
31 CIBW_SKIP: pp* cp37-macosx-arm64 cp37-macosx-universal2 cp36-macosx-arm64 cp36-macosx-universal2 |
38 CIBW_SKIP: pp* *-musllinux_* cp37-macosx_arm64 *-macosx_universal2 cp36-macosx_arm64 cp36-macosx_universal2 |
32 #CIBW_BEFORE_BUILD_LINUX: yum install cairo-devel -y |
39 #CIBW_BEFORE_BUILD_LINUX: yum install cairo-devel -y |
33 CIBW_BEFORE_TEST: pip install --no-cache-dir psutil |
40 CIBW_BEFORE_TEST: pip install --no-cache-dir psutil |
34 #CIBW_TEST_REQUIRES: "${{ matrix.os != 'macos-latest' && 'pyphen pycairo rlPyCairo' || 'pyphen' }}" |
41 CIBW_MANYLINUX_I686_IMAGE: manylinux2014 |
35 |
|
36 # Will avoid testing on emulated architectures |
42 # Will avoid testing on emulated architectures |
37 # Skip trying to test arm64 builds on Intel Macs |
43 # Skip trying to test arm64 builds on Intel Macs |
38 CIBW_TEST_SKIP: "*-manylinux_{aarch64,ppc64le,s390x} *-macosx_arm64 *-macosx_universal2:arm64" |
44 CIBW_TEST_SKIP: "*-manylinux_{aarch64,ppc64le,s390x} *-musllinux_* *-macosx_arm64 *-macosx_universal2:arm64" |
39 CIBW_TEST_COMMAND: python "{project}/test/runAll.py" |
45 CIBW_TEST_COMMAND: python "{project}/test/runAll.py" |
40 CIBW_TEST_COMMAND_WINDOWS: python "{project}\test\runAll.py" |
46 CIBW_TEST_COMMAND_WINDOWS: python "{project}\test\runAll.py" |
41 CIBW_BUILD_VERBOSITY: 3 |
47 CIBW_BUILD_VERBOSITY: 3 |
42 strategy: |
48 strategy: |
43 fail-fast: true |
49 fail-fast: true |
62 python -c "import os;print('+++++ cwd=%r;dir=%r' % (os.getcwd(),os.listdir('.')))" |
68 python -c "import os;print('+++++ cwd=%r;dir=%r' % (os.getcwd(),os.listdir('.')))" |
63 |
69 |
64 - name: Build wheels |
70 - name: Build wheels |
65 run: python -m cibuildwheel --output-dir wheelhouse |
71 run: python -m cibuildwheel --output-dir wheelhouse |
66 env: |
72 env: |
67 CIBW_ARCHS_LINUX: auto aarch64 #needs quemu setup |
73 CIBW_ARCHS_LINUX: all #auto aarch64 #needs quemu setup |
68 CIBW_ARCHS_MACOS: x86_64 arm64 universal2 |
74 CIBW_ARCHS_MACOS: x86_64 arm64 universal2 |
69 |
75 |
70 - name: upload wheels |
76 - name: upload wheels |
71 env: |
77 env: |
72 CITOOLS_USER: "${{secrets.CITOOLS_USER}}" |
78 CITOOLS_USER: "${{secrets.CITOOLS_USER}}" |
73 CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}" |
79 CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}" |
74 run: | |
80 run: | |
75 python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U |
81 python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U |
76 python -mrl_ci_tools upload-caches --subdir="cibuildwheel/pyRXP" --verbosity=1 ./wheelhouse/*.whl |
82 python -mrl_ci_tools upload-caches --subdir="pyRXP" --verbosity=1 ./wheelhouse/*.whl |
77 python -mrl_ci_tools env-upload |
83 python -mrl_ci_tools env-upload |
78 |
84 |
79 - uses: actions/upload-artifact@v2 |
85 - uses: actions/upload-artifact@v2 |
80 with: |
86 with: |
81 name: pyrxp-lin-win-mac |
87 name: pyrxp-lin-win-mac |
82 path: ./wheelhouse/*.whl |
88 path: ./wheelhouse/*.whl |
83 email: |
89 email: |
|
90 if: github.event.repository.name == 'pyRXP-mirror' |
84 name: email |
91 name: email |
85 needs: [build-wheels-linux-mac-windows] |
92 needs: [build-wheels-linux-mac-windows] |
86 runs-on: ubuntu-latest |
93 runs-on: ubuntu-latest |
87 steps: |
94 steps: |
88 - name: setup python for upload |
95 - name: setup python for upload |
93 env: |
100 env: |
94 CITOOLS_USER: "${{secrets.CITOOLS_USER}}" |
101 CITOOLS_USER: "${{secrets.CITOOLS_USER}}" |
95 CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}" |
102 CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}" |
96 run: | |
103 run: | |
97 python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U |
104 python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U |
98 BODY="$(python -mrl_ci_tools cache-info --subdir="cibuildwheel/pyRXP" '*.whl')" |
105 BODY="$(python -mrl_ci_tools cache-info --subdir="pyRXP" '*.whl')" |
99 NUPLOADS=$(expr $(echo "$BODY" | wc -l) - 1) |
106 NUPLOADS=$(expr $(echo "$BODY" | wc -l) - 1) |
100 SUBJECT="$NUPLOADS pyRXP wheels uploaded to cibuildwheel/pyRXP by github" |
107 SUBJECT="$NUPLOADS pyRXP wheels uploaded to pypi/caches/pyRXP folder by github" |
101 python -mrl_ci_tools email --subject="$SUBJECT" --body="$BODY" |
108 python -mrl_ci_tools email --subject="$SUBJECT" --body="$BODY" |
102 echo "$SUBJECT" |
109 echo "$SUBJECT" |
103 echo "$BODY" |
110 echo "$BODY" |