Skip to content

Commit fcafe1f

Browse files
authored
Merge pull request #6 from DanielBok/develop/2.7.0
NLOpt 2.7.0
2 parents 17beb84 + b45dfe9 commit fcafe1f

5 files changed

Lines changed: 78 additions & 28 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: False
2424
matrix:
25-
python-version: [ 3.6, 3.7, 3.8 ]
25+
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
2626
steps:
2727
- name: Checkout repository
2828
uses: actions/checkout@v2
@@ -60,33 +60,22 @@ jobs:
6060
with:
6161
submodules: true
6262

63-
- name: Setup Python 3.8
63+
- name: Setup Python 3.9
6464
uses: actions/setup-python@v2
6565
with:
66-
python-version: 3.8
66+
python-version: 3.9
6767

6868
- name: Build wheels
6969
env:
7070
# only build CPython-3.6 and later and skip 32-bit builds and skip windows
71-
CIBW_BUILD: cp36-* cp37-* cp38-*
71+
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
7272
CIBW_SKIP: "*-win* *-manylinux_i686"
73-
CIBW_BEFORE_ALL_LINUX: |
74-
yum update -y && yum install pcre-devel cmake3 -y
75-
yum remove cmake -y
76-
ln -s /usr/bin/cmake3 /usr/bin/cmake
77-
78-
if [[ ! -e $(command -v swig) ]]; then
79-
curl -L https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4.0.2.tar.gz/download --output /tmp/swig.tar.gz
80-
mkdir /tmp/swig
81-
tar -xvzf /tmp/swig.tar.gz -C /tmp/swig --strip-components 1 &> /dev/null
82-
pushd /tmp/swig
83-
./configure --without-alllang --with-python3 && make -j2 && make install > /dev/null
84-
popd
85-
fi
73+
# use latest build
74+
CIBW_MANYLINUX_X86_64_IMAGE: danielbok/nlopt_manylinux2014_x86_64:latest
8675
CIBW_BEFORE_ALL_MACOS: brew install swig
8776
CIBW_BEFORE_BUILD: pip install numpy
8877
run: |
89-
pip install -U pip cibuildwheel==1.5.1
78+
pip install -U pip cibuildwheel==1.7.2
9079
python -m cibuildwheel --output-dir dist
9180
9281
- name: Place wheels in artifacts folder
@@ -95,13 +84,13 @@ jobs:
9584
path: ./dist/*.whl
9685

9786
test-wheels:
98-
name: Test package installation
87+
name: Test wheels
9988
needs: [ build_wheels_windows, build_wheels_unix ]
10089
runs-on: ${{ matrix.os }}
10190
strategy:
10291
matrix:
10392
os: [ windows-latest, ubuntu-latest, macos-latest ]
104-
python-version: [ 3.6, 3.7, 3.8 ]
93+
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
10594

10695
steps:
10796
- name: Checkout repository
@@ -122,6 +111,9 @@ jobs:
122111
run: |
123112
python -m pip install --upgrade pip
124113
114+
# list all files in the dist folder
115+
ls -R dist
116+
125117
# finds path to the right wheel or source file to install later
126118
os=$(echo ${{ runner.os }} | awk '{print tolower($0)}' | head -c3)
127119
@@ -133,6 +125,8 @@ jobs:
133125
# nlopt-2.6.2-cp36-cp36m-manylinux10_amd64.whl
134126
file=$(find dist -name "nlopt-*${version}*${os}*.whl" -type f);
135127
128+
echo "Installing file: ${file}"
129+
136130
pip install ${file}
137131
python extern/nlopt/test/t_python.py
138132
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and push manylinux image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- image/*
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
build-and-push-image:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Get current time
17+
uses: 1466587594/get-current-time@v2
18+
id: current-time
19+
with:
20+
format: YYYYMMDD
21+
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v1
27+
28+
- name: Login to DockerHub
29+
uses: docker/login-action@v1
30+
with:
31+
username: danielbok
32+
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v2
36+
id: docker_build
37+
with:
38+
context: ci
39+
file: ci/nlopt_manylinux2014_x86_64.Dockerfile
40+
push: github.ref == 'refs/heads/master'
41+
tags: |
42+
danielbok/nlopt_manylinux2014_x86_64:latest
43+
danielbok/nlopt_manylinux2014_x86_64:${{ steps.current-time.outputs.formattedTime }}
44+
45+
- name: Image digest
46+
run: echo ${{ steps.docker_build.outputs.digest }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM quay.io/pypa/manylinux2014_x86_64:2020-12-25-6634688
2+
3+
# cmake already version 3, thus no need to update cmake
4+
5+
# add swig
6+
RUN yum update -y && \
7+
curl -L https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4.0.2.tar.gz/download --output /tmp/swig.tar.gz && \
8+
mkdir -p /tmp/swig && \
9+
tar -xvzf /tmp/swig.tar.gz -C /tmp/swig --strip-components 1 &> /dev/null && \
10+
pushd /tmp/swig && \
11+
./configure --without-alllang --with-python3 && make -j2 && make install > /dev/null && \
12+
popd

setup.cfg

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ description = Library for nonlinear optimization, wrapping many algorithms for g
1313
long_description = file: README.md
1414
long_description_content_type = text/markdown
1515
keywords =
16-
copula
17-
copulae
18-
dependency modelling
19-
dependence structures
20-
archimdean
21-
elliptical
22-
finance
16+
algorithms
17+
global local constrained unconstrained optimization
18+
optimization
19+
non-linear optimization
2320
classifiers =
2421
Development Status :: 5 - Production
2522
Intended Audience :: End Users/Desktop
@@ -32,6 +29,7 @@ classifiers =
3229
Programming Language :: Python :: 3.6
3330
Programming Language :: Python :: 3.7
3431
Programming Language :: Python :: 3.8
32+
Programming Language :: Python :: 3.9
3533
Topic :: Scientific/Engineering
3634

3735
[options]

0 commit comments

Comments
 (0)