-
Notifications
You must be signed in to change notification settings - Fork 17
55 lines (49 loc) · 1.88 KB
/
win_tests.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
name: Windows Tests
on: [push]
concurrency:
group: ci-${{github.ref}}-win-tests
cancel-in-progress: true
jobs:
build_win_test:
if: github.repository == 'MerginMaps/geodiff'
runs-on: windows-latest
steps:
- name: Checkout Geodiff
uses: actions/checkout@v3
- name: install deps
run: |
C:/vcpkg/vcpkg install sqlite3[rtree,fts3,json1] --triplet x64-windows
C:/vcpkg/vcpkg integrate install
dir "C:/vcpkg/installed/x64-windows/bin"
- name: set compiler environment
shell: cmd
run: |
CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86
- name: build geodiff
shell: pwsh
run: |
$ErrorActionPreference = 'continue'
function exec
{
param ( [ScriptBlock] $ScriptBlock )
& $ScriptBlock 2>&1 | ForEach-Object -Process { "$_" }
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
cd $env:GITHUB_WORKSPACE
mkdir build
cd build
exec { cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_TESTS=ON -DWITH_POSTGRESQL=FALSE ../geodiff }
exec { cmake --build . --config Debug }
- name: Run tests
shell: pwsh
run: |
$ErrorActionPreference = 'continue'
function exec
{
param ( [ScriptBlock] $ScriptBlock )
& $ScriptBlock 2>&1 | ForEach-Object -Process { "$_" }
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
$env:PATH="C:\vcpkg\installed\x64-windows\bin;$env:GITHUB_WORKSPACE\build\tool\Debug\;$env:GITHUB_WORKSPACE\build\geodiff\Debug;$env:PATH"
cd $env:GITHUB_WORKSPACE\build
exec { ctest -VV -C Debug }