-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
85 lines (84 loc) · 2.95 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
language: c
matrix:
fast_finish: true
include:
- os: linux
env:
- MATRIX_EVAL="CC=gcc" CF=-DBUILD_SHARED_LIBS=OFF ARCH="x86_64"
- os: linux
env:
- MATRIX_EVAL="CC='gcc -m32'" CF="-DBUILD_SHARED_LIBS=OFF -DCMAKE_LIBRARY_PATH=/usr/lib32"
PACKAGES="gcc-multilib lib32z1-dev" ARCH="i686"
- os: osx
env:
- MATRIX_EVAL="CC=gcc" CF=-DBUILD_SHARED_LIBS=OFF ARCH="x86_64"
- os: osx
env:
- MATRIX_EVAL="CC='gcc -m32'" CF=-DBUILD_SHARED_LIBS=OFF ARCH="i686"
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y rpm; fi
- git clone https://github.com/huskyproject/huskylib ~/build/huskyproject/huskylib
- git clone https://github.com/huskyproject/smapi ~/build/huskyproject/smapi
- git clone https://github.com/huskyproject/fidoconf ~/build/huskyproject/fidoconf
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git clone https://github.com/huskyproject/hptzip ~/build/huskyproject/hptzip; fi
- git clone https://github.com/huskyproject/areafix ~/build/huskyproject/areafix
- if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends
--no-upgrade -qq $PACKAGES; fi
script:
- eval "${MATRIX_EVAL}"
- cd ~/build/huskyproject/huskylib
- mkdir build
- cd build
- cmake .. ${CF}
- cmake --build .
- sudo make install
- cd ~/build/huskyproject/smapi
- mkdir build
- cd build
- cmake .. ${CF}
- cmake --build .
- sudo make install
- cd ~/build/huskyproject/fidoconf
- mkdir build
- cd build
- cmake .. ${CF}
- cmake --build .
- sudo make install
- cd ~/build/huskyproject/areafix
- mkdir build
- cd build
- cmake .. ${CF}
- cmake --build .
- sudo make install
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ~/build/huskyproject/hptzip; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir build; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd build; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake .. ${CF}; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake --build .; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo make install; fi
- cd $TRAVIS_BUILD_DIR
- mkdir build
- cd build
- cmake .. ${CF} -DCPACK_DEBIAN_PACKAGE_MAINTAINER=travis-ci
- cmake --build .
- cpack
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cpack -G RPM; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cpack -G DEB; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then for file in *.rpm; do mv $file
$(basename $file .rpm).${ARCH}.rpm; done; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then for file in *.deb; do mv $file
$(basename $file .deb).${ARCH}.deb; done; fi
- for file in *.tar.gz; do mv $file $(basename $file .tar.gz).${ARCH}.tar.gz;
done
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
skip_cleanup: true
file:
- $TRAVIS_BUILD_DIR/build/*.rpm
- $TRAVIS_BUILD_DIR/build/*.deb
- $TRAVIS_BUILD_DIR/build/*.tar.gz
on:
tags: true
branch: master