forked from ja2-stracciatella/ja2-stracciatella
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
114 lines (97 loc) · 3.73 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# validator: https://ci.appveyor.com/tools/validate-yaml
version: "{build}"
environment:
GCLOUD_CREDENTIALS_SALT:
secure: "tmDQ9iBheiMMWuKKqA/l7U0kC+S2yFeI05B47pGaHTs="
GCLOUD_CREDENTIALS_KEY:
secure: "O5HZHcvH48vEP5zAhmhJxbTSohl+6TVVK5hWKKFWwFQBX3cqCsW355pQrS5LGUV9qZ3J34hViLnGcArSEATLiS309BnIsvouH8TaJU99iaA="
GCLOUD_CREDENTIALS_IV:
secure: "mXNwsLAU0N1u1oFv4e/QwF6HfMCT39c3La/pniJTgOaQB2Y3LvoPWDvU5JbhF4yQ"
GITHUB_ACCESS_TOKEN:
secure: "fcDy5AgkBH9bKqdsbwv9piWbN6ksoUKk+iky/DQmk3YG3UNl68BegfkYUzSF3rJ7"
CMAKE_GENERATOR: Ninja
SCCACHE_CACHE_SIZE: 500M
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR_PLATFORM: x86
CI_TARGET: windows-msvc-x86
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR_PLATFORM: amd64
CI_TARGET: windows-msvc-amd64
branches:
only:
- master
- nightly
- /\d+\.\d+\.[\dx]+/
matrix:
fast_finish: true
clone_folder: c:\projects\ja2-stracciatella
clone_depth: 1
cache:
# rust and cargo
- '%USERPROFILE%\.cargo\bin\ -> rust\Cargo.lock, rust\Cargo.toml'
- '%USERPROFILE%\.cargo\registry\index\ -> rust\Cargo.lock, rust\Cargo.toml'
- '%USERPROFILE%\.cargo\registry\cache\ -> rust\Cargo.lock, rust\Cargo.toml'
- '%USERPROFILE%\.cargo\git\db\ -> rust\Cargo.lock, rust\Cargo.toml'
- '%USERPROFILE%\.rustup\ -> rust-toolchain'
# sccache's cache
- '%LOCALAPPDATA%\Mozilla\sccache'
# sccache binary
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
skip_commits:
# appveyor only searches for tags in the first line by default
message: /\[ci skip\]/
init:
- ps: $env:BUILD_TYPE = "Debug";
- ps: $env:CI_REF = "refs/heads/${env:APPVEYOR_REPO_BRANCH}";
- ps: >
if (Test-Path Env:\APPVEYOR_PULL_REQUEST_NUMBER) {
$env:VERSION_TAG = "${env:APPVEYOR_PULL_REQUEST_NUMBER}pullrequest";
$env:CI_REF = "refs/pull/${env:APPVEYOR_PULL_REQUEST_NUMBER}";
}
true;
- ps: >
if ("$env:APPVEYOR_REPO_BRANCH" -eq "nightly") {
$env:BUILD_TYPE = "Release";
$env:VERSION_TAG = "$(Get-Date -UFormat "%Y%m%d")";
}
true;
- ps: >
if ("$env:APPVEYOR_REPO_TAG" -eq "true") {
$env:BUILD_TYPE = "Release";
$env:VERSION_TAG = "";
$env:CI_REF = "refs/tags/${env:APPVEYOR_REPO_TAG_NAME}";
}
true;
- ps: $env:BUILD_SWITCHES = "-DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DVERSION_TAG=%VERSION_TAG% -DCPACK_GENERATOR=ZIP;NSIS -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_TOOLCHAIN_FILE=./cmake/toolchain-msvc.cmake"
- ps: >
if ("$env:BUILD_TYPE" -eq "Release") {
$env:BUILD_SWITCHES = "${env:BUILD_SWITCHES} -DWITH_EDITOR_SLF=ON";
}
true;
- cmd: echo "%CMAKE_GENERATOR% %CMAKE_GENERATOR_PLATFORM%"
- cmd: echo "%BUILD_SWITCHES%"
install:
- cmd: bash .ci\ci-setup.sh
# Seems like env variables set by bash are not taken over to ps/cmd
- ps: $env:PATH = "${env:PATH};${env:USERPROFILE}\.cargo\bin;${env:USERPROFILE}\google-cloud-sdk\bin"
before_build:
- cmd: if not exist ci-build md ci-build
- cmd: cd ci-build
- cmd: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %CMAKE_GENERATOR_PLATFORM%'
- cmd: cmake -G %CMAKE_GENERATOR% %BUILD_SWITCHES% ..
- cmd: type CMakeCache.txt
build_script:
- ps: cmake --build c:\projects\ja2-stracciatella\ci-build --target all --config ${env:BUILD_TYPE}
test_script:
- cmd: cmake --build . --target cargo-test
- cmd: ja2.exe -unittests
- cmd: ja2-launcher.exe -help
after_test:
- cmd: sccache -s
- ps: cmake --build c:\projects\ja2-stracciatella\ci-build --target package
- ps: cd c:\projects\ja2-stracciatella
- cmd: bash .ci\ci-publish.sh
artifacts:
- path: ci-build\ja2-stracciatella_*