-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
74 lines (66 loc) · 2.59 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
62
63
64
65
66
67
68
69
70
71
72
73
# we use a custom clone script because appveyor doesn't fetch submodules
clone_script:
# for windows
- cmd: git clone -q --recursive https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: git checkout -qf %APPVEYOR_REPO_COMMIT%
# for linux/macos
- sh: git clone -q --recursive https://github.com/${APPVEYOR_REPO_NAME}.git ${APPVEYOR_BUILD_FOLDER}
- sh: cd ${APPVEYOR_BUILD_FOLDER}
- sh: git checkout -qf ${APPVEYOR_REPO_COMMIT}
# get the current version
- ps: if($env:APPVEYOR_REPO_TAG -eq "true") {$env:GIT_REV = $env:APPVEYOR_REPO_TAG_NAME} else {$env:GIT_REV = $env:APPVEYOR_REPO_COMMIT}
environment:
matrix:
- arch: x86
compiler: msvc2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
REL_PLATFORM: win-x86
- arch: x64
compiler: msvc2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
REL_PLATFORM: win-x86_64
- arch: x64
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
REL_PLATFORM: linux-x86_64
- arch: x64
APPVEYOR_BUILD_WORKER_IMAGE: macOS
REL_PLATFORM: macos-x86_64
platform:
- x64
install:
# Set paths to dependencies (based on architecture)
- cmd: if %arch%==x86 (set PYTHON_ROOT=C:\python37) else (set PYTHON_ROOT=C:\python37-x64)
# Print out dependency paths
- cmd: echo Using Python at %PYTHON_ROOT%
# Add necessary paths to PATH variable
- cmd: set PATH=%cd%;%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%
- sh: export PATH=~/venv3.8.1/bin:$PATH
# Install meson and ninja
- pip install ninja meson
# Set up the build environment
- cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% )
- cmd: if %compiler%==msvc2017 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch% )
build_script:
- cmd: echo Building on %arch% with %compiler%
- sh: echo Building on $arch with $compiler
- meson --backend=ninja builddir
- ninja -C builddir
# zip up the binaries
- cmd: pushd builddir & 7z a -tzip "logic-dshot-%REL_PLATFORM%-%GIT_REV%.zip" "*.dll" && popd & exit 0
- sh: pushd builddir; tar -cvJf logic-dshot-${REL_PLATFORM}-${GIT_REV}.tar.xz $(ls *.so *.dylib 2>/dev/null); popd
after_build:
- ps: ls builddir
artifacts:
- path: 'builddir/logic-dshot-*.zip'
- path: 'builddir/logic-dshot-*.tar.xz'
deploy:
provider: GitHub
description: 'Automatic build'
auth_token:
secure: 3TUmiiZ1SUAb9WChqNzfe58XztZeD/iUposBU5MEfJNdI/sp8kbDJK916gYZW032
draft: true
prerelease: false
force_update: true
on:
appveyor_repo_tag: true