forked from jaredtao/TaoQuick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (42 loc) · 1.81 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
language: cpp
sudo: required
compiler: gcc
group: deprecated-2019Q1
matrix:
include:
- os: linux
dist: xenial
env:
releaseName=TaoQuickDemo_ubuntu_xenial_x64.AppImage
cache:
bundler: true
apt: true
directories:
- /opt/qt512/
- ./linuxdeployqt.AppImage
- os: osx
osx_image: xcode10.2
env:
releaseName=TaoQuickDemo_macos10-14_xcode10-2.dmg
cache:
bundler: true
directories:
- /usr/local/opt/qt
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then chmod a+x ./scripts/macos/install.sh; ./scripts/macos/install.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then chmod a+x ./scripts/ubuntu/install.sh; ./scripts/ubuntu/install.sh; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then chmod a+x ./scripts/macos/build.sh; ./scripts/macos/build.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then chmod a+x ./scripts/ubuntu/build.sh; ./scripts/ubuntu/build.sh; fi
before_deploy:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then chmod a+x ./scripts/macos/deploy.sh; ./scripts/macos/deploy.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then chmod a+x ./scripts/ubuntu/deploy.sh; ./scripts/ubuntu/deploy.sh; fi
deploy: # 部署
provider: releases # 部署到 GitHub Release,除此之外,Travis CI 还支持发布到 fir.im、AWS、Google App Engine 等
api_key: $GITHUB_OAUTH_TOKEN # 填写 GitHub 的 token (Settings -> Personal access tokens -> Generate new token)
file: bin/${releaseName} # 部署文件路径
skip_cleanup: true # 设置为 true 以跳过清理,不然 apk 文件就会被清理
on: # 发布时机
tags: true # tags 设置为 true 表示只有在有 tag 的情况下才部署
notifications:
email: false