diff --git a/.cirrus.yml b/.cirrus.yml index e6b8161..1c50e51 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -19,7 +19,7 @@ cirrus_wheels_macos_arm64_task: PYVER: 3.11 ABI: cp311 build_script: - ./build-wheels-macos-brew.sh v1.20 ${ABI} + ./build-wheels-macos.sh v1.21 ${ABI} upload_script: - ls -l wheelhouse/*.whl - if test -n "${CIRRUS_TAG}"; then python${PYVER} -m pip install twine && python${PYVER} -m twine upload wheelhouse/*.whl; fi diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 17bc162..b53822a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,7 +1,6 @@ name: Nightly on: - push: schedule: - cron: '0 0 * * 5' @@ -65,7 +64,7 @@ jobs: - name: Build env: MAKEFLAGS: -j3 - run: ./build-wheels-macos-brew.sh master ${{ matrix.abi }} + run: ./build-wheels-macos.sh master ${{ matrix.abi }} - id: getfilename run: echo "::set-output name=file::$(ls wheelhouse/*.whl)" - name: Archive diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index 6f80dce..450d064 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -11,7 +11,7 @@ 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.20 ${{ matrix.abi }} + docker run --rm -e MAKEFLAGS='-j2' -v `pwd`:/io openturns/manylinux2014_x86_64 /io/build-wheels-linux.sh v1.21 ${{ matrix.abi }} - uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true @@ -36,7 +36,7 @@ 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.20 ${{ matrix.abi }} + docker run --rm -e MAKEFLAGS='-j2' -v `pwd`:/io openturns/archlinux-mingw /io/build-wheels-mingw.sh v1.21 ${{ matrix.abi }} - uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true @@ -61,7 +61,7 @@ jobs: - name: Build env: MAKEFLAGS: -j3 - run: ./build-wheels-macos-brew.sh v1.20 ${{ matrix.abi }} + run: ./build-wheels-macos.sh v1.21 ${{ matrix.abi }} - id: getfilename run: echo "::set-output name=file::$(ls wheelhouse/*.whl)" - name: Archive wheel diff --git a/build-wheels-linux.sh b/build-wheels-linux.sh index 62a4e85..c913b23 100755 --- a/build-wheels-linux.sh +++ b/build-wheels-linux.sh @@ -32,7 +32,7 @@ cmake -DCMAKE_INSTALL_PREFIX=$PWD/install -DUSE_SPHINX=OFF \ -DSWIG_COMPILE_FLAGS="-O1" \ .. make install -OLD_LIBOT=`basename install/lib/libOT.so.0.*` +OLD_LIBOT=`basename install/lib64/libOT.so.0.*` # run a few tests ctest -R "Ipopt|Bonmin|Dlib_std|NLopt|Study|SymbolicFunction|SquareMatrix|CMinpack|Ceres|Sample_csv|Pagmo" -E cppcheck --output-on-failure ${MAKEFLAGS} @@ -68,19 +68,18 @@ NEW_LIBOT=`basename openturns.libs/libOT-*.so*` cd - # modules -for pkgnamever in otfftw-0.12 otmixmod-0.13 otmorris-0.13 otpmml-1.12 otrobopt-0.11 otsubsetinverse-1.9 otsvm-0.11 +for pkgnamever in otfftw-0.13 otmixmod-0.14 otmorris-0.14 otrobopt-0.12 otsubsetinverse-1.10 otsvm-0.12 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}.post4 - ./setVersionNumber.sh ${pkgver} +# pkgver=${pkgver}.post4 +# ./setVersionNumber.sh ${pkgver} mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=$PWD/install -DUSE_SPHINX=OFF -DBUILD_DOC=OFF \ - -DPYTHON_INCLUDE_DIR=/opt/python/${PYTAG}-${ABI}/include/python${PYVERD} -DPYTHON_LIBRARY=dummy \ - -DPYTHON_EXECUTABLE=/opt/python/${PYTAG}-${ABI}/bin/python \ - -DOpenTURNS_DIR=/tmp/openturns/build/install/lib/cmake/openturns \ + -DPython_EXECUTABLE=/opt/python/${PYTAG}-${ABI}/bin/python \ + -DOpenTURNS_DIR=/tmp/openturns/build/install/lib64/cmake/openturns \ .. make install ctest -E cppcheck --output-on-failure ${MAKEFLAGS} diff --git a/build-wheels-macos-conda.sh b/build-wheels-macos-conda.sh deleted file mode 100755 index 510109b..0000000 --- a/build-wheels-macos-conda.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -set -e -x - -VERSION="$1" -ABI="$2" - -PLATFORM=macosx_10_9_x86_64 -PYTAG=${ABI/m/} -TAG=${PYTAG}-${ABI}-${PLATFORM} -PYVERD=${PYTAG:2:1}.${PYTAG:3} -SCRIPTPATH=${PWD} - -# setup a new conda env to retrieve openturns and its dependencies -wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh -P /tmp -bash /tmp/Miniforge3-MacOSX-x86_64.sh -b -p ${HOME}/miniforge -export PATH="${HOME}/miniforge/bin:${PATH}" -conda install -y python=${PYVERD} openturns=${VERSION} delocate - -# create archive -cd ${HOME}/miniforge/lib/python${PYVERD}/site-packages/ -find openturns -name '*.so' -exec install_name_tool -add_rpath ${HOME}/miniforge/lib/ '{}' ';' -python ${SCRIPTPATH}/write_RECORD.py openturns ${VERSION} -zip -r openturns-${VERSION}-${TAG}.whl openturns openturns-${VERSION}.dist-info - -# 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 - -# move conf file next to lib so it can be found using dladdr when relocated -mkdir -p openturns/.dylibs -cp -v ../../../etc/openturns/openturns.conf openturns/.dylibs -zip -u ${SCRIPTPATH}/wheelhouse/openturns-${VERSION}-${TAG}.whl openturns/.dylibs/openturns.conf - -# add missing libs -ls -l ${HOME}/miniforge/lib/ -for libname in libblas.3 libcblas.3 liblapack.3 -do - cp ${HOME}/miniforge/lib/${libname}.dylib openturns/.dylibs - zip -u ${SCRIPTPATH}/wheelhouse/openturns-${VERSION}-${TAG}.whl openturns/.dylibs/${libname}.dylib -done - -# modules -# for pkgnamever in otfftw-0.11 otmixmod-0.12 otmorris-0.12 otpmml-1.11 otrobopt-0.10 otsubsetinverse-1.8 otsvm-0.10 -# do -# pkgname=`echo ${pkgnamever} | cut -d "-" -f1` -# pkgver=`echo ${pkgnamever} | cut -d "-" -f2` -# conda install -y ${pkgname}=${pkgver} -# -# # create archive -# python ${SCRIPTPATH}/write_RECORD.py ${pkgname} ${pkgver} -# zip -r ${pkgname}-${pkgver}-${TAG}.whl ${pkgname} ${pkgname}-${pkgver}.dist-info -# -# delocate-listdeps ${pkgname}-${pkgver}-${TAG}.whl -# delocate-wheel -w /tmp -v ${pkgname}-${pkgver}-${TAG}.whl -# -# # use libs from OT wheel -# cd /tmp -# unzip ${pkgname}-${pkgver}-${TAG}.whl -# install_name_tool -add_rpath @loader_path/../openturns.libs ${pkgname}/_${pkgname}.so -# otool -l ${pkgname}/_${pkgname}.so -# cd - -# -# done - -# test in a fresh conda env -cd ${SCRIPTPATH} -rm -r ${HOME}/miniforge -bash /tmp/Miniforge3-MacOSX-x86_64.sh -b -p ${HOME}/miniforge -conda install -y python=${PYVERD} pip twine dill psutil -pip install openturns --no-index -f ${SCRIPTPATH}/wheelhouse -python -c "import openturns as ot; print(ot.__version__)" - diff --git a/build-wheels-macos-brew.sh b/build-wheels-macos.sh similarity index 99% rename from build-wheels-macos-brew.sh rename to build-wheels-macos.sh index 7e472bb..37f6dbd 100755 --- a/build-wheels-macos-brew.sh +++ b/build-wheels-macos.sh @@ -13,6 +13,7 @@ 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 python${PYVER} -m pip install delocate python${PYVER} -m pip debug --verbose diff --git a/build-wheels-mingw.sh b/build-wheels-mingw.sh index fcc9125..2277717 100755 --- a/build-wheels-mingw.sh +++ b/build-wheels-mingw.sh @@ -56,20 +56,20 @@ grep -q dev <<< "${VERSION}" && exit 0 sudo pacman -Sy --noconfirm mingw-w64-fftw mingw-w64-agrum # for otfftw, otagrum # modules -for pkgnamever in otfftw-0.12 otmixmod-0.13 otmorris-0.13 otpmml-1.12 otrobopt-0.11 otsubsetinverse-1.9 otsvm-0.11 +for pkgnamever in otfftw-0.13 otmixmod-0.14 otmorris-0.14 otrobopt-0.12 otsubsetinverse-1.10 otsvm-0.12 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}.post4 - ./setVersionNumber.sh ${pkgver} +# pkgver=${pkgver}.post4 +# ./setVersionNumber.sh ${pkgver} PREFIX=$PWD/install ${ARCH}-w64-mingw32-cmake \ -DCMAKE_INSTALL_PREFIX=${PREFIX} \ - -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 \ + -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 \ -DUSE_SPHINX=OFF -DBUILD_DOC=OFF \ -DOpenTURNS_DIR=/tmp/openturns/install/lib/cmake/openturns \ .