forked from triplea-game/triplea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (65 loc) · 3.55 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
language: java
addons:
apt:
packages:
- sshpass
jdk:
- oraclejdk8
install: true
script:
## validate yamls before we do anything else
- ruby -e "require 'yaml';puts YAML.load_file('./triplea_maps.yaml')" > /dev/null || exit 1
- ruby -e "require 'yaml';puts YAML.load_file('./lobby_server.yaml')" > /dev/null || exit 1
## run the gradle build
- ./gradlew --no-daemon test
# Command with checkstyle run - ./gradlew check --info
before_deploy:
## Run the travis setup, will download install4j and configure it
- chmod +x ./.travis/setup && ./.travis/setup
## Add the travis build number to the game engine version
- GAME_CONFIG=game_engine.properties
- ENGINE_VERSION=$(grep "engine_version" $GAME_CONFIG | sed 's/.*= *//g')
- export TAGGED_VERSION="$ENGINE_VERSION.$TRAVIS_BUILD_NUMBER"
- sed -i "s/engine_version.*/engine_version = $TAGGED_VERSION/" $GAME_CONFIG
## Download tutorial map
- wget https://github.com/triplea-maps/tutorial/releases/download/0.125/tutorial.zip
## Run the gradle release build process - creates the installers
- ./gradlew --no-daemon release
### Debug, show the artifacts that have been built
- ls build/releases/
### Rename the windows installers to have 32bit and 64bit extensions instead of 'x86'
- mv build/releases/TripleA_${TAGGED_VERSION}_windows-x64.exe build/releases/TripleA_${TAGGED_VERSION}_windows-64bit.exe
- mv build/releases/TripleA_${TAGGED_VERSION}_windows.exe build/releases/TripleA_${TAGGED_VERSION}_windows-32bit.exe
## Push a tag to github, will trigger the releases process
- chmod +x ./.travis/push_tag && ./.travis/push_tag
- chmod +x ./.travis/push_maps_yaml && ./.travis/push_maps_yaml
## rest is commented out, work in progress.. does not work and needs some debugging.
#- echo "showing build artifacts" && ls build/distributions/
#- DEPLOY_DEST="$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH"
#- LOBBY_ARTIFACT="triplea-${TAGGED_VERSION}-server.zip"
#- export SSHPASS=$DEPLOY_PASS
#- sshpass -e scp build/distributions/$LOBBY_ARTIFACT $DEPLOY_DEST
#- sshpass -e scp .travis/prerelease_lobby_install.sh $DEPLOY_DEST
#- sshpass -e ssh $DEPLOY_USER@$DEPLOY_HOST $DEPLOY_PATH/prerelease_lobby_install.sh $LOBBY_ARTIFACT
#- sshpass -e ssh $DEPLOY_USER@$DEPLOY_HOST 'bash -s' < ./.travis/update_maps
deploy:
provider: releases
api_key:
secure: nxaqYrkXLGL3W20/eCnf63DLjMrQAhEuW44jggh1/nI383goa+u6w0bBtWCxRdVzos7t4dpVfS6+kv6oIHacm9zVA+RYrqy5opzCJhq8lmXVVRijbALzUeiFif2HURMaKWj0ynRNVlAyBHzazPTLZVWywifpdSubSkuMWkl20cmuKu/Hg3c1EC9se3OYhhTHx3Hya7xSrctrDEYLsEBAUZzkKfscqRVqwwltS88CgIMtRISDpSBGrtH0t1uAH6NitTSguGgb+QEpqnELcRLymX2G1yzMA4Xr5c/L34MfbBKf8vIuG9t411xYuLoyKoUbroTWxSnPwlSy6PHz+QJ7UCXbDkATOGO3chxlKxglppvI/G3n2YP5Zf2dAaDlHblpvarh55i/4i4sKB2AbvvzkIHrQJwUgmLCbpN8/Vp9GWcGkd6i5U7F8tNInCs6ttX3oGvGOfYEXs02Ctyiea4LAqk4S7GZTuV2QXqxXglL4eRIwZ4UETiwgoAAtHma63Eq7+9t2ykMlk7zAK96FGwJrB97wa08aPuSxL94IYEBmn9Ht/vKXRiNQMvpnfp4rWQtL3cqbVyYAg5EjKb4PsBmnb91+RXtnWFOY1RpZGt8sPXYd+KZYzN1BXTFJEpaLLsIDN6r7nMcAvJDUmucaM+m7giPXz1ZBGAic3UBM1qMCgI=
## This is the list of files to be deployed to github releases
file:
- build/libs/triplea-${TAGGED_VERSION}-all.jar
- build/releases/TripleA_${TAGGED_VERSION}_windows-64bit.exe
- build/releases/TripleA_${TAGGED_VERSION}_windows-32bit.exe
- build/releases/TripleA_${TAGGED_VERSION}_macos.dmg
- build/releases/TripleA_${TAGGED_VERSION}_unix.sh
- build/distributions/triplea-${TAGGED_VERSION}-all_platforms.zip
- build/distributions/triplea-${TAGGED_VERSION}-server.zip
skip_cleanup: true
prerelease: true
on:
tags: false
repo: triplea-game/triplea
branches:
only:
- master