forked from AllTheHaxx/AllTheHaxx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
85 lines (73 loc) · 2.96 KB
/
circle.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
dependencies:
pre:
- |
sudo add-apt-repository 'deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse'
sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots
sudo apt-get update
sudo apt-get build-dep teeworlds
sudo apt-get install libsdl2-dev
# install cross-compiler stuff for windows
if [ $CIRCLE_NODE_INDEX -gt 0 ]; then
sudo apt-get install mingw-w64 mingw-w64-common
sudo apt-get install mingw-w64-i686-dev mingw-w64-x86-64-dev
sudo apt-get install gcc-mingw-w64-base gcc-mingw-w64 g++-mingw-w64
else
sudo add-apt-repository 'deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse'
sudo add-apt-repository 'deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse'
sudo apt update; sudo apt install gcc
sudo add-apt-repository 'deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu artful main restricted universe multiverse'
sudo apt update
sudo apt install gcc g\+\+
fi
if [ ! -x ~/bam/bam ]; then
git clone https://github.com/matricks/bam ~/bam/
cd ~/bam; ./make_unix.sh
fi
mkdir $CIRCLE_ARTIFACTS/linux
mkdir $CIRCLE_ARTIFACTS/win32
mkdir $CIRCLE_ARTIFACTS/win64
cache_directories:
- "~/bam/"
## Customize test commands
# Container 1 builds linux 64 bit
# Container 2 builds windows 64 bit
# Container 3 builds windows 32 bit
# all artifacts will be collected.
test:
override:
- ?
>
case $CIRCLE_NODE_INDEX in
1) export TARGET_FAMILY=windows TARGET_PLATFORM=win64 TARGET_ARCH=amd64 PREFIX=x86_64-w64-mingw32- PATH=/usr/x86_64-w64-mingw32/bin:$PATH ;;
2) export TARGET_FAMILY=windows TARGET_PLATFORM=win32 TARGET_ARCH=ia32 PREFIX=i686-w64-mingw32- PATH=/usr/i686-w64-mingw32/bin:$PATH ;;
esac
if [ ! $CIRCLE_NODE_INDEX -eq 0 ]; then
export CC=${PREFIX}gcc CXX=${PREFIX}g++ WINDRES=${PREFIX}windres;
~/bam/bam config curl.use_pkgconfig=false opus.use_pkgconfig=false opusfile.use_pkgconfig=false ogg.use_pkgconfig=false;
EXT=.exe
echo "CC=$CC, CXX=$CXX, WINDRES=$WINDRES"
$CC --version
$CXX --version
else
gcc --version
g++ --version
fi;
DST=linux;
if [ $CIRCLE_NODE_INDEX -eq 1 ]; then
DST=win64
fi;
if [ $CIRCLE_NODE_INDEX -eq 2 ]; then
DST=win32
fi;
~/bam/bam client_release;
RETVAL=$?;
if [ ! $RETVAL -eq 0 ]; then
exit $RETVAL
fi;
mv "./AllTheHaxx"$EXT $CIRCLE_ARTIFACTS/$DST;
if [ ! $CIRCLE_NODE_INDEX -eq 0 ]; then
zip -q -T -X DLLs . *.dll;
mv DLLs.zip $CIRCLE_ARTIFACTS/$DST;
fi
:
parallel: true