-
Notifications
You must be signed in to change notification settings - Fork 1
109 lines (94 loc) · 3.73 KB
/
windows.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
name: Windows Build
on: [push]
env:
CCACHE_DIR: ~/.ccache
QT_VERSION: '5.14.2'
CACHE_VERSION: 1
GEODIFF_VERSION: 1.0.6
INPUT_VERSION: 'master'
concurrency:
group: ci-${{github.ref}}-windows
cancel-in-progress: true
jobs:
windows_build:
if: ( github.repository == 'MerginMaps/mergin-cpp-client' )
runs-on: windows-latest
steps:
- name: install deps
run: |
C:/vcpkg/vcpkg install sqlite3[rtree,fts3,json1] --triplet x64-windows-static
C:/vcpkg/vcpkg integrate install
dir "C:/vcpkg/packages/sqlite3_x64-windows-static/include"
dir "C:/vcpkg/packages/sqlite3_x64-windows-static/lib/"
- name: Checkout mergin-cpp-client
uses: actions/checkout@v2
with:
path: mergin-cpp-client
- name: Checkout input
uses: actions/checkout@v2
with:
ref: ${{ env.INPUT_VERSION }}
repository: MerginMaps/input
path: input
- name: Checkout geodiff
uses: actions/checkout@v2
with:
ref: ${{ env.GEODIFF_VERSION }}
repository: MerginMaps/geodiff
path: geodiff
- name: Cache Qt
id: cache-qt
uses: pat-s/[email protected]
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-QtCache-v1-${{ env.QT_VERSION }}-${{ env.CACHE_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: ${{ env.QT_VERSION }}
dir: ${{ github.workspace }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Setup cmake
uses: jwlawson/[email protected]
- 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 }
}
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cd $env:GITHUB_WORKSPACE
mkdir build-geodiff
cd build-geodiff
exec { cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DSQLite3_INCLUDE_DIR=C:/vcpkg/packages/sqlite3_x64-windows-static/include -DSQLite3_LIBRARY=C:/vcpkg/packages/sqlite3_x64-windows-static/lib/sqlite3.lib -DENABLE_TESTS=ON -DWITH_POSTGRESQL=FALSE -DBUILD_STATIC=ON -DBUILD_SHARED=OFF ../geodiff/geodiff }
exec { cmake --build . --config Release }
- name: build mergin-cpp-client
shell: cmd
run: |
copy mergin-cpp-client\scripts\ci\config.pri mergin-cpp-client\src\config.pri
mkdir build-mergin-cpp-client
cd build-mergin-cpp-client
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
qmake ..\mergin-cpp-client\src\client.pro CONFIG+=release CONFIG+=static
nmake release
- name: create release folder
shell: cmd
run: |
mkdir rel
cd rel
copy ..\build-mergin-cpp-client\release\mergin.exe mergin.exe
copy "C:\Program Files\OpenSSL\bin\libcrypto-1_1-x64.dll" libcrypto-1_1-x64.dll
copy "C:\Program Files\OpenSSL\bin\libssl-1_1-x64.dll" libssl-1_1-x64.dll
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
windeployqt --release mergin.exe
dir
- name: archive release mergin
uses: actions/upload-artifact@v2
with:
name: mergin-cpp-client
path: |
rel