-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappveyor.yml
68 lines (61 loc) · 2.64 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
# version format
version: 1.0.{build}
image: Visual Studio 2022
clone_folder: C:\workspace\OPC-UA\LogIt
build:
verbosity: normal
notifications:
- provider: Email
to:
- quasar-developers@cern.ch
subject: quasar windows build status changed
on_build_success: false
on_build_failure: false
on_build_status_changed: true
environment:
WINDOWS_DEPENDENCIES_DIR: C:\workspace\OPC-UA\quasar-windows-dependencies
BOOST_PATH_HEADERS: $(WINDOWS_DEPENDENCIES_DIR)\boost\lib\native\include
BOOST_PATH_LIBS: $(WINDOWS_DEPENDENCIES_DIR)
#
# Set environment variables in powershell using command
# [System.Environment]::SetEnvironmentVariable("VAR", "C:/target/path", "Machine")')
#
install:
# delete and recreate clean directory for windows dependencies.
- ps : |
Write-Output "Cleaning and recreating windows dependencies dir: ${env:WINDOWS_DEPENDENCIES_DIR}"
if(Test-Path "${env:WINDOWS_DEPENDENCIES_DIR}")
{
Remove-Item "${env:WINDOWS_DEPENDENCIES_DIR}" -Force -Recurse;
}
New-Item -ItemType Directory -Force -Path "${env:WINDOWS_DEPENDENCIES_DIR}"
# chocolatey: package manager for installing applications
- ps : Write-Output "Installing chocolatey packages..."
- ps : choco install nuget.commandline --yes --limit-output
- ps : Write-Output "Installed chocolatey packages"
# nuget: package manager for installing libs
- ps : Write-Output "Installing nuget packages to ${env:WINDOWS_DEPENDENCIES_DIR}"
- ps : nuget install boost-vc141 -Version 1.67.0 -NonInteractive -ExcludeVersion -OutputDirectory "${env:WINDOWS_DEPENDENCIES_DIR}"
- ps : Write-Output "Installed nuget packages to ${env:WINDOWS_DEPENDENCIES_DIR}"
build_script:
- cmd : mkdir build-release && cd build-release
- cmd : cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DLOGIT_BUILD_STAND_ALONE=ON -DLOGIT_BUILD_SHARED_LIB=ON -DLOGIT_BACKEND_STDOUTLOG=ON -DLOGIT_BACKEND_BOOSTLOG=ON -DCMAKE_TOOLCHAIN_FILE=boost_appveyor.cmake -G "Visual Studio 17 2022"
- cmd : cmake --build . --config Release
- cmd : cd ..
after_build:
- ps : Write-Output "Build completed!"
- ps : |
if(Test-Path "build-release\Release\LogIt.dll")
{
Write-Output "Succesfully Built LogIt" ;
}
else
{
Write-Output "ERROR! The script will terminate. There was a problem building LogIt";
Exit 1;
}
artifacts:
- path : build-release\Release\LogIt.dll
# uncomment to block VM deletion for investigating broken builds.
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))