forked from jaak-s/macau
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from ExaScience/dev/conda
conda: upgrade to use scikit-build-core and GitHub Workflows
- Loading branch information
Showing
16 changed files
with
84 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
conda-build: | ||
name: Build Conda Package on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
python-version: 3.8 | ||
channels: conda-forge | ||
activate-environment: devtools | ||
environment-file: conda-recipes/devtools.yml | ||
- run: conda info | ||
- run: conda list | ||
- run: conda config --show | ||
- name: Conda Info | ||
run: | | ||
conda info | ||
- run: git describe --tags | ||
- name: Run 'conda build' | ||
run: | | ||
conda build -c vanderaa smurff | ||
working-directory: conda-recipes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
CONDA_BUILD_SYSROOT: | ||
- /opt/MacOSX10.9.sdk # [osx] | ||
|
||
python: | ||
- 3.7 | ||
- 3.8 | ||
- 3.9 | ||
- 3.10 | ||
- 3.11 | ||
|
||
blas_impl: | ||
- openblas | ||
- mkl | ||
|
||
numpy: | ||
- 1.16 | ||
blas_impl: # [linux64 or win64] | ||
- openblas # [linux64 or win64] | ||
- mkl # [linux64 or win64] | ||
|
||
hdf5: | ||
- 1.10.4 | ||
- 1.10.6 | ||
|
||
c_compiler: vs2022 # [win] | ||
cxx_compiler: vs2022 # [win] | ||
|
||
pin_run_as_build: | ||
libboost: x.x | ||
numpy: x.x | ||
hdf5: x.x.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: devtools | ||
channels: | ||
- defaults | ||
- conda-forge | ||
dependencies: | ||
- conda-build |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
REM SET "CMAKE_ARGS=-DENABLE_MKL=ON -DBoost_COMPILER=-vc140 -DCMAKE_INSTALL_PREFIX=%PREFIX%" | ||
SET "CMAKE_ARGS=-DENABLE_MKL=ON -DCMAKE_INSTALL_PREFIX=%PREFIX%" | ||
if "%blas_impl%"=="mkl" ( | ||
set "SKBUILD_CMAKE_ARGS=-DENABLE_MKL=ON -DENABLE_OPENBLAS=OFF" | ||
) else ( | ||
set "SKBUILD_CMAKE_ARGS=-DENABLE_OPENBLAS=ON -DENABLE_MKL=OFF" | ||
) | ||
|
||
REM conda build sets "Visual Studio 15 2017 Win64" generator | ||
REM which is incompatible with "-A x64" that we add ourselves in setup.py, | ||
REM hence we remove " Win64" | ||
SET "CMAKE_GENERATOR=%CMAKE_GENERATOR: Win64=%" | ||
echo extra CMAKE_ARGS: %SKBUILD_CMAKE_ARGS% | ||
|
||
%PYTHON% setup.py install ^ | ||
--install-binaries ^ | ||
--single-version-externally-managed --record=record.txt | ||
%PYTHON% -m pip install . --no-deps -vv | ||
if errorlevel 1 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#!/bin/bash | ||
|
||
export CMAKE_ARGS="-DENABLE_MKL=ON -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_MPI=OFF" | ||
if [ "$blas_impl" == "mkl" ] | ||
then | ||
SKBUILD_CMAKE_ARGS="-DENABLE_MKL=ON -DENABLE_OPENBLAS=OFF" | ||
else | ||
SKBUILD_CMAKE_ARGS="-DENABLE_OPENBLAS=ON -DENABLE_MKL=OFF" | ||
fi | ||
|
||
# make sure we use CONDA_BUILD_SYSROOT | ||
# https://github.com/conda/conda-build/issues/3452#issuecomment-47539707 | ||
[[ ${target_platform} == "osx-64" ]] && \ | ||
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT}" | ||
echo "extra CMAKE_ARGS: $SKBUILD_CMAKE_ARGS" | ||
|
||
$PYTHON setup.py install \ | ||
--install-binaries \ | ||
--single-version-externally-managed --record=record.txt | ||
export SKBUILD_CMAKE_ARGS | ||
|
||
$PYTHON -m pip install . --no-deps -vv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
%CONDA_PREFIX%\libexec\tests ~[random] | ||
if errorlevel 1 exit 1 | ||
%PYTHON% -m pytest | ||
REM %CONDA_PREFIX%\libexec\tests ~[random] | ||
REM if errorlevel 1 exit 1 | ||
%PYTHON% -m pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
$PREFIX/libexec/tests | ||
# $PREFIX/libexec/tests | ||
$PYTHON -m pytest -v python/test |