forked from thestr4ng3r/chiaki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
167 lines (156 loc) · 5.92 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
language: cpp
branches:
only:
- master
- /^v\d.*$/
- /^deploy-test(-.*)?$/
before_script:
- export CHIAKI_VERSION="$TRAVIS_TAG"
- if [ -z "$CHIAKI_VERSION" ]; then export CHIAKI_VERSION="$TRAVIS_COMMIT"; fi
matrix:
include:
- name: Linux (Bionic)
os: linux
dist: bionic
addons:
apt:
sources:
- sourceline: "ppa:beineri/opt-qt-5.12.0-bionic"
packages:
- protobuf-compiler
- python3-protobuf
- libopus-dev
- qt512base
- qt512multimedia
- qt512gamepad
- qt512svg
- libgl1-mesa-dev
- nasm
- libsdl2-dev
- libva-dev
env:
- CMAKE_PREFIX_PATH="$TRAVIS_BUILD_DIR/ffmpeg-prefix;/opt/qt512"
- CMAKE_EXTRA_ARGS="-DCMAKE_INSTALL_PREFIX=/usr"
- DEPLOY=0
install:
- scripts/build-ffmpeg.sh
script:
- scripts/travis-build.sh || exit 1
- source scripts/travis-appimage.sh
- name: Linux (Xenial, Deploy)
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: "ppa:beineri/opt-qt-5.12.3-xenial"
packages:
- python3-pip
- libopus-dev
- qt512base
- qt512multimedia
- qt512svg
- libgl1-mesa-dev
- nasm
- libudev-dev
- libva-dev
env:
- CMAKE_PREFIX_PATH="$TRAVIS_BUILD_DIR/ffmpeg-prefix;$TRAVIS_BUILD_DIR/sdl2-prefix;/opt/qt512"
- CMAKE_EXTRA_ARGS="-DCMAKE_INSTALL_PREFIX=/usr"
- SDL2_FROM_SRC=1
- DEPLOY=1
install:
- sudo pip3 install protobuf
- scripts/fetch-protoc.sh
- export PATH="$TRAVIS_BUILD_DIR/protoc/bin:$PATH"
- scripts/build-ffmpeg.sh
- scripts/build-sdl2.sh
script:
- scripts/travis-build.sh || exit 1
- source scripts/travis-appimage.sh
- name: macOS
os: osx
osx_image: xcode11
addons:
homebrew:
update: true # tmp
packages:
- qt
- opus
- nasm
- sdl2
env:
- CMAKE_PREFIX_PATH="$TRAVIS_BUILD_DIR/ffmpeg-prefix;/usr/local/opt/[email protected];/usr/local/opt/qt"
- CMAKE_EXTRA_ARGS=""
- DEPLOY=1
install:
- brew unlink python@2 # tmp
- brew link python # tmp
- scripts/build-ffmpeg.sh
script:
- scripts/travis-build.sh
- cp -a build/gui/chiaki.app Chiaki.app
- /usr/local/opt/qt/bin/macdeployqt Chiaki.app -dmg
- export DEPLOY_FILE="Chiaki-${CHIAKI_VERSION}-macOS-x86_64.dmg"
- mv Chiaki.dmg "$DEPLOY_FILE"
- cmake -DCHIAKI_VERSION="${CHIAKI_VERSION}" -DCHIAKI_DMG="${DEPLOY_FILE}" -DCHIAKI_CASK_OUT=chiaki.rb -P scripts/configure-cask.cmake
- echo "------------------- chiaki.rb cask -------------------"
- cat chiaki.rb
- echo "------------------------------------------------------"
- name: Android
language: android
os: linux
dist: trusty
env:
- DEPLOY=1
android:
components:
- build-tools-29.0.2
- android-29
addons:
apt:
packages:
- python3-pip
install:
- echo y | sdkmanager "ndk-bundle"
- echo y | sdkmanager "cmake;3.10.2.4988404"
- sudo pip3 install protobuf
- scripts/fetch-protoc.sh
- export PATH="$TRAVIS_BUILD_DIR/protoc/bin:$PATH"
script:
- cd android
- ./gradlew assembleRelease bundleRelease
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then export DEPLOY_FILE_BASE="Chiaki-$CHIAKI_VERSION-Android"; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then export DEPLOY_FILE="$DEPLOY_FILE_BASE.a[pa][kb]"; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cp app/build/outputs/apk/release/app-release.apk "../$DEPLOY_FILE_BASE.apk"; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cp app/build/outputs/bundle/release/app-release.aab "../$DEPLOY_FILE_BASE.aab"; fi
- cd ..
- name: "Source Package"
os: linux
dist: bionic
env:
- DEPLOY=1
install: ~
script:
- find . -name ".git*" | xargs rm -rfv
- mkdir chiaki && shopt -s extglob && mv !(chiaki) chiaki
- export DEPLOY_FILE="chiaki-$CHIAKI_VERSION-src.tar.gz"
- tar -czvf "$DEPLOY_FILE" chiaki
before_install:
- if [ ! -z "$encrypted_31d5e6477a29_iv" ]; then openssl aes-256-cbc -K $encrypted_31d5e6477a29_key -iv $encrypted_31d5e6477a29_iv -in secret.tar.enc -out secret.tar -d && tar -xf secret.tar; fi
after_success:
- if [ ! -z "$DEPLOY_FILE" ]; then echo "--- SHA256 for $DEPLOY_FILE"; openssl dgst -sha256 "$DEPLOY_FILE"; echo; fi
- if [ ! -z "$DEPLOY_FILE" ]; then echo "--- transfer.sh"; curl -m 30 --upload-file "$DEPLOY_FILE" "https://transfer.sh/$DEPLOY_FILE"; echo; fi
- if [ ! -z "$DEPLOY_FILE" ]; then echo "--- oshi.at"; curl -m 30 --upload-file "$DEPLOY_FILE" "https://oshi.at/$DEPLOY_FILE/129600"; echo; fi
deploy:
skip_cleanup: true
provider: releases
draft: true
api_key:
secure: R7RjLOuGFda05EJeNX2lNG135xKU2w9IQn7p1H1P2zw4zlQMgSBpNRaW8hE408x5KJUjptJTF6QaYYmPWbHlf9VEPFVIcVzSp8YSd2Cdr+GKhmFgWF+fJPBj5y9NNqohwxvK3Nrugh0v6yVQiEYEGF7WArU6dvymSNNTw/EqXtfrOvwUgSf1bDAzQAsXn3E6Ptzf9DrQU8+mOgMSqT/3Wy5207KLmWTtwBWDgkskKwS9OEXk3tDd6U4uT7NFHHmcw+ZjQXRD+yHSHUWYs1oKR4IfgPFxQfEK0Txhkxdf3yj1aNweuk7GGC3cfRaarUfRQpoYqYYCxhTfGZ2b4rVgX3XpssMY7ZmSZHRi/SX08ETXF/c7PZGzr0RPFXZLgAGjgN6O2Dbb9agc3tOUGDUuqKEWX9sALm82WS0FRAFrFLENgMFsj5hu+DKIIkAU2yEsadYKjjhC+q+mTAEkxKKknvM50Xpx3tE1TlP/31Z53v4/NydHIHXPJ72V3mnuoTacwhG2SkGtjMbLCnEZDCtu9C4556oa7Z29cqafv90ZD7lTQMV+ijKvjxgOC9u1GeemmZLofRGDFyYSqKxOpYxxxXGOhs+7FMAdKP00h++MTLwRwIebKQs0fW0XiNKmwushWOUU8sXI1jxTbwe9dPQsspxHRv/mVo6l2vUcBjC19K0=
file_glob: true
file: $DEPLOY_FILE
on:
tags: true
condition: $DEPLOY = 1