-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcircle.yml
84 lines (72 loc) · 2.58 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
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
fi
if [ ! -d ~/bam-0.4.0 ]; then
pushd ~
wget http://github.com/downloads/matricks/bam/bam-0.4.0.tar.gz
tar xvzf bam-0.4.0.tar.gz
cd bam-0.4.0
./make_unix.sh
popd
fi
mkdir $CIRCLE_ARTIFACTS/linux
mkdir $CIRCLE_ARTIFACTS/win32
mkdir $CIRCLE_ARTIFACTS/win64
cache_directories:
- "~/bam-0.4.0/"
test:
override:
## 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-0.4.0/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-0.4.0/bam server_release;
RETVAL=$?;
if [ ! $RETVAL -eq 0 ]; then
exit $RETVAL
fi;
mv "./infection_srv"$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