Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 2.11.11 and add windows build #18

Merged
merged 9 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
bzip2:
- '1'
c_compiler:
- vs2019
c_stdlib:
- vs
c_stdlib_version:
- '2019'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- vs2019
libcblas:
- 3.9 *netlib
target_platform:
- win-64
zlib:
- '1.2'
2 changes: 1 addition & 1 deletion .github/CODEOWNERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

125 changes: 125 additions & 0 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion azure-pipelines.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
copy "%RECIPE_DIR%\build.sh" .
set PREFIX=%PREFIX:\=/%
set LIBRARY_PREFIX=%LIBRARY_PREFIX:\=/%
set SRC_DIR=%SRC_DIR:\=/%
set MSYSTEM=MINGW%ARCH%
set MSYS2_PATH_TYPE=inherit
set CHERE_INVOKING=1
set BUILD_PLATFORM=win-64


bash -lc "./build.sh"
50 changes: 27 additions & 23 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
#!/usr/bin/env bash
# Get an updated config.sub and config.guess
cp $BUILD_PREFIX/share/gnuconfig/config.* ./CoinUtils
cp $BUILD_PREFIX/share/gnuconfig/config.* .
set -e

UNAME="$(uname)"
export CFLAGS="${CFLAGS} -O3"
export CXXFLAGS="${CXXFLAGS} -O3"
export CXXFLAGS="${CXXFLAGS//-std=c++17/-std=c++11}"
set -e

if [ "${UNAME}" == "Linux" ]; then
export FLIBS="-lgcc_s -lgcc -lstdc++ -lm"
if [ ! -z ${LIBRARY_PREFIX+x} ]; then
USE_PREFIX=$LIBRARY_PREFIX
else
USE_PREFIX=$PREFIX
fi

# Use only 1 thread with OpenBLAS to avoid timeouts on CIs.
# This should have no other affect on the build. A user
# should still be able to set this (or not) to a different
# value at run-time to get the expected amount of parallelism.
export OPENBLAS_NUM_THREADS=1

WITH_BLAS_LIB="-L${PREFIX}/lib -lblas"
WITH_LAPACK_LIB="-L${PREFIX}/lib -llapack"
if [[ "${target_platform}" == win-* ]]; then
EXTRA_FLAGS="--enable-msvc"
BLAS_LIB="${LIBRARY_PREFIX}/lib/cblas.lib"
LAPACK_LIB="${LIBRARY_PREFIX}/lib/lapack.lib"
else
# Get an updated config.sub and config.guess (for mac arm and lnx aarch64)
cp $BUILD_PREFIX/share/gnuconfig/config.* ./CoinUtils
cp $BUILD_PREFIX/share/gnuconfig/config.* .
BLAS_LIB="-L${PREFIX}/lib -lblas"
LAPACK_LIB="-L${PREFIX}/lib -llapack"
fi

./configure \
--prefix="${PREFIX}" \
--exec-prefix="${PREFIX}" \
--with-blas-lib="${WITH_BLAS_LIB}" \
--with-lapack-lib="${WITH_LAPACK_LIB}" \
--prefix="${USE_PREFIX}" \
--exec-prefix="${USE_PREFIX}" \
--with-blas-lib="${BLAS_LIB}" \
--with-lapack-lib="${LAPACK_LIB}" \
${EXTRA_FLAGS} || cat CoinUtils/config.log

make -j "${CPU_COUNT}"
make install

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
make test
fi

make install
34 changes: 22 additions & 12 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,44 @@ source:

build:
number: 0
skip: true # [win]
run_exports:
- {{ pin_subpackage(name, min_pin='x.x', max_pin='x.x') }}

requirements:
build:
- gnuconfig # [unix]
- gnuconfig
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }}
- pkg-config
- {{ compiler('fortran') }} # [unix]
- pkg-config # [unix]
- make # [unix]
- m2-make # [win]
- m2-pkg-config # [win]
- m2-grep # [win]
- m2-sed # [win]
- m2-bash # [win]
- m2-base # [win]

host:
- zlib
- bzip2
- libblas
- blas-devel
- libblas # [unix]
- libcblas
- liblapack
- liblapacke
- liblapacke # [unix]
- zlib
- bzip2

run_constrained:
- coincbc * *_metapackage

test:
commands:
- test -f $PREFIX/lib/libCoinUtils${SHLIB_EXT}
- test -f $PREFIX/include/coin/CoinSort.hpp

- test -f $PREFIX/lib/libCoinUtils${SHLIB_EXT} # [unix]
- test -f $PREFIX/include/coin/CoinSort.hpp # [unix]
- if not exist %LIBRARY_LIB%/libCoinUtils.lib exit 1 # [win]
- if not exist %LIBRARY_INC%/coin/CoinSort.hpp exit 1 # [win]
about:
home: https://projects.coin-or.org/CoinUtils
home: https://github.com/coin-or/CoinUtils
dev_url: https://github.com/coin-or/CoinUtils
license: EPL-2.0
license_family: OTHER
Expand All @@ -65,3 +74,4 @@ extra:
- wolfv
- tkralphs
- jschueller
- jpfeuffer