forked from ps2homebrew/Open-PS2-Loader
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
135 lines (107 loc) · 5.03 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
## Travis CI Script by Caio Oliveira aka Caio99BR <caiooliveirafarias0@gmail.com>
# For Open-PS2-Loader
## Thanks to:
# - izdubar@psx-scene and jimmikaelkael@psx-scene
# <http://psx-scene.com/forums/f150/%5Blinux%5D-opl-compile-guides-63749/>
# - Bat Rastard@psx-scene and doctorxyz@psx-scene
# <http://psx-scene.com/forums/f150/2015-linux-mint-vm-creation-opl-compiling-guide-ps2sdk-127047/index3.html#post1169435>
# - and a lot of people around internet :)
dist: trusty
sudo: required
language: c
cache: ccache
## Fix make_changelog.sh
git:
depth: 9999999
before_install:
## Save env dir
- cd ../
- export TRAVIS_ENV_DIR=$(pwd)
## Save repo name
- export NEW_REPO_SLUG=$(echo ${TRAVIS_REPO_SLUG} | cut -f 1 -d "/")
## Make CCache good to us
- export PATH="/usr/lib/ccache:${PATH}"
install:
## Dependencies
- sudo apt-get install -yqqq gcc-4.4 patch wget make git libc6-dev zlib1g zlib1g-dev libucl1 libucl-dev ccache
before_script:
## Make cleanup, just for prevent anything
- rm -rf ${TRAVIS_ENV_DIR}/gsKit/ ${TRAVIS_ENV_DIR}/ps2eth/ ${TRAVIS_ENV_DIR}/ps2toolchain/ ${TRAVIS_ENV_DIR}/ps2-packer/ ${TRAVIS_ENV_DIR}/ps2sdk-ports/
## Set up the environment
- export PS2DEV=${TRAVIS_ENV_DIR}/ps2dev
- export PS2SDK=${PS2DEV}/ps2sdk
- export PATH=${PATH}:${PS2DEV}/bin:${PS2DEV}/ee/bin:${PS2DEV}/iop/bin:${PS2DEV}/dvp/bin:${PS2SDK}/bin
- export PS2ETH=${PS2DEV}/ps2eth
- export GSKIT=${PS2DEV}/gsKit
- export LANG=C
- export LC_ALL=C
## Clone all
- git clone --quiet https://github.com/ps2dev/ps2toolchain.git ${TRAVIS_ENV_DIR}/ps2toolchain/
- git clone --quiet https://github.com/ps2dev/ps2sdk-ports.git ${TRAVIS_ENV_DIR}/ps2sdk-ports/
- git clone --quiet https://github.com/ps2dev/ps2eth ${TRAVIS_ENV_DIR}/ps2eth/
- git clone --quiet https://github.com/ps2dev/gsKit.git ${TRAVIS_ENV_DIR}/gsKit/
- git clone --quiet https://github.com/ps2dev/ps2-packer.git ${TRAVIS_ENV_DIR}/ps2-packer/
- chmod +x $(find . -name \*sh)
## ps2dev/PS2Toolchain
- cd ${TRAVIS_ENV_DIR}/ps2toolchain/
- bash ./toolchain.sh > /tmp/OPNPS2LD-PS2TOOLCHAIN.log 2>&1
- curl --upload-file /tmp/OPNPS2LD-PS2TOOLCHAIN.log https://transfer.sh/OPNPS2LD-PS2TOOLCHAIN-${NEW_REPO_SLUG}-NIGHTLY${TRAVIS_BUILD_NUMBER}.log
## ps2dev/PS2SDKPorts/zlib
- cd ${TRAVIS_ENV_DIR}/ps2sdk-ports/zlib/
- make
- make install
## ps2dev/PS2SDKPorts/libpng
- cd ${TRAVIS_ENV_DIR}/ps2sdk-ports/libpng/
- make
- make install
## ps2dev/PS2SDKPorts/libjpeg
- cd ${TRAVIS_ENV_DIR}/ps2sdk-ports/libjpeg/
- make
- make install
## ps2dev/PS2SDKPorts/freetype
- cd ${TRAVIS_ENV_DIR}/ps2sdk-ports/freetype-2.4.12/
- bash ./SetupPS2.sh
## ps2dev/PS2ETH
- cd ${TRAVIS_ENV_DIR}/ps2eth/
- make
- sudo mkdir -p /usr/lib/ps2dev/ps2eth
- sudo tar c $(find . -name \*irx) | sudo tar x -C /usr/lib/ps2dev/ps2eth
## ps2dev/gsKit
- cd ${TRAVIS_ENV_DIR}/gsKit/
- make
- make install
## ps2dev/PS2Packer
- cd ${TRAVIS_ENV_DIR}/ps2-packer/
- make
- make install
script:
## Go back to opl dir
- cd ${TRAVIS_BUILD_DIR}/
## BUG: If we not call './make_changelog.sh' before 'make', it will always
## build OPL with old REVISION, and make things confuse
##
## Make a new changelog
- bash ./make_changelog.sh
## Hack to prevent '-dirty' flag
- git add -A
## Let's build Open PS2 Loader Release!
- make release LOCALVERSION=${NEW_REPO_SLUG}
## Make the lang pack
- bash ./lng_pack.sh
after_success:
## Export some variables
- export OPL_VERSION=$(make oplversion)
- export OPL_UP_LAST_BUILD=$(curl --upload-file ${TRAVIS_BUILD_DIR}/OPNPS2LD-${OPL_VERSION}-${NEW_REPO_SLUG}.ZIP https://transfer.sh/OPNPS2LD-${OPL_VERSION}-${NEW_REPO_SLUG}-NIGHTLY${TRAVIS_BUILD_NUMBER}.zip)
- export OPL_LANG_UP_LAST_BUILD=$(curl --upload-file ${TRAVIS_BUILD_DIR}/OPNPS2LD_LANGS-${OPL_VERSION}.zip https://transfer.sh/OPNPS2LD_LANGS-${OPL_VERSION}-NIGHTLY${TRAVIS_BUILD_NUMBER}.zip)
- export OPL_DATE=$(date +%d'/'%m'/'%Y)
## Configure TravisCI git
- git config --global user.email "builds@travis-ci.org"
- git config --global user.name "Travis-CI"
## Clone my gh-page
- git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/Caio99BR/Open-PS2-Loader ${TRAVIS_ENV_DIR}/gh-pages/ > /dev/null
- cd ${TRAVIS_ENV_DIR}/gh-pages/
## Let's upload latest build to gh-page!
- bash ${TRAVIS_ENV_DIR}/gh-pages/index-download-make.sh
env:
global:
secure: "4WrTvtqz76DWeeUqiL76rBr71HNswnvvE1T3SQxR3gWq2i89wrM0jJXeS6zsmXGDN/q4knblvuSoMFJH41AMAnKY0fHOxPZmTcN1W5BVbi8AvkrfEMbenqCzP2cWI4IsvPzeii4OaqrmLzdcuOKjqEE9m3Gbg1cvf3pPt8IgKJoDq1S5Wp+cRWv8QTf2T8sX0HK90MUkvvuELE8kWEb3CZgZCjzL7U2Sav2xE6JQh8mICIeH0yvPzoAiFg2LfhqVzH0qtDW/75DxktZBkYPIxdcZhQiykCXK1Lr6ak2E8RNHMhoPo4pYKXDZhTpT1MzjCRlTnqDbvzXdbZ3hsU7B5/oU9P6GJbSOkU3fN/HjJhzwMSAt0/dvwimGQ4mDV7KYqwHV3XbAXsjkYBzIrVhjcdO6vk6ZZkHUIaXlom+2j9RYMRsR8gy4H5broiH38bFJYQCdCjPel3A7Y/vHvQhV/ZjA+YcC4pnohSpkU9kzzAHLPKmjMCHucjd/xbDrBv99Z4TlFUegGBRC5DmSr3YItalaGsq0aaRNIruNHrD1BcD4g8nSVHNTHJYaYHD7mpsnjb7iRlYsao+zVG4eWUpds1qz2rNym/wa5Fq4SZJc1nbC+jIAH2Ek8j+bCs2hFWb5SjrQUoWrMQiSuszM8/RB6Ex6ZlpO9RCxcLY6E+wz97o="