forked from FAForever/uid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
103 lines (100 loc) · 4.14 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
language: cpp
matrix:
include:
- os: linux
sudo: required
compiler: gcc
env:
- UID_FILENAME=faf-uid.exe
- UID_PLATFORM='win32'
- MXE_DIR=/usr/lib/mxe
- MXE_TARGET=i686-w64-mingw32.static
install:
- echo "deb http://pkg.mxe.cc/repos/apt/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mxeapt.list
- sudo apt-key adv --keyserver x-hkp://keys.gnupg.net --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB
- sudo apt-get update
- sudo apt-get --yes install
openssl
python3
mxe-$MXE_TARGET-jsoncpp
mxe-$MXE_TARGET-cryptopp
mxe-$MXE_TARGET-icu4c
- openssl aes-256-cbc -K $encrypted_13e88f9b9a4f_key -iv $encrypted_13e88f9b9a4f_iv -in faf_pub.pem.enc -out faf_pub.pem -d
script:
- mkdir build && cd build
- $MXE_DIR/usr/bin/$MXE_TARGET-cmake
-DCMAKE_BUILD_TYPE=Release
-DCRYPTOPP_LIBRARIES=/usr/lib/mxe/usr/$MXE_TARGET/lib/libcryptopp.a
-DCRYPTOPP_INCLUDE_DIRS=/usr/lib/mxe/usr/$MXE_TARGET/include
-DUID_SKIP_LEGACY=On
-DUID_PUBKEY_BYTES=$(../encode_openssl_modulus.py $(openssl rsa -noout -inform PEM -in ../faf_pub.pem -pubin -modulus))
..
- make -j8
- cd ..
- os: linux
dist: trusty
sudo: require
compiler: gcc
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- cmake
- python3
- openssl
env:
- UID_FILENAME=faf-uid
- UID_PLATFORM='linux'
- JSONCPP_VERSION=1.7.7
- CRYPTOPP_VERSION=5_6_5
script:
- sudo ln -s /usr/bin/gcc-6 /usr/local/bin/gcc
- sudo ln -s /usr/bin/g++-6 /usr/local/bin/g++
- wget https://github.com/open-source-parsers/jsoncpp/archive/$JSONCPP_VERSION.tar.gz -O jsoncpp.tar.gz
- tar xfz jsoncpp.tar.gz
- mkdir jsoncpp-build
- cd jsoncpp-build
- cmake
-DCMAKE_BUILD_TYPE=MinSizeRel
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
-DBUILD_STATIC_LIBS=ON
-DBUILD_SHARED_LIBS=OFF
../jsoncpp-$JSONCPP_VERSION
- make -j8
- cd ..
- wget https://github.com/weidai11/cryptopp/archive/CRYPTOPP_$CRYPTOPP_VERSION.zip -O cryptopp.zip
- unzip ./cryptopp.zip
- mv cryptopp-CRYPTOPP_$CRYPTOPP_VERSION cryptopp
- cd cryptopp
- make -j8 -f GNUmakefile CXXFLAGS='-DCRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562 -DNDEBUG -O3' libcryptopp.a
- cd ..
- openssl aes-256-cbc -K $encrypted_13e88f9b9a4f_key -iv $encrypted_13e88f9b9a4f_iv -in faf_pub.pem.enc -out faf_pub.pem -d
- mkdir build && cd build
- cmake
-DJSONCPP_LIBRARIES=$TRAVIS_BUILD_DIR/jsoncpp-build/src/lib_json/libjsoncpp.a
-DJSONCPP_INCLUDE_DIRS=$TRAVIS_BUILD_DIR/jsoncpp-$JSONCPP_VERSION/include
-DCRYPTOPP_LIBRARIES=$TRAVIS_BUILD_DIR/cryptopp/libcryptopp.a
-DCRYPTOPP_INCLUDE_DIRS=$TRAVIS_BUILD_DIR
-DCMAKE_CXX_FLAGS="-DCRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562"
-DCMAKE_BUILD_TYPE=MinSizeRel
-DUID_PUBKEY_BYTES=$(../encode_openssl_modulus.py $(openssl rsa -noout -inform PEM -in ../faf_pub.pem -pubin -modulus))
..
- make -j8
- cd ..
script:
- echo "Nothing."
before_deploy:
- export RELEASE_PKG_FILE=./build/$UID_FILENAME
deploy:
provider: releases
api_key:
secure: kvzwAY9Wsc9j0OvantE+nahfSadGQX+y2L8WHfk8T9uCpUZbR4pvunO4a2AXNBPxgRwMonTuZ8DZ6JyK+0x5TQekSJfQXgqlccFjJRfmpI3hd1wk/RbCko4wzSmU9hlbOFbetTU6Pz0LtYWSahZpgy1wMB1PfuSDP1qPFG5iJJqu1T3kexTJgenxkWqmOf02ZB1OMqFouzSnCOHbUUNDxLcHequ1EZcJQPhsMfoSo4rwpmVG01j/kj6T91XVAi0ZsMAgXzIyKfna36fnW0P6273d11TV1su9yr8/B+ZmC8zwRyqNu7G3f57nTxSY+nY6gZupyegM6bTUvOCiKeG8QuyhGsJ7vHKcqqsk2kysOjrupSioCFpegzNd7QmbVSyaJtLnGcuYCjXI/CqB096ziOxa3yGWEvCz0bTteXVR3ZXmkCO+1keu6R5Q3f1esx4eGbb+mmu0z19DLECrhRkHg6jFaJzcJJvtPh7ZW9bh+mjsBG4+koAgcQU40LWdKvzA6MGUxHPbz9fzTn6oXBIsC8HABCYKo5nL4NyFY19Fl7QOm3+RyDP3/EoGv2k4pcfJEbCLC3D9FsDEQMF7kd/vPrkneYLh0BVx5JDLMJN4l6QTY/YGGhEbYRAPegIj3MLth2nmeGeSBFBw/MgszWviubz35buqaH8e/67B7gVggK4=
file: "${RELEASE_PKG_FILE}"
skip_cleanup: true
on:
tags: true
prerelease: true