Skip to content

Commit b45dfe9

Browse files
committed
Build linux wheels using danielbok/nlopt_manylinux2014_x86_64 image
1 parent 0fe7711 commit b45dfe9

2 files changed

Lines changed: 13 additions & 19 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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,7 +84,7 @@ 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:
@@ -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

.github/workflows/manylinux-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
context: ci
3939
file: ci/nlopt_manylinux2014_x86_64.Dockerfile
40-
push: true
40+
push: github.ref == 'refs/heads/master'
4141
tags: |
4242
danielbok/nlopt_manylinux2014_x86_64:latest
4343
danielbok/nlopt_manylinux2014_x86_64:${{ steps.current-time.outputs.formattedTime }}

0 commit comments

Comments
 (0)