forked from European-XFEL/EXtra-foam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
106 lines (100 loc) · 3.89 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
language: cpp
stages:
- name: basic
if: branch != master
- name: full linux
if: branch = master
- name: singularity build push
if: branch = master OR tag IS present
env:
global:
- DISPLAY=":99.0"
services:
- xvfb
jobs:
allow_failures:
- stage: singularity build push
include:
- stage: basic
env: PYTHON_VERSION="3.7.5" COMPILER="gcc" GCCv="6"
- stage: full linux
os: linux
env: PYTHON_VERSION="3.7.5" COMPILER="gcc" GCCv="8"
- stage: full linux
os: linux
env: PYTHON_VERSION="3.7.5" COMPILER="gcc" GCCv="7"
- stage: full linux
os: linux
env: PYTHON_VERSION="3.7.5" COMPILER="gcc" GCCv="6"
- stage: full linux
os: linux
env: PYTHON_VERSION="3.6.9" COMPILER="gcc" GCCv="6"
- stage: singularity build push
env: PYTHON_VERSION="3.7.5"
language: go
go: "1.13"
git: { submodules: false, depth: 1 }
addons:
apt:
packages: [ flawfinder, squashfs-tools, uuid-dev, libuuid1, libffi-dev, libssl-dev, libssl1.0.0, libarchive-dev, libgpgme11-dev, libseccomp-dev ]
homebrew: { packages: [ squashfs ], update: true }
before_install: skip
install:
- SINGULARITY_BASE="${GOPATH}/src/github.com/sylabs/singularity"
- export PATH="${GOPATH}/bin:${PATH}"
- mkdir -p "${GOPATH}/src/github.com/sylabs"
- cd "${GOPATH}/src/github.com/sylabs"
- git clone -b v3.5.0 https://github.com/sylabs/singularity
- cd singularity
- ./mconfig -v -p /usr/local
- make -j `nproc 2>/dev/null || echo 1` -C ./builddir all
- sudo make -C ./builddir install
before_script:
# token used for push commnad
- echo -e "$SYLABS_TOKEN" > token
- singularity remote login --tokenfile ./token || exit 1
# key used for image signing
# for travis ci pgp key block you must replace newline with '\\n', and replace spaces with '\ '
- echo -e "$SINGULARITY_KEY" > skey
- head -n 4 ./skey
- echo $SINGULARITY_KEY_PW | singularity key import ./skey || exit 1
script:
- cd $TRAVIS_BUILD_DIR
- export SINGULARITYENV_PYTHON_VERSION=$PYTHON_VERSION
- export SINGULARITYENV_GIT_COMMIT_HASH=$TRAVIS_COMMIT
- sudo singularity build ./extra-foam.sif extra-foam.def
after_script:
- echo $SINGULARITY_KEY_PW | singularity sign ./extra-foam.sif
- singularity push ./extra-foam.sif library://robert.rosca/default/extra-foam:$TRAVIS_BRANCH
before_install:
- export GXX="g++-$GCCv" GCC="gcc-$GCCv"
- sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- sudo apt-get -q update
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install libxkbcommon-x11-0 $GXX
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/$GXX 0
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/$GCC 0
- g++ --version
- gcc --version
- wget "http://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"
install:
- conda install -y python=$PYTHON_VERSION
- echo $PYTHON_VERSION
- conda install -y cmake numpy -c anaconda
- conda install -y -c conda-forge tbb-devel
- export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
- pip install -e .[test]
before_script:
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1400x900x24
- sleep 3
script:
# test parallel version
- python setup.py build_ext --inplace --with-tests
- python setup.py test -v
- python setup.py benchmark -v
# test series version
- export BUILD_SERIAL_FOAM=1
- python setup.py build_ext --inplace --with-tests
- python setup.py test -v
- python setup.py benchmark -v