Skip to content

Commit

Permalink
added conda recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
erikfrojdh committed Dec 12, 2018
1 parent eb89d12 commit 5698da5
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
sudo: false

language: cpp

matrix:
include:
- os: linux
env: CONDA_PY=3.6

dist: trusty

install:
- sudo apt-get update
- ldd --version
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- rm -f miniconda.sh
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- conda config --add channels slsdetectorgroup
- conda update conda
- conda update --all
- conda install conda-build anaconda-client

# Useful for debugging any issues with conda
- conda info -a


# Replace dep1 dep2 ... with your dependencies
- conda create -q -n test-environment python=$CONDA_PY
- source activate test-environment
- conda-build .

script:
- echo "No test scripts to be run!"


deploy:
provider: script
script: find $HOME/miniconda/conda-bld/${TRAVIS_OS_NAME}-64 -name "*.tar.bz2" -exec anaconda -t $CONDA_TOKEN upload --force {} \;
on:
branch: 4.0.0

15 changes: 15 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mkdir build
mkdir install
cd build
cmake .. \
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
-DCMAKE_INSTALL_PREFIX=install \
-DUSE_TEXTCLIENT=ON \
-DUSE_RECEIVER=ON \
-DUSE_GUI=ON \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_HDF5=OFF\


cmake --build . -- -j10
cmake --build . --target install
15 changes: 15 additions & 0 deletions recipe/copy_gui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

mkdir $PREFIX/lib
mkdir $PREFIX/bin
mkdir $PREFIX/include

#No libs for gui?

#Binaries
cp build/bin/gui_client $PREFIX/bin/.
cp build/bin/slsDetectorGui $PREFIX/bin/.


#Which headers do we need for development??

# cp include/some_lib.h $PREFIX/include/.
23 changes: 23 additions & 0 deletions recipe/copy_lib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

mkdir $PREFIX/lib
mkdir $PREFIX/bin
mkdir $PREFIX/include
mkdir $PREFIX/include/slsDetectorPackage

#Shared and static libraries
cp build/bin/libSlsDetector.so $PREFIX/lib/.
cp build/bin/libSlsDetector.a $PREFIX/lib/.
cp build/bin/libSlsReceiver.so $PREFIX/lib/.
cp build/bin/libSlsReceiver.a $PREFIX/lib/.

#Binaries
cp build/bin/sls_detector_acquire $PREFIX/bin/.
cp build/bin/sls_detector_get $PREFIX/bin/.
cp build/bin/sls_detector_put $PREFIX/bin/.
cp build/bin/sls_detector_help $PREFIX/bin/.
cp build/bin/slsReceiver $PREFIX/bin/.
cp build/bin/slsMultiReceiver $PREFIX/bin/.

#Which headers do we need for development??
cp build/install/include/* $PREFIX/include/slsDetectorPackage/
# cp include/some_lib.h $PREFIX/include/.
89 changes: 89 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

package:
name: sls_detector_software
version: 4.0.0

source:
- path: ..

build:
number: 0
rpaths:
- lib/

requirements:
build:
- {{ compiler('c') }}
- {{compiler('cxx')}}
- cmake
- qwt 6.*
- qt=4.8.7=7
- zeromq=4.2.5=hfc679d8_5
- pyzmq
- xorg-libx11
- xorg-libice
- xorg-libxext
- xorg-libsm
- xorg-libxau
- xorg-libxrender
- xorg-libxfixes
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]

host:
- libstdcxx-ng
- libgcc-ng
- libpng >=1.6.32,<1.6.35
- xorg-libx11
- xorg-libice
- xorg-libxext
- xorg-libsm
- xorg-libxau
- xorg-libxrender
- xorg-libxfixes

run:
- libstdcxx-ng
- libgcc-ng

outputs:
- name: sls_detector_lib
version: 4.0.0
script: copy_lib.sh
requirements:
build:
- {{ compiler('c') }}
- {{compiler('cxx')}}
- name: sls_detector_gui
version: 4.0.0
script: copy_gui.sh
requirements:
build:
- {{ compiler('c') }}
- {{compiler('cxx')}}
- cmake
- qwt 6.*
- qt=4.8.7=7
- zeromq=4.2.5=hfc679d8_5
- pyzmq
- xorg-libx11
- xorg-libice
- xorg-libxext
- xorg-libsm
- xorg-libxau
- xorg-libxrender
- xorg-libxfixes
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
run:
- sls_detector_lib=4.0.0
- qwt 6.*
- qt=4.8.7=7

0 comments on commit 5698da5

Please sign in to comment.