Skip to content

Commit ba34612

Browse files
committed
Update of Github Actions Build
1 parent 458e29b commit ba34612

File tree

8 files changed

+75
-125
lines changed

8 files changed

+75
-125
lines changed

.github/dependabot.yml

-8
This file was deleted.

.github/workflows/deploy.yml

+54-46
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,73 @@
11
name: Deploy
2+
23
on:
34
push:
45
branches:
56
- deploy
6-
- main
7+
78

89

910
jobs:
10-
build:
11-
runs-on: "${{ matrix.os }}"
11+
12+
build_wheels:
13+
name: Build wheels on ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
18+
1219
steps:
1320
- uses: actions/checkout@v4
14-
- name: "Set up Python"
15-
uses: actions/setup-python@v5
16-
with:
17-
python-version: "${{ matrix.python-version }}"
18-
- name: "Install dependencies"
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install setuptools wheel numpy cython
22-
- uses: knicknic/[email protected]
21+
22+
- uses: actions/setup-python@v5
2323
with:
24-
linux: "python setup.py sdist"
25-
macos: "python setup.py bdist_wheel"
26-
windows: "python setup.py bdist_wheel"
27-
- uses: actions/upload-artifact@v3
24+
python-version: '3.11'
25+
26+
- name: Install cibuildwheel
27+
run: python -m pip install cibuildwheel==2.23.2
28+
29+
- name: Build wheels
30+
run: python -m cibuildwheel --output-dir dist
31+
env:
32+
CIBW_BUILD_VERBOSITY: 1
33+
CIBW_BEFORE_ALL_MACOS: export LDFLAGS="-arch arm64"
34+
CIBW_BUILD: cp*
35+
# CIBW_BUILD: cp311-*
36+
37+
- uses: actions/upload-artifact@v4
2838
with:
29-
name: dist
30-
path: dist
31-
overwrite: true
32-
strategy:
33-
matrix:
34-
os:
35-
- windows-latest
36-
- macos-latest
37-
python-version:
38-
- "3.9"
39-
- "3.10"
40-
- "3.11"
41-
- "3.12"
42-
include:
43-
- os: ubuntu-latest
44-
python-version: "3.11"
45-
46-
build-manylinux:
39+
name: wheels-${{ matrix.os }}-${{ strategy.job-index }}
40+
path: ./dist/*.whl
41+
42+
build_sdist:
4743
runs-on: ubuntu-latest
4844
steps:
4945
- uses: actions/checkout@v4
50-
- name: Set up Python
46+
47+
- name: Install Python 3
5148
uses: actions/setup-python@v5
5249
with:
53-
python-version: 3.9
54-
- uses: RalfG/[email protected]_x86_64
55-
with:
56-
build-requirements: "cython numpy"
57-
pip-wheel-args: "-w ./dist --no-deps"
58-
python-versions: "cp39-cp39 cp310-cp310 cp311-cp311"
59-
- name: "Remove non-compatible packages"
60-
run: "sudo rm dist/*linux_x86_64.whl\n"
61-
- uses: actions/upload-artifact@v3
50+
python-version: '3.11'
51+
52+
- name: Install Dependencies
53+
run: |
54+
pip install setuptools
55+
56+
- name: Install pymoo
57+
run: |
58+
python setup.py sdist
59+
60+
- uses: actions/upload-artifact@v4
6261
with:
63-
name: dist
62+
name: sdist
6463
path: dist
65-
overwrite: true
64+
65+
merge:
66+
runs-on: ubuntu-latest
67+
needs: [build_sdist, build_wheels]
68+
steps:
69+
- name: Merge Artifacts
70+
uses: actions/upload-artifact/merge@v4
71+
with:
72+
name: pymoo
73+
delete-merged: true

.github/workflows/testing.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Testing
22
on:
33
push:
44
branches:
5-
- develop
6-
- release
7-
- master
5+
- DEPRECATED
86
pull_request:
97
workflow_dispatch:
108
schedule:

.github/workflows/wheels.yml

-37
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
**/*.cpp
88
**/nohup.out
99
benchmark
10+
wheelhouse
1011

1112

1213
**/dask-worker-space/**

pymoo/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.6.1.3"
1+
__version__ = "0.6.1.4"

pyproject.toml

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "numpy>=1.15", "Cython>=0.29"]
2+
requires = ["setuptools<72.2", "wheel", "numpy>=1.15", "Cython>=0.29"]
3+
4+
[tool.cibuildwheel]
5+
build-verbosity = 1
6+
before-all = "uname -a"
7+
8+
[tool.cibuildwheel.linux]
9+
archs = ["x86_64"]
10+
11+
[tool.cibuildwheel.windows]
12+
archs = ["x86", "AMD64"]
13+
14+
[tool.cibuildwheel.macos]
15+
archs = ["arm64"]

setup.py

+4-29
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
version=__version__,
2424
author=__author__,
2525
url=__url__,
26-
python_requires='>=3.9',
27-
author_email="blankjul@msu.edu",
26+
python_requires='>=3.10',
27+
author_email="blankjul@outlook.com",
2828
description="Multi-Objective Optimization in Python",
2929
license='Apache License 2.0',
3030
keywords="optimization",
@@ -49,10 +49,10 @@
4949
'License :: OSI Approved :: Apache Software License',
5050
'Programming Language :: Python',
5151
'Programming Language :: Python :: 3',
52-
'Programming Language :: Python :: 3.9',
5352
'Programming Language :: Python :: 3.10',
5453
'Programming Language :: Python :: 3.11',
5554
'Programming Language :: Python :: 3.12',
55+
'Programming Language :: Python :: 3.13',
5656
'Topic :: Scientific/Engineering',
5757
'Topic :: Scientific/Engineering :: Artificial Intelligence',
5858
'Topic :: Scientific/Engineering :: Mathematics'
@@ -80,38 +80,13 @@ def readme():
8080

8181

8282
parser = argparse.ArgumentParser()
83-
parser.add_argument('--nopyx', dest='nopyx', action='store_true',
84-
help='Whether the pyx files shall be considered at all.')
83+
parser.add_argument('--nopyx', dest='nopyx', action='store_true', help='Whether the pyx files shall be considered at all.')
8584
parser.add_argument('--nocython', dest='nocython', action='store_true', help='Whether pyx files shall be cythonized.')
8685
parser.add_argument('--nolibs', dest='nolibs', action='store_true', help='Whether the libraries should be compiled.')
8786
args, _ = parser.parse_known_args()
8887

8988
sys.argv = [e for e in sys.argv if not e.lstrip("-") in args]
9089

91-
92-
# ============================================================
93-
# MacOSX FIX for compiling modules
94-
# ============================================================
95-
96-
def is_new_osx():
97-
name = sysconfig.get_platform()
98-
if sys.platform != "darwin":
99-
return False
100-
elif name.startswith("macosx-10"):
101-
minor_version = int(name.split("-")[1].split(".")[1])
102-
if minor_version >= 7:
103-
return True
104-
else:
105-
return False
106-
else:
107-
return False
108-
109-
110-
# fix compiling for new macosx!
111-
if is_new_osx():
112-
os.environ['CFLAGS'] = '-stdlib=libc++'
113-
114-
11590
# ============================================================
11691
# Module for Compilation - Throws an Exception if Failing
11792
# ============================================================

0 commit comments

Comments
 (0)