-
Notifications
You must be signed in to change notification settings - Fork 2
206 lines (176 loc) · 4.84 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: Deploy
on: push
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner
os: [ubuntu-latest, windows-latest, macos-13]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install build tools
run: python -m pip install --upgrade pip setuptools==75.3.0
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
# build-linux:
# name: Build linux Python wheels
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - uses: actions/setup-python@v5
#
# - name: Install build tools
# run: python -m pip install --upgrade pip cibuildwheel==2.22.0 setuptools==75.3.0
#
# - name: Build wheels
# run: python -m cibuildwheel --output-dir wheelhouse
#
# - uses: actions/upload-artifact@master
# with:
# name: linux-wheel
# path: ./wheelhouse/*.whl
#
#
# build-windows:
# name: Build windows Python wheel
# runs-on: windows-2022
# env:
# CC: cl
# CXX: cl
## CIBW_BUILD_VERBOSITY: 3
#
# steps:
# - name: Clone UP Fast Downward repository
# uses: actions/checkout@v4
#
# - uses: actions/setup-python@v3
#
# - name: Install cibuildwheel
# run: python -m pip install cibuildwheel==2.22.0
#
# - uses: ilammy/msvc-dev-cmd@v1
#
# - name: Build 64-bit wheel
# run: python -m cibuildwheel --output-dir dist
## env:
## CIBW_BUILD: cp36-win_amd64
#
# - uses: actions/upload-artifact@master
# with:
# name: windows-wheel
# path: dist/*.whl
#
#
# build-mac:
# name: Build macOS Python wheel
# runs-on: macOS-11
# steps:
# - uses: actions/checkout@v4
#
# - uses: actions/setup-python@v3
#
# - name: Install cibuildwheel
# run: python -m pip install cibuildwheel==2.22.0
#
# - name: Build wheel
# run: python -m cibuildwheel --output-dir dist
# env:
# CIBW_ARCHS_MACOS: "x86_64 arm64"
#
# - uses: actions/upload-artifact@master
# with:
# name: mac-wheel
# path: dist/*.whl
run-tox-test:
name: Test wheels
#needs: [build-linux, build-mac]
needs: [build_wheels]
runs-on: ${{ matrix.version.os }}
strategy:
matrix:
version:
- {os: ubuntu-latest, python: '3.10'}
- {os: macOS-13, python: '3.10'}
steps:
- name: Clone repository
uses: actions/checkout@v4
- uses: actions/download-artifact@master
with:
name: cibw-wheels-ubuntu-latest
path: dist
- uses: actions/download-artifact@master
with:
name: cibw-wheels-macos-13
path: dist
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version.python }}
- name: Install dependencies
run: |
pip3 install tox
- name: Run basic test
run: |
cd misc/
PIP_FIND_LINKS='${{ github.workspace }}/dist' tox -e unified-planning
run-tox-test-windows:
name: Test wheels
needs: [build_wheels]
#needs: [build-windows]
runs-on: ${{ matrix.version.os }}
strategy:
matrix:
version:
- {os: windows-2019, python: '3.8'}
- {os: windows-2022, python: '3.10'}
steps:
- name: Clone repository
uses: actions/checkout@v4
- uses: actions/download-artifact@master
with:
name: cibw-wheels-windows-latest
path: dist
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version.python }}
- name: Install dependencies
run: |
pip3 install tox
- name: Run basic test
run: |
cd misc/
$env:PIP_FIND_LINKS='${{ github.workspace }}\dist'; tox -e unified-planning
deploy-pypi:
runs-on: ubuntu-latest
needs: [run-tox-test, run-tox-test-windows]
if: github.ref == 'refs/heads/main' # We only deploy on master commits
steps:
- uses: actions/download-artifact@master
with:
name: cibw-wheels-ubuntu-latest
path: dist
- uses: actions/download-artifact@master
with:
name: cibw-wheels-windows-latest
path: dist
- uses: actions/download-artifact@master
with:
name: cibw-wheels-macos-13
path: dist
- run: ls dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}