circle-ci + conda-build

This enables the possebility to build FreeCAD with conda-packages on linux
This commit is contained in:
looooo
2017-06-02 12:44:15 +02:00
committed by wmayer
parent 91bb7ed0c5
commit a3ea9e561b
4 changed files with 153 additions and 0 deletions

11
circle.yml Executable file
View File

@@ -0,0 +1,11 @@
machine:
services:
- docker
dependencies:
override:
- docker pull condaforge/linux-anvil
test:
override:
- ./package/conda/run_docker_build.sh

26
package/conda/build.sh Normal file
View File

@@ -0,0 +1,26 @@
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DBUILD_QT5=ON \
-DNETGENDATA=$PREFIX/include/netgen \
-DNETGEN_INCLUDEDIR=$PREFIX/include/netgen \
-DNGLIB_INCLUDE_DIR=$PREFIX/include/nglib \
-DOCC_INCLUDE_DIR=$PREFIX/include/opencascade \
-DOCC_LIBRARY_DIR=$PREFIX/lib \
-DOCC_LIBRARIES=$PREFIX/lib CACHE PATH \
-DFREECAD_USE_OCC_VARIANT="Official Version" \
-DOCC_OCAF_LIBRARIES=$PREFIX/lib CACHE PATH \
-DSWIG_DIR=$PREFIX/share/swig/3.0.8 \
-DSWIG_EXECUTABLE=$PREFIX/bin/swig \
-DPYTHON_EXECUTABLE=$PYTHON \
-DBUILD_FEM_NETGEN=YES \
-DUSE_BOOST_PYTHON=NO \
/source
make -j${CPU_COUNT} 2>&1 | tee output.txt
make -j${CPU_COUNT} install
rm ${PREFIX}/doc -r # smaller size of package!

65
package/conda/meta.yaml Normal file
View File

@@ -0,0 +1,65 @@
package:
name: freecad_daily
version: 0.17
build:
number: 0
features:
- vc14 # [win and py>=35]
- occt7.2.0
track_features:
- vc14 # [win and py>=35]
- occt7.2.0
requirements:
build:
- nomkl # [unix]
- vc 14 # [win and py>=35]
- ninja # [win and py>=35]
- cmake
- swig
- eigen
- boost-cpp 1.64*
- pybind11 # [unix]
- boost 1.64* # [win]
- python
- matplotlib
- coin3d
- pivy
- qt 5.*
- pyside2 2.0.0.dev0 py36_0 # [unix]
- pyside2 2.0.0.dev0 py36_vc14_0 # [win]
- occt
- netgen
- vtk
- libmed
- hdf5
- xerces-c 3.1.*
- zlib 1.2.*
- doxygen
- git
run:
- vc 14 # [win and py>=35]
- boost-cpp 1.64*
- boost 1.64* # [win]
- python
- numpy
- matplotlib
- coin3d
- pivy
- qt 5.*
- pyside2 2.0.0.dev0 py36_0 # [unix]
- pyside2 2.0.0.dev0 py36_vc14_0 # [win]
- occt
- netgen
- vtk
- libmed
- xerces-c 3.1.*
- zlib 1.2*
- git
- calculix # [unix]
about:
summary: freecad

View File

@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# copied from a conda-forge feedstock...
FEEDSTOCK_ROOT=$(cd "$(dirname "$0")"; pwd;)
RECIPE_ROOT=$FEEDSTOCK_ROOT
SOURCE_ROOT=$RECIPE_ROOT/../..
docker info
config=$(cat <<CONDARC
channels:
- freecad
- conda-forge
- defaults
conda-build:
root-dir: /feedstock_root/build_artefacts
show_channel_urls: true
CONDARC
)
cat << EOF | docker run -i \
-v "${SOURCE_ROOT}":/source \
-a stdin -a stdout -a stderr \
condaforge/linux-anvil \
bash || exit $?
export BINSTAR_TOKEN=${BINSTAR_TOKEN}
export PYTHONUNBUFFERED=1
echo "$config" > ~/.condarc
# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts.
conda clean --lock
conda install --yes --quiet conda-forge-build-setup
source run_conda_forge_build_setup
yum install -y libXt-devel libXmu-devel libXi-devel mesa-libGLU-devel rsync
# Embarking on 3 case(s).
set -x
export CONDA_PY=36
set +x
conda build /source/package/conda --quiet || exit 1
EOF