8
8
- master
9
9
release :
10
10
types : [published]
11
+
11
12
jobs :
12
13
tar_gz :
13
14
name : Package
@@ -16,109 +17,132 @@ jobs:
16
17
- uses : actions/checkout@master
17
18
- uses : actions/setup-python@master
18
19
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
21
22
- run : python setup.py sdist
22
23
- uses : actions/upload-artifact@v3
23
24
with :
24
25
name : dist
25
26
path : dist
26
27
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
29
46
strategy :
30
47
fail-fast : false
31
48
matrix :
32
- os : [macos-12, ubuntu-22.04, windows-2022]
33
- major : [3]
49
+ os : ${{ fromJson(needs.matrix_config.outputs.matrix_os) }}
34
50
minor : [8]
35
51
runs-on : ${{ matrix.os }}
36
52
steps :
37
53
- uses : actions/checkout@master
38
54
- uses : actions/setup-python@master
39
55
- 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'
41
57
- run : echo '::add-matcher::.github/problem-matchers/msvc.json'
42
58
if : matrix.os == 'windows-2022'
43
59
44
-
60
+ - run : pip install pipx
61
+
45
62
with :
46
63
output-dir : dist
47
64
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
53
70
CIBW_TEST_COMMAND : pytest {project}/test
54
71
- uses : actions/upload-artifact@v3
55
72
with :
56
73
name : dist
57
74
path : dist
58
75
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
61
79
strategy :
62
80
fail-fast : false
63
81
matrix :
64
- os : [macos-12, ubuntu-22.04, windows-2022]
65
- major : [3]
82
+ os : ${{fromJson(needs.matrix_config.outputs.matrix_os)}}
66
83
minor : [9, 10, 11]
67
84
runs-on : ${{ matrix.os }}
68
85
steps :
69
86
- uses : actions/checkout@master
70
87
- uses : actions/setup-python@master
71
88
- 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'
73
90
- run : echo '::add-matcher::.github/problem-matchers/msvc.json'
74
91
if : matrix.os == 'windows-2022'
75
92
76
-
93
+ - run : pip install pipx
94
+
77
95
with :
78
96
output-dir : dist
79
97
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
85
103
CIBW_TEST_COMMAND : pytest {project}/test
86
104
- uses : actions/upload-artifact@v3
87
105
with :
88
106
name : dist
89
107
path : dist
90
108
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
93
112
strategy :
94
113
fail-fast : false
95
114
matrix :
96
- os : [ubuntu-22.04]
97
- major : [3]
98
- minor : [11]
115
+ os : ${{fromJson(needs.matrix_config.outputs.matrix_os)}}
116
+ minor : [12]
99
117
runs-on : ${{ matrix.os }}
100
118
steps :
101
119
- uses : actions/checkout@master
102
120
- uses : actions/setup-python@master
103
121
- 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'
105
123
- run : echo '::add-matcher::.github/problem-matchers/msvc.json'
106
124
if : matrix.os == 'windows-2022'
107
125
108
-
126
+ - run : pip install pipx
127
+
109
128
with :
110
129
output-dir : dist
111
130
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
116
136
CIBW_TEST_COMMAND : pytest {project}/test
137
+ - uses : actions/upload-artifact@v3
138
+ with :
139
+ name : dist
140
+ path : dist
117
141
118
142
upload :
119
143
name : Publish
120
144
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 ]
122
146
runs-on : ubuntu-22.04
123
147
steps :
124
148
- uses : actions/download-artifact@v3
0 commit comments