forked from golded-plus/golded-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (53 loc) · 1.61 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
language: cpp
branches:
only:
- master
- /^golded-.*/
matrix:
include:
- os: linux
env:
- MATRIX_EVAL="CC=clang CXX=clang++"
ARCH="x86_64"
- os: linux
env:
- MATRIX_EVAL="CC='clang -m32' CXX='clang++ -m32'"
CF="-DCMAKE_LIBRARY_PATH=/usr/lib32"
ARCH="i686"
PACKAGES="gcc-multilib g++-multilib lib32ncurses5-dev"
- os: osx
env:
- MATRIX_EVAL="CC=clang CXX=clang++"
ARCH="x86_64"
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y rpm; fi
- if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends
--no-upgrade -qq $PACKAGES; fi
- cp golded3/mygolded.__h golded3/mygolded.h
script:
- eval "${MATRIX_EVAL}"
- 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