forked from openspur/yp-spur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
93 lines (85 loc) · 3.72 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
dist: xenial
service: docker
sudo: required
language: c
compiler: gcc
branches:
only:
- master
- "/^[0-9]+\\.[0-9]+\\.[0-9]+/"
cache:
- apt
- npm
env:
matrix:
- USE_DOCKER=true UBUNTU_VERSION=trusty
- USE_DOCKER=true UBUNTU_VERSION=xenial
- USE_DOCKER=true UBUNTU_VERSION=bionic
- USE_MINGW=true
before_install:
- |
if [ x${USE_MINGW} == xtrue ]; then
sudo apt-get update -y -qq
sudo apt-get install -y --no-install-recommends \
gcc-mingw-w64-x86-64 \
gcc-mingw-w64-i686 \
g++-mingw-w64-x86-64 \
g++-mingw-w64-i686 \
npm
sudo npm install -g json
fi
script:
- |
if [ x${USE_DOCKER} == xtrue ]; then
docker build -t yp-spur:${UBUNTU_VERSION} -f Dockerfile.test --pull=true --build-arg UBUNTU_VERSION .
fi
- |
if [ x${USE_MINGW} == xtrue ]; then
(mkdir -p ${TRAVIS_BUILD_DIR}/build-win64/install \
&& cd ${TRAVIS_BUILD_DIR}/build-win64 \
&& cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw-x86_64.cmake -DCMAKE_INSTALL_PREFIX=`pwd`/install -DENABLE_ALL_STATIC=ON .. \
&& make -j \
&& make install)
(mkdir -p ${TRAVIS_BUILD_DIR}/build-win32/install \
&& cd ${TRAVIS_BUILD_DIR}/build-win32 \
&& cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw-i686.cmake -DCMAKE_INSTALL_PREFIX=`pwd`/install -DENABLE_ALL_STATIC=ON .. \
&& make -j \
&& make install)
fi
before_deploy:
- |
echo machine api.github.com >> ${HOME}/.netrc \
&& echo login ${TRAVIS_BOT_GITHUB_USER} >> ${HOME}/.netrc \
&& echo password ${TRAVIS_BOT_GITHUB_TOKEN} >> ${HOME}/.netrc
- |
if [ x${USE_MINGW} == xtrue ]; then
wget -q -O - https://api.github.com/rate_limit
export YPSPUR_GUI_URI=$(wget -q -O - https://api.github.com/repos/openspur/ypspur-gui/releases/latest | json assets[0].browser_download_url)
(cd ${TRAVIS_BUILD_DIR} && wget ${YPSPUR_GUI_URI})
(cd ${TRAVIS_BUILD_DIR}/build-win64/install/ \
&& unzip ../../$(basename ${YPSPUR_GUI_URI}))
(cd ${TRAVIS_BUILD_DIR}/build-win32/install/ \
&& unzip ../../$(basename ${YPSPUR_GUI_URI}))
(cd ${TRAVIS_BUILD_DIR} && mkdir packages)
(cd ${TRAVIS_BUILD_DIR}/build-win64/install/ \
&& zip -q ../../packages/yp-spur.win64.${TRAVIS_TAG}.zip -r $(ls))
(cd ${TRAVIS_BUILD_DIR}/build-win32/install/ \
&& zip -q ../../packages/yp-spur.win32.${TRAVIS_TAG}.zip -r $(ls))
(cd ${TRAVIS_BUILD_DIR}/build-win64/ \
&& zip -q ../packages/yp-spur-samples.win64.${TRAVIS_TAG}.zip -r samples/run-test.exe)
(cd ${TRAVIS_BUILD_DIR}/build-win32/ \
&& zip -q ../packages/yp-spur-samples.win32.${TRAVIS_TAG}.zip -r samples/run-test.exe)
fi
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: "kX1HXsq/hkmBxEX7k2LQyjDJh0XWdVW3L6WTRgDryIG0d6RVIfiPK9MMsqWaV7h87I/UATySChF0lHYnjv+29xQ1iUC3Pj+/wEnOGwFBOhsJC4QV1d8WLLmvy4tenasK0unfABj7ntd1EP81lyCLQHYI966fmCPlTl5sH8bSkJgA5PWcpQFfeCGloRCC5vvH6jyZuOVDga7+Lky4HowFj5ZlokK4/4Fe1XimzgorF3cHN2h6XtVT3+Kwr6G71V6A6pv/KMfn/RNoma0wdKVSckuK9tSFh7gjoTC6yQfvOH+Q26h7Cp5Z8V2f2pfGqxVZq8RiHHuN7aYtRzsSWVTVqTi5OjCAcehrUZm0Z1op8kP25UL2szRNk6OXe3bR9qruRAYSiuXb6Bl8mqVheEFJLymGyGie6Nj8oMb0Rok5z5Dqx7M/upa4OUh1a5W/I+Nu49K8pANWzfAk8gAFFk08LcKI1ImYLXufBvrBPv8tYYLQR3aRey0BcWvb7RpboCdrAMZQcRhDMSpIW9yVmBvjWqyFoX3+/oilsybD/WBdsPivrt4J0ZdgkEA49WozScRNWMm55J3V4fES6UfaYEFDk9hCkpYsS8rRvWpvTnRR/tvCTnaUIvxSpSgZWeQbfrK9nHfOeFZMna7peAkCbIgJqkRxNeLuADwx+ZOH0V0m7/M="
file:
- packages/yp-spur.win64.${TRAVIS_TAG}.zip
- packages/yp-spur.win32.${TRAVIS_TAG}.zip
- packages/yp-spur-samples.win64.${TRAVIS_TAG}.zip
- packages/yp-spur-samples.win32.${TRAVIS_TAG}.zip
on:
tags: true
condition: x${USE_MINGW} == xtrue