forked from FloatingArrayDesign/MoorDyn
-
Notifications
You must be signed in to change notification settings - Fork 2
186 lines (157 loc) · 4.92 KB
/
python-wheels.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
name: Python-Wheels
on:
push:
branches: [ $default-branch, master, python ]
permissions: write-all
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VTK_VERSION_MAJOR: 9
VTK_VERSION_MINOR: 2
VTK_VERSION_PATCH: 6
jobs:
build_wheels:
name: Build Python wheels x86_64
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
# Used to host cibuildwheel
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Create setup.py
run: |
mv wrappers/python/wheels.github/* ./
python set_version.py
python set_eigen_data.py
rm set_version.py set_eigen_data.py
cat pyproject.toml
shell: bash
- name: Build the source distribution
run: |
python -m pip install -U pip setuptools
python setup.py sdist
if: runner.os == 'Linux'
- uses: actions/upload-artifact@v4
id: build_wheels
with:
name: python-wheels-sdist
path: ./dist/*
build_Linux_x86_64:
name: Build Linux_x86_64
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "x86_64"
secrets: inherit
build_Windows_AMD64:
name: Build Windows_AMD64
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["windows-latest"]'
arch: "AMD64"
secrets: inherit
build_MacOS_x86_64:
name: Build Windows_x86_64
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["macOS-latest"]'
arch: "x86_64"
secrets: inherit
build_Linux_i686:
name: Build Linux_i686
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "i686"
secrets: inherit
build_Linux_aarch64:
name: Build Linux_aarch64
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "aarch64"
secrets: inherit
build_Linux_ppc64le:
name: Build Linux_ppc64le
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "ppc64le"
secrets: inherit
build_Linux_s390x:
name: Build Linux_s390x
uses: core-marine-dev/MoorDyn/.github/workflows/python-wheels-emulated.yml@python
with:
os: '["ubuntu-22.04"]'
arch: "s390x"
secrets: inherit
publish:
runs-on: ${{ matrix.os }}
needs: [build_wheels, build_Linux_x86_64, build_Windows_AMD64, build_MacOS_x86_64, build_Linux_i686, build_Linux_aarch64, build_Linux_ppc64le, build_Linux_s390x]
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- name: Download sdist
uses: actions/download-artifact@v3
with:
name: python-wheels-sdist
path: dist/
- name: Download Linux_x86_64
uses: actions/download-artifact@v3
with:
name: python-wheels-Linux_x86_64
path: dist/
- name: Download Windows_AMD64
uses: actions/download-artifact@v3
with:
name: python-wheels-Windows_AMD64
path: dist/
- name: Download MacOS_x86_64
uses: actions/download-artifact@v3
with:
name: python-wheels-MacOS_x86_64
path: dist/
- name: Download Linux_i686
uses: actions/download-artifact@v3
with:
name: python-wheels-Linux_i686
path: dist/
- name: Download Linux_aarch64
uses: actions/download-artifact@v3
with:
name: python-wheels-Linux_aarch64
path: dist/
- name: Download Linux_ppc64le
uses: actions/download-artifact@v3
with:
name: python-wheels-Linux_ppc64le
path: dist/
- name: Download Linux_s390x
uses: actions/download-artifact@v3
with:
name: python-wheels-Linux_s390x
path: dist/
- name: Download MacOS_universal2
uses: actions/download-artifact@v3
with:
name: python-wheels-MacOS_universal2
path: dist/
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.MOORDYN_TESTPYPI_API }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.MOORDYN_PYPI_API }}
repository-url: https://upload.pypi.org/legacy/
skip-existing: true
if: github.event_name == 'push' && github.ref == 'refs/heads/main'