forked from OpenApoc/OpenApoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor-dev.yml
72 lines (72 loc) · 3.18 KB
/
appveyor-dev.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
version: '{branch}-0.0.{build}'
branches:
except:
- master
- /release.*/
skip_tags: true
os: Visual Studio 2022
configuration:
- Release
# - Debug
platform:
- x64
# - Win32
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
init:
- if "%PLATFORM%"=="x64" (set VCPKG_DEFAULT_TRIPLET=x64-windows)
- if "%PLATFORM%"=="x64" (set VCVARS_ARCH=amd64)
- if "%PLATFORM%"=="x64" (set QTPATH=C:\Qt\5.15\msvc2019_64)
- if "%PLATFORM%"=="Win32" (set VCPKG_DEFAULT_TRIPLET=x86-windows)
- if "%PLATFORM%"=="Win32" (set VCVARS_ARCH=amd64_x86)
- if "%PLATFORM%"=="Win32" (set QTPATH=C:\Qt\5.15\msvc2019)
#clone_depth: 10
cache: C:\Users\appveyor\AppData\Local\vcpkg\archives -> appveyor-dev.yml
before_build:
- cd c:\tools\vcpkg
- git pull
- git checkout 2023.08.09
- .\bootstrap-vcpkg.bat
- cd %APPVEYOR_BUILD_FOLDER%
- vcpkg install
- git submodule update --init --recursive
- curl http://s2.jonnyh.net/pub/cd_minimal.iso.xz -o temp\cd.iso.xz
- 7z e temp\cd.iso.xz -odata\
- call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %VCVARS_ARCH%
build_script:
- cmake -DMSVC_PDB=ON . -GNinja -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE="%CONFIGURATION%" -DCMAKE_PREFIX_PATH=%QTPATH% -DUSE_SYSTEM_QT=ON
- cmake --build .
after_build:
- git describe --tags > build-id
- set /p OPENAPOC_VERSION= < build-id
- set OPENAPOC_FILENAME=OpenApoc-%PLATFORM%-%OPENAPOC_VERSION%.7z
- set OPENAPOC_DEBUG_FILENAME=OpenApoc-debug-%PLATFORM%-%OPENAPOC_VERSION%.7z
- mkdir OpenApoc-%OPENAPOC_VERSION%
- echo %APPVEYOR_REPO_COMMIT% > OpenApoc-%OPENAPOC_VERSION%\git-commit
- echo %OPENAPOC_VERSION% > OpenApoc-%OPENAPOC_VERSION%\build-id
- copy bin\*.dll OpenApoc-%OPENAPOC_VERSION%\
- copy bin\openapoc.exe OpenApoc-%OPENAPOC_VERSION%\
- copy bin\openapoc_launcher.exe OpenApoc-%OPENAPOC_VERSION%\
- start %QTPATH%\bin\windeployqt --no-angle --no-opengl-sw --no-compiler-runtime OpenApoc-%OPENAPOC_VERSION%\OpenApoc_Launcher.exe
- del data\cd.iso
- xcopy /E data OpenApoc-%OPENAPOC_VERSION%\data\
- copy portable.txt OpenApoc-%OPENAPOC_VERSION%\
- copy README.md OpenApoc-%OPENAPOC_VERSION%\README.txt
- copy README_HOTKEYS.txt OpenApoc-%OPENAPOC_VERSION%\
- 7z a %OPENAPOC_FILENAME% OpenApoc-%OPENAPOC_VERSION% -mx=9 -myx=7
- copy bin\OpenApoc.pdb OpenApoc-%OPENAPOC_VERSION%\
- 7z a %OPENAPOC_DEBUG_FILENAME% OpenApoc-%OPENAPOC_VERSION%\*.pdb -mx=9 -myx=7
- appveyor PushArtifact %OPENAPOC_FILENAME%
- appveyor PushArtifact %OPENAPOC_DEBUG_FILENAME%
before_test:
- 7z e temp\cd.iso.xz -odata\
test_script:
- ctest -T Test -V --no-compress-output -C %CONFIGURATION%
after_test:
- ps: |
$testFile = ".\Testing\$(Get-Content Testing\TAG -TotalCount 1)\Test.xml"
$XSLInputElement = New-Object System.Xml.Xsl.XslCompiledTransform
$XSLInputElement.Load((Resolve-Path .\tests\ctest-to-junit.xsl))
$XSLInputElement.Transform((Resolve-Path $testFile), (Join-Path (Resolve-Path .) "ctest-to-junit-results.xml"))
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\ctest-to-junit-results.xml))