Skip to content

Commit

Permalink
Update for 1.23rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed May 3, 2024
1 parent 8d7abbc commit 2e8f904
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cirrus_wheels_macos_arm64_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
image: ghcr.io/cirruslabs/macos-ventura-base:latest
env:
MAKEFLAGS: -j4
TWINE_USERNAME: ENCRYPTED[5cef4d5798a06ef1d2681e25b0e79f83dd63a64375c6ee9c66845cdd067c31d22d93e9656a9eec0def2c5da2e755466b]
Expand All @@ -22,7 +22,7 @@ cirrus_wheels_macos_arm64_task:
PYVER: 3.12
ABI: cp312
build_script:
./build-wheels-macos.sh v1.22 ${ABI}
./build-wheels-macos.sh v1.23rc1 ${ABI}
upload_script:
- ls -l wheelhouse/*.whl
- if test -n "${CIRRUS_TAG}"; then python${PYVER} -m pip install twine --break-system-packages && python${PYVER} -m twine upload wheelhouse/*.whl; fi
15 changes: 6 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ jobs:
with:
name: wheel
path: ${{ steps.getfilename.outputs.file }}
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
miniforge-version: latest
- name: Upload
shell: bash -l {0}
run: |
Expand All @@ -45,10 +44,9 @@ jobs:
run: |
docker pull openturns/archlinux-mingw
docker run --rm -e MAKEFLAGS='-j2' -v `pwd`:/io openturns/archlinux-mingw /io/build-wheels-mingw.sh master ${{ matrix.abi }}
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
miniforge-version: latest
- name: Upload
shell: bash -l {0}
run: |
Expand All @@ -73,10 +71,9 @@ jobs:
with:
name: wheel
path: ${{ steps.getfilename.outputs.file }}
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
miniforge-version: latest
- name: Upload
shell: bash -l {0}
run: |
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
- name: Build
run: |
docker pull openturns/manylinux2014_x86_64
docker run --rm -e MAKEFLAGS='-j2' -v `pwd`:/io openturns/manylinux2014_x86_64 /io/build-wheels-linux.sh v1.22 ${{ matrix.abi }}
- uses: conda-incubator/setup-miniconda@v2
docker run --rm -e MAKEFLAGS='-j2' -v `pwd`:/io openturns/manylinux2014_x86_64 /io/build-wheels-linux.sh v1.23rc1 ${{ matrix.abi }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
miniforge-version: latest
- name: Upload
if: startsWith(github.ref, 'refs/tags/')
shell: bash -l {0}
Expand All @@ -36,11 +35,10 @@ jobs:
- name: Build
run: |
docker pull openturns/archlinux-mingw
docker run --rm -e MAKEFLAGS='-j2' -v `pwd`:/io openturns/archlinux-mingw /io/build-wheels-mingw.sh v1.22 ${{ matrix.abi }}
- uses: conda-incubator/setup-miniconda@v2
docker run --rm -e MAKEFLAGS='-j2' -v `pwd`:/io openturns/archlinux-mingw /io/build-wheels-mingw.sh v1.23rc1 ${{ matrix.abi }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
miniforge-version: latest
- name: Upload
if: startsWith(github.ref, 'refs/tags/')
shell: bash -l {0}
Expand All @@ -52,7 +50,7 @@ jobs:
twine upload --non-interactive wheelhouse/*.whl
macos:
runs-on: macos-latest
runs-on: macos-13
strategy:
matrix:
abi: [cp38, cp39, cp310, cp311, cp312]
Expand All @@ -61,18 +59,17 @@ jobs:
- name: Build
env:
MAKEFLAGS: -j3
run: ./build-wheels-macos.sh v1.22 ${{ matrix.abi }}
run: ./build-wheels-macos.sh v1.23rc1 ${{ matrix.abi }}
- id: getfilename
run: echo "file=$(ls wheelhouse/*.whl)" >> $GITHUB_OUTPUT
- name: Archive wheel
uses: actions/upload-artifact@v2
with:
name: wheel
path: ${{ steps.getfilename.outputs.file }}
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
miniforge-version: latest
- name: Upload
if: startsWith(github.ref, 'refs/tags/')
shell: bash -l {0}
Expand Down
9 changes: 6 additions & 3 deletions build-wheels-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export PATH=/opt/python/${PYTAG}-${ABI}/bin/:$PATH
cd /tmp
git clone --depth 1 -b ${GIT_VERSION} https://github.com/openturns/openturns.git
cd openturns
sed -i "s|Metadata-Version: 2.0|Metadata-Version: 1.2|g" python/src/METADATA.in
VERSION=`cat VERSION`

#mv openturns-${VERSION} openturns-${VERSION}.post2
Expand Down Expand Up @@ -68,16 +69,18 @@ NEW_LIBOT=`basename openturns.libs/libOT-*.so*`
cd -

# modules
for pkgnamever in otfftw-0.14 otmixmod-0.16 otmorris-0.15 otrobopt-0.13 otsvm-0.13
for pkgnamever in otfftw-0.15 otmixmod-0.17 otmorris-0.16 otrobopt-0.14 otsvm-0.14
do
pkgname=`echo ${pkgnamever} | cut -d "-" -f1`
pkgver=`echo ${pkgnamever} | cut -d "-" -f2`
cd /tmp
git clone --depth 1 -b v${pkgver} https://github.com/openturns/${pkgname}.git && cd ${pkgname}
pkgver=${pkgver}.post1
./setVersionNumber.sh ${pkgver}
sed -i "s|Metadata-Version: 2.0|Metadata-Version: 1.2|g" python/src/METADATA.in
#pkgver=${pkgver}.post1
#./utils/setVersionNumber.sh ${pkgver}
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_UNITY_BUILD=ON \
-DUSE_SPHINX=OFF -DBUILD_DOC=OFF \
-DPython_EXECUTABLE=/opt/python/${PYTAG}-${ABI}/bin/python \
-DOpenTURNS_DIR=/tmp/openturns/build/install/lib64/cmake/openturns \
Expand Down
26 changes: 18 additions & 8 deletions build-wheels-macos.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
#!/bin/sh

set -x
set -e -x

test $# = 2 || exit 1

GIT_VERSION="$1"
ABI="$2"

# brew supports the last 3 versions, this should reflect the oldest one:
PLATFORM="macosx_12_0_`uname -m`"
env
uname -a
sw_vers -productVersion

# this should reflect the CI image being used
PLATFORM="macosx_13_0_`uname -m`"
PYTAG=${ABI/m/}
TAG=${PYTAG}-${ABI}-${PLATFORM}
PYVER=${PYTAG:2:1}.${PYTAG:3}

# setup brew dependencies
brew update
brew install --overwrite coreutils openblas swig boost python@${PYVER} tbb nlopt cminpack ceres-solver bison flex hdf5 ipopt primesieve spectra pagmo libxml2
brew install --overwrite coreutils openblas swig boost python@${PYVER} tbb nlopt cminpack ceres-solver bison flex hdf5 ipopt primesieve spectra pagmo libxml2 nanoflann cuba
export PATH=/Library/Frameworks/Python.framework/Versions/${PYVER}/bin:$PATH
python${PYVER} -m pip install delocate --break-system-packages
python${PYVER} -m pip debug --verbose
delocate-wheel --version

SCRIPT=`greadlink -f "$0"`
SCRIPTPATH=`dirname "$SCRIPT"`

cd /tmp
git clone --depth 1 -b ${GIT_VERSION} https://github.com/openturns/openturns.git
cd openturns
sed -i'.bak' "s|Metadata-Version: 2.0|Metadata-Version: 1.2|g" python/src/METADATA.in
git diff
VERSION=`cat VERSION`

#VERSION=${VERSION}.post2
Expand All @@ -49,6 +55,7 @@ cmake -LAH -DCMAKE_INSTALL_PREFIX=$PWD/install \
-DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32 \
-DSWIG_COMPILE_FLAGS="-O1" \
-DUSE_SPHINX=OFF \
-DOPENTURNS_HAVE_USELOCALE=0 \
..
make install

Expand All @@ -70,11 +77,14 @@ zip -r openturns-${VERSION}-${TAG}.whl openturns openturns.libs openturns-${VERS

# gather dependencies
delocate-listdeps openturns-${VERSION}-${TAG}.whl
delocate-wheel -w ${SCRIPTPATH}/wheelhouse -v openturns-${VERSION}-${TAG}.whl
delocate-listdeps --all ${SCRIPTPATH}/wheelhouse/openturns-${VERSION}-${TAG}.whl
delocate-wheel -w /tmp/wheelhouse -v openturns-${VERSION}-${TAG}.whl
ls -l /tmp/wheelhouse
delocate-listdeps --all /tmp/wheelhouse/openturns-${VERSION}-${TAG}.whl

# test
cd /tmp
python${PYVER} -m pip install dill psutil --break-system-packages
python${PYVER} -m pip install openturns --pre --no-index -f ${SCRIPTPATH}/wheelhouse -vvv --break-system-packages
python${PYVER} -m pip install openturns --pre --no-index -f /tmp/wheelhouse -vvv --break-system-packages
python${PYVER} -c "import openturns as ot; print(ot.__version__)"

cp -rv /tmp/wheelhouse ${SCRIPTPATH}
13 changes: 7 additions & 6 deletions build-wheels-mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ TAG=${PYTAG}-${ABI}-${PLATFORM}
cd /tmp
git clone --depth 1 -b ${GIT_VERSION} https://github.com/openturns/openturns.git
cd openturns
sed -i "s|Metadata-Version: 2.0|Metadata-Version: 1.2|g" python/src/METADATA.in
VERSION=`cat VERSION`

PREFIX=$PWD/install
Expand Down Expand Up @@ -56,17 +57,19 @@ grep -q dev <<< "${VERSION}" && exit 0
aurman -S mingw-w64-fftw mingw-w64-agrum mingw-w64-libmixmod --noconfirm --noedit --pgp_fetch

# modules
for pkgnamever in otfftw-0.14 otmixmod-0.16 otmorris-0.15 otrobopt-0.13 otsvm-0.13
for pkgnamever in otfftw-0.15 otmixmod-0.17 otmorris-0.16 otrobopt-0.14 otsvm-0.14
do
pkgname=`echo ${pkgnamever} | cut -d "-" -f1`
pkgver=`echo ${pkgnamever} | cut -d "-" -f2`
cd /tmp
git clone --depth 1 -b v${pkgver} https://github.com/openturns/${pkgname}.git && cd ${pkgname}
pkgver=${pkgver}.post1
./setVersionNumber.sh ${pkgver}
sed -i "s|Metadata-Version: 2.0|Metadata-Version: 1.2|g" python/src/METADATA.in
#pkgver=${pkgver}.post1
#./utils/setVersionNumber.sh ${pkgver}
PREFIX=$PWD/install
${ARCH}-w64-mingw32-cmake \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_UNITY_BUILD=ON \
-DPython_INCLUDE_DIR=${MINGW_PREFIX}/include/python${PYVER} \
-DPython_LIBRARY=${MINGW_PREFIX}/lib/libpython${PYVER}.dll.a \
-DPython_EXECUTABLE=/usr/bin/${ARCH}-w64-mingw32-python${PYVER}-bin \
Expand All @@ -82,9 +85,7 @@ do
cd ${PREFIX}/Lib/site-packages

# write metadata
python /io/write_RECORD.py ${pkgname} ${pkgver}
sed -i "/Tag:/d" ${pkgname}-${pkgver}.dist-info/WHEEL
echo "Tag: ${TAG}" >> ${pkgname}-${pkgver}.dist-info/WHEEL
python /io/write_distinfo.py ${pkgname} ${pkgver} ${TAG}

zip -r ${pkgname}-${pkgver}-${TAG}.whl ${pkgname} ${pkgname}-${pkgver}.dist-info
sudo cp -v ${pkgname}-${pkgver}-${TAG}.whl /io/wheelhouse/
Expand Down

0 comments on commit 2e8f904

Please sign in to comment.