Skip to content

Commit

Permalink
Add conda_build_config
Browse files Browse the repository at this point in the history
  • Loading branch information
fredboudon committed Nov 25, 2022
1 parent f698c87 commit f7a6a1c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 17 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/conda-package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ jobs:
matrix:
os: [ macos-latest, ubuntu-latest]
env:
#- CONDA_PY: "37"
# CONDA_NPY: "111"

- CONDA_PY: "38"
CONDA_NPY: "116"
- CONDA_PY: "39"
CONDA_NPY: "119"
- CONDA_PY: "310"
CONDA_NPY: "121"

environment: anaconda_build

Expand All @@ -41,38 +37,40 @@ jobs:
sudo conda config --add channels conda-forge
sudo conda config --add channels fredboudon
sudo conda config --set always_yes yes
sudo conda config --set remote_read_timeout_secs 600
sudo conda config --set auto_update_conda False
sudo conda install conda-build anaconda-client boa
- name: Build
- name: Build Setup
env:
CONDA_PY: ${{ matrix.env.CONDA_PY }}
CONDA_NPY: ${{ matrix.env.CONDA_NPY }}
run: |
# Build
# Build Setup
if [[ "$CONDA_PY" = "" ]]; then
echo "CONDA_PY is not defined"
exit -1
fi
if [[ "$CONDA_NPY" = "" ]]; then
echo "CONDA_NPY is not defined"
exit -1
fi
export PYTHON_VERSION=${CONDA_PY:0:1}.${CONDA_PY:1:3}
export NUMPY_VERSION=${CONDA_NPY:0:1}.${CONDA_NPY:1:3}
export BUILD_CMD="sudo conda mambabuild . --python=$PYTHON_VERSION --no-test"
export BUILD_CMD="sudo conda build . --python=$PYTHON_VERSION --no-test"
export BUILD_OUTPUT=`$BUILD_CMD --output`
if [[ "$BUILD_OUTPUT" = "" ]]; then
echo "PACKAGE NAME is not defined"
exit -1
fi
echo "BUILD_OUTPUT=$BUILD_OUTPUT" >> $GITHUB_ENV
echo "BUILD_CMD=$BUILD_CMD" >> $GITHUB_ENV
$BUILD_CMD --no-test
- name: Build
env:
BUILD_CMD: ${{ env.BUILD_CMD }}
run: |
# Build
if [[ "$BUILD_CMD" = "" ]]; then
echo "Build command is not defined"
exit -1
fi
$BUILD_CMD
- name: Login
env:
Expand Down
21 changes: 21 additions & 0 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
boost:
- 1.74 # [win]
- 1.78 # [osx]
- 1.78 # [linux]
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
- vs2019 # [win]
compiler_version:
- 11 # [osx]
- 11.2.0 # [linux]
cxx_compiler_version:
- 11 # [osx]
- 11.2.0 # [linux]
MACOSX_DEPLOYMENT_TARGET: # [osx]
- '10.12' # [osx]
MACOSX_SDK_VERSION: # [osx and x86_64]
- '10.12' # [osx and x86_64]
pin_run_as_build:
boost: x.x
openalea.plantgl: x.x

0 comments on commit f7a6a1c

Please sign in to comment.