-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.appveyor.yml
66 lines (54 loc) · 2.34 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
# https://ci.appveyor.com/project/orbingol/rw3dm
# Partly inspired from
# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/
# https://packaging.python.org/guides/supporting-windows-using-appveyor
# https://github.com/ogrisel/python-appveyor-demo
# https://www.appveyor.com/docs/appveyor-yml/
# Build version
version: Build {build}
# Clone with submodules
clone_script:
- cmd: git clone -q --recursive --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
- cmd: git checkout -qf %APPVEYOR_REPO_COMMIT%
# Branch configuration
branches:
only:
- master
- appveyor-testing
# PR settings
pull_requests:
do_not_increment_build_number: true
# Set build environment
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_ARGS: -DRW3DM_BUILD_ON2JSON=ON -DRW3DM_BUILD_JSON2ON=ON -DRW3DM_BUILD_ON_DLL=OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_ARGS: -DRW3DM_BUILD_ON2JSON=ON -DRW3DM_BUILD_JSON2ON=ON -DRW3DM_BUILD_ON_DLL=ON
# Install required packages before the build
install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# Generate Visual Studio solution files
before_build:
- cmd: mkdir build
- cmd: cd build
- cmd: cmake --version
- cmd: cmake .. -G "Visual Studio 16 2019" -A x64 %CMAKE_ARGS%
# Compile the package
build_script:
- cmd: cmake --build . --config Release --target on2json
- cmd: cmake --build . --config Release --target json2on
# Install the package
after_build:
- cmd: cmake --build . --config Release --target install
# Push binary wheels as artifacts
artifacts:
- path: build\install\*