forked from maddinat0r/samp-discord-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
61 lines (52 loc) · 2.46 KB
/
appveyor.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
version: '{branch}-{build}'
image:
- Ubuntu1604
- Visual Studio 2017
environment:
global:
CMAKE_BUILD_PARALLEL_LEVEL: 2
matrix:
- BUILD_TYPE: Debug
- BUILD_TYPE: Release
install:
# set version environment variable
- ps: $env:GIT_REPO_VERSION = "$(git describe --tags --always)"
# appveyor workaround: initialize all submodules
- git submodule update --init --recursive
# Linux: install multilib compilers
- sh: sudo dpkg --add-architecture i386 # needed for i386 openssl libs
- sh: sudo apt-get -qq update
- sh: sudo apt-get -qq -y install g++-multilib gcc-multilib
- sh: "echo g++ version: $(g++ --version | cut -d$'\n' -f1)"
before_build:
# set up boost
# Windows: boost already exists in a predefined path
- cmd: set BOOST_ROOT="C:\Libraries\boost_1_69_0"
# Linux: download and set root path
- sh: wget -q https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz -O boost.tar.gz
- sh: mkdir -p boost && tar xfz boost.tar.gz -C boost --strip-components=1
- sh: export BOOST_ROOT="boost"
# set up OpenSSL
# Windows: OpenSSL already exsits at predefined path
- cmd: set OPENSSL_ROOT="C:/OpenSSL-v111-Win32"
# Linux: install OpenSSL through apt
- sh: sudo apt-get -y install libssl-dev:i386
- sh: export OPENSSL_ROOT="/usr"
# set up log-core
# Windows
- cmd: appveyor DownloadFile "https://github.com/maddinat0r/samp-log-core/releases/download/v0.5/samp-log-core-v0.5-win32.zip" -FileName samp-log-core.zip
- cmd: 7z x samp-log-core.zip -y
- cmd: move samp-log-core-* "C:\samp-log-core"
- cmd: set LOGCORE_DIR="C:\samp-log-core\cmake"
# Linux
- sh: wget -q "https://github.com/maddinat0r/samp-log-core/releases/download/v0.5/samp-log-core-v0.5-Linux.tar.gz" -O samp-log-core.tar.gz
- sh: mkdir -p samp-log-core && tar zfx samp-log-core.tar.gz -C samp-log-core --strip-components=1
- sh: export LOGCORE_DIR="samp-log-core/cmake"
build_script:
# Linux: configure OpenSSL paths and ignore exit code to not fail build
- sh: cmake -DOPENSSL_SSL_LIBRARY="/usr/lib/i386-linux-gnu/libssl.so" -DOPENSSL_CRYPTO_LIBRARY="/usr/lib/i386-linux-gnu/libcrypto.so" -S . -B build || true
- ps: cmake -DOPENSSL_ROOT_DIR="$env:OPENSSL_ROOT" -DBOOST_ROOT="$env:BOOST_ROOT" -Dlog-core_DIR="$env:LOGCORE_DIR" -DDCC_VERSION="$env:GIT_REPO_VERSION" -DCMAKE_BUILD_TYPE="$env:BUILD_TYPE" -S . -B build
- ps: cmake --build build --config $env:BUILD_TYPE --target package
artifacts:
- path: 'build/*.zip'
- path: 'build/*.tar.gz'