forked from ModOrganizer2/usvfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
65 lines (65 loc) · 2.83 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
version: 1.0.{build}
image: Visual Studio 2019
configuration: Release
platform:
- x64
- x86
environment:
GTEST_PATH: C:\Libraries\GoogleTest
BOOST_PATH: C:\Libraries\boost_1_79_0
WEBHOOK_URL:
secure: gOKbXaZM9ImtMD5XrYITvdyZUW/az082G9OIN1EC1VZ2CuYaUUM6WY2eiNxaFeOL7/9Jyu/m+Vm1fH54CEyigcUUaxA7d8F5IMWlOgE/7YYdaAFSMUTFD7EK+++3FBYfmU1F/nZ61wsiWE6hB9Au5FpGBSCeQ0Tf8U8m0ybPmD0=
before_build:
- ps: |
if (${env:Platform} -eq "x64") {
set-item -path Env:BOOST_LIBPATH -value ${Env:BOOST_PATH}\lib64-msvc-14.3
set-item -path Env:GTEST_BUILDDIR -value C:\Libraries\GoogleTest\build
}
Else {
set-item -path Env:BOOST_LIBPATH -value ${Env:BOOST_PATH}\lib32-msvc-14.3
set-item -path Env:GTEST_BUILDDIR -value C:\Libraries\GoogleTest\build_32
}
# the git clone return a failure code (according to AppVeyor), so we chain the New-Item to
# fix it
- ps: |
git clone --depth=1 --branch=master https://github.com/google/googletest.git C:\libraries\googletest 2>$null
New-Item $Env:GTEST_BUILDDIR -Type directory
- ps: Set-Location -Path $Env:GTEST_BUILDDIR
- cmd: >
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %Platform% &&
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
- cmd: >
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %Platform%
&& nmake
- ps: Set-Location -Path C:\projects\usvfs\vsbuild
# Temporary fix due to that appveyor has boost lib files in a custom output folder
- ps: |
(Get-ChildItem -Path *.props -Recurse | Select-String -Pattern '\$\(BOOST_PATH\)\\.*\\lib') | ForEach-Object {
(Get-Content $_.Path | ForEach-Object { $_ -replace '\$\(BOOST_PATH\)\\.*\\lib', $env:BOOST_LIBPATH }) | Set-Content $_.Path
}
- ps: Set-Location -Path C:\projects\usvfs
- ps: git submodule -q update --init --recursive
build:
project: vsbuild/usvfs.sln
parallel: true
verbosity: normal
test: off
artifacts:
- path: bin\usvfs_proxy_$(Platform).exe
name: usvfs_proxy_exe
- path: bin\usvfs_proxy_$(Platform).pdb
name: usvfs_proxy_pdb
- path: lib\usvfs_$(Platform).dll
name: usvfs_dll
- path: lib\usvfs_$(Platform).lib
name: usvfs_lib
- path: lib\usvfs_$(Platform).pdb
name: usvfs_pdb
on_success:
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 success $env:WEBHOOK_URL
on_failure:
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 failure $env:WEBHOOK_URL