-
Notifications
You must be signed in to change notification settings - Fork 29
112 lines (106 loc) · 3.51 KB
/
package.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
name: Python package
on: [push]
jobs:
build_wheel:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
build_type: [Release]
c_compiler: [clang]
python-version: ['3.11']
# python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.3
- name: MacOS dpendencies
if: ${{ runner.os == 'macOS' }}
run: |
brew install gsl
brew install hdf5
- name: Windows dependencies
if: ${{ runner.os == 'Windows' }}
uses: mamba-org/setup-micromamba@v1
with:
environment-name: moose
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
pkg-config
clang
hdf5
pybind11[global]
graphviz
pytables
numpy
matplotlib
vpython
lxml
doxygen
setuptools
wheel
meson
ninja
meson-python
gsl
cibuildwheel
post-cleanup: all
generate-run-shell: false
- name: Linux package
if: runner.os == 'Linux'
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL: 'uname -a'
CIBW_BEFORE_ALL_LINUX: >
yum install -y epel-release &&
yum install -y pkgconfig &&
yum install -y gsl-devel &&
yum install -y hdf5-devel
CIBW_BUILD: '*-manylinux_x86_64'
CIBW_SKIP: 'pp*'
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux_2_28
run: |
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse
- name: MacOS package
if: runner.os == 'macOS'
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL: 'uname -a'
CIBW_BEFORE_ALL_MACOS: >
brew uninstall pkg-config || :
brew uninstall pkg-config@0.29.2 || :
brew install gsl hdf5 meson ninja cmake &&
export PKG_CONFIG=`which pkg-config` &&
echo "<<<<<<<<<#########################################>>>>>>>>>>" &&
echo "$$$$$ `pkg-config --libs gsl`" &&
echo "@@@@@ `pkg-config --cflags gsl`"
CIBW_ARCHS: 'arm64'
CIBW_BUILD: '*-macosx_arm64'
CIBW_SKIP: 'pp* cp38*'
run: |
export "MACOSX_DEPLOYMENT_TARGET=$(echo ${{ matrix.os }} | cut -c 7-8).0" # required because gsl2.8 has minimum target of 14.0
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse
- name: Windows package
if: runner.os == 'Windows'
env:
CIBW_BEFORE_ALL: 'uname -a'
CIBW_BUILD: '*-win_*'
CIBW_SKIP: '*-win32 pp*'
run: |
micromamba shell hook -s powershell | Out-String | Invoke-Expression
micromamba activate moose
python -m cibuildwheel --output-dir wheelhouse
dir wheelhouse
- name: Upload packages
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "wheelhouse/pymoose*.whl"