88 - master
99 release :
1010 types : [published]
11+
1112jobs :
1213 tar_gz :
1314 name : Package
@@ -16,109 +17,132 @@ jobs:
1617 - uses : actions/checkout@master
1718 - uses : actions/setup-python@master
1819 with :
19- python-version : 3.8
20- - run : pip install -r requirements-build-backward .txt
20+ python-version : 3.12
21+ - run : pip install -r requirements-build-3_12 .txt
2122 - run : python setup.py sdist
2223 - uses : actions/upload-artifact@v3
2324 with :
2425 name : dist
2526 path : dist
2627
27- whl_lt_3_9 :
28- name : Build / ${{ matrix.os }} / Python ${{ matrix.major }}.${{ matrix.minor }}
28+ matrix_config :
29+ name : Matrix Runner Config
30+ runs-on : ubuntu-22.04
31+ outputs :
32+ matrix_os : ${{ steps.step.outputs.matrix_os }}
33+ steps :
34+ - run : echo "$GITHUB_EVENT_NAME"
35+ - id : step
36+ run : |
37+ if [ "$GITHUB_EVENT_NAME" = "release" ]; then
38+ echo 'matrix_os=["macos-13-xlarge", "ubuntu-22.04", "windows-2022"]' >> $GITHUB_OUTPUT
39+ else
40+ echo 'matrix_os=["macos-13", "ubuntu-22.04", "windows-2022"]' >> $GITHUB_OUTPUT
41+ fi
42+
43+ whl_3_8 :
44+ name : Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
45+ needs : matrix_config
2946 strategy :
3047 fail-fast : false
3148 matrix :
32- os : [macos-12, ubuntu-22.04, windows-2022]
33- major : [3]
49+ os : ${{ fromJson(needs.matrix_config.outputs.matrix_os) }}
3450 minor : [8]
3551 runs-on : ${{ matrix.os }}
3652 steps :
3753 - uses : actions/checkout@master
3854 - uses : actions/setup-python@master
3955 - run : echo '::add-matcher::.github/problem-matchers/gcc.json'
40- if : matrix.os == 'macos-12 ' || matrix.os == 'ubuntu-22.04'
56+ if : matrix.os == 'macos-13 ' || matrix.os == 'ubuntu-22.04'
4157 - run : echo '::add-matcher::.github/problem-matchers/msvc.json'
4258 if : matrix.os == 'windows-2022'
4359
44- - uses : pypa/cibuildwheel@v2.13.0
60+ - run : pip install pipx
61+ - uses : pypa/cibuildwheel@v2.16.2
4562 with :
4663 output-dir : dist
4764 env :
48- CIBW_ARCHS_MACOS : x86_64 universal2 arm64
49- CIBW_BEFORE_BUILD : pip install -r {project}/requirements-build-backward.txt
50- CIBW_BUILD : cp${{ matrix.major }}${{ matrix.minor }}-*
51- CIBW_BUILD_VERBOSITY : 1
52- CIBW_BEFORE_TEST : pip install -r {project}/requirements-test-backward .txt
65+ CIBW_BUILD : cp3${{ matrix.minor }}-*
66+ CIBW_ARCHS_WINDOWS : x86 AMD64
67+ CIBW_ARCHS_MACOS : x86_64 arm64
68+ CIBW_BEFORE_BUILD : pip install -r {project}/requirements-build-3_08.txt
69+ CIBW_BEFORE_TEST : pip install -r {project}/requirements-dev-3_08 .txt
5370 CIBW_TEST_COMMAND : pytest {project}/test
5471 - uses : actions/upload-artifact@v3
5572 with :
5673 name : dist
5774 path : dist
5875
59- whl_gte_3_9 :
60- name : Build / ${{ matrix.os }} / Python ${{ matrix.major }}.${{ matrix.minor }}
76+ whl_3_9_to_3_11 :
77+ name : Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
78+ needs : matrix_config
6179 strategy :
6280 fail-fast : false
6381 matrix :
64- os : [macos-12, ubuntu-22.04, windows-2022]
65- major : [3]
82+ os : ${{fromJson(needs.matrix_config.outputs.matrix_os)}}
6683 minor : [9, 10, 11]
6784 runs-on : ${{ matrix.os }}
6885 steps :
6986 - uses : actions/checkout@master
7087 - uses : actions/setup-python@master
7188 - run : echo '::add-matcher::.github/problem-matchers/gcc.json'
72- if : matrix.os == 'macos-12 ' || matrix.os == 'ubuntu-22.04'
89+ if : matrix.os == 'macos-13 ' || matrix.os == 'ubuntu-22.04'
7390 - run : echo '::add-matcher::.github/problem-matchers/msvc.json'
7491 if : matrix.os == 'windows-2022'
7592
76- - uses : pypa/cibuildwheel@v2.13.0
93+ - run : pip install pipx
94+ - uses : pypa/cibuildwheel@v2.16.2
7795 with :
7896 output-dir : dist
7997 env :
80- CIBW_ARCHS_MACOS : x86_64 universal2 arm64
81- CIBW_BEFORE_BUILD : pip install -r {project}/requirements-build.txt
82- CIBW_BUILD : cp${{ matrix.major }}${{ matrix.minor }}-*
83- CIBW_BUILD_VERBOSITY : 1
84- CIBW_BEFORE_TEST : pip install -r {project}/requirements-test .txt
98+ CIBW_BUILD : cp3${{ matrix.minor }}-*
99+ CIBW_ARCHS_WINDOWS : x86 AMD64
100+ CIBW_ARCHS_MACOS : x86_64 arm64
101+ CIBW_BEFORE_BUILD : pip install -r {project}/requirements-build-3_11.txt
102+ CIBW_BEFORE_TEST : pip install -r {project}/requirements-dev-3_11 .txt
85103 CIBW_TEST_COMMAND : pytest {project}/test
86104 - uses : actions/upload-artifact@v3
87105 with :
88106 name : dist
89107 path : dist
90108
91- forward :
92- name : Forward / ${{ matrix.os }} / Python ${{ matrix.major }}.${{ matrix.minor }}
109+ whl_3_12 :
110+ name : Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
111+ needs : matrix_config
93112 strategy :
94113 fail-fast : false
95114 matrix :
96- os : [ubuntu-22.04]
97- major : [3]
98- minor : [11]
115+ os : ${{fromJson(needs.matrix_config.outputs.matrix_os)}}
116+ minor : [12]
99117 runs-on : ${{ matrix.os }}
100118 steps :
101119 - uses : actions/checkout@master
102120 - uses : actions/setup-python@master
103121 - run : echo '::add-matcher::.github/problem-matchers/gcc.json'
104- if : matrix.os == 'macos-12 ' || matrix.os == 'ubuntu-22.04'
122+ if : matrix.os == 'macos-13 ' || matrix.os == 'ubuntu-22.04'
105123 - run : echo '::add-matcher::.github/problem-matchers/msvc.json'
106124 if : matrix.os == 'windows-2022'
107125
108- - uses : pypa/cibuildwheel@v2.13.0
126+ - run : pip install pipx
127+ - uses : pypa/cibuildwheel@v2.16.2
109128 with :
110129 output-dir : dist
111130 env :
112- CIBW_BEFORE_BUILD : pip install -r {project}/requirements-build.txt
113- CIBW_BUILD : cp${{ matrix.major }}${{ matrix.minor }}-*
114- CIBW_BUILD_VERBOSITY : 1
115- CIBW_BEFORE_TEST : pip install -r {project}/requirements-test-forward.txt
131+ CIBW_BUILD : cp3${{ matrix.minor }}-*
132+ CIBW_ARCHS_WINDOWS : AMD64 # testing requires pandas, which does not publish 3.12 32bit x86 wheels
133+ CIBW_ARCHS_MACOS : x86_64 arm64
134+ CIBW_BEFORE_BUILD : pip install -r {project}/requirements-build-3_12.txt
135+ CIBW_BEFORE_TEST : pip install -r {project}/requirements-dev-3_12.txt
116136 CIBW_TEST_COMMAND : pytest {project}/test
137+ - uses : actions/upload-artifact@v3
138+ with :
139+ name : dist
140+ path : dist
117141
118142 upload :
119143 name : Publish
120144 if : github.event_name == 'release'
121- needs : [tar_gz, whl_lt_3_9, whl_gte_3_9, forward ]
145+ needs : [tar_gz, whl_3_8, whl_3_9_to_3_11, whl_3_12 ]
122146 runs-on : ubuntu-22.04
123147 steps :
124148 - uses : actions/download-artifact@v3
0 commit comments