forked from CESNET/libyang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
79 lines (74 loc) · 2.25 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
language: c
matrix:
include:
- arch: amd64
os: linux
dist: bionic
sudo: required
compiler: clang
env: TRAVIS_ARCH="amd64"
- arch: amd64
os: linux
dist: bionic
sudo: required
compiler: gcc
env: TRAVIS_ARCH="amd64" DEPLOY_BUILD=TRUE
- arch: arm64
os: linux
dist: bionic
sudo: required
compiler: gcc
env: TRAVIS_ARCH="arm64"
- arch: amd64
os: linux
dist: bionic
sudo: required
compiler: gcc
env: TRAVIS_ARCH="amd64" ENABLE_STATIC=ON
- arch: amd64
os: osx
compiler: gcc
env: TRAVIS_ARCH="amd64"
allow_failures:
- os: osx
branches:
only:
- master
- devel
before_install:
- git clone git://git.cryptomilk.org/projects/cmocka.git
- cd cmocka && mkdir build && cd build
- cmake .. && make -j2 && sudo make install
- cd ../..
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y valgrind libpcre3-dev python3-dev swig python3-cffi python3-setuptools python3-pip; fi
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then pip3 install --user codecov==2.0.22 twine==3.1.1; export CFLAGS="-coverage"; fi
script:
- mkdir build && cd build
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DENABLE_VALGRIND_TESTS=OFF ..; fi
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$TRAVIS_ARCH" = "amd64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_STATIC=${ENABLE_STATIC:-OFF} -DGEN_PYTHON_CFFI_BINDINGS=ON ..; fi
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$TRAVIS_ARCH" = "arm64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_VALGRIND_TESTS=OFF -DGEN_PYTHON_CFFI_BINDINGS=ON ..; fi
- make -j2 && ctest --output-on-failure
- cd -
deploy:
- provider: script
script: codecov
skip_cleanup: true
verbose: true
on:
branch: master
condition: $DEPLOY_BUILD = TRUE
- provider: script
script: ./packages/create-package.sh
skip_cleanup: true
verbose: true
on:
branch: master
condition: $DEPLOY_BUILD = TRUE
- provider: script
script: twine upload --skip-existing build/python/dist/*
skip_cleanup: true
verbose: true
on:
branch: master
condition: $DEPLOY_BUILD = TRUE