-
Notifications
You must be signed in to change notification settings - Fork 32
108 lines (90 loc) · 4.06 KB
/
msbuild.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: MSBuild
on: [push, pull_request]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
jobs:
build:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
build_conf: [Release, Debug]
steps:
- uses: actions/checkout@v2
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Set environment variables
shell: cmd
run: |
echo WXWIN=%GITHUB_WORKSPACE%\wxWidgets>> %GITHUB_ENV%
echo PGDIR=%GITHUB_WORKSPACE%\postgres-binaries\pgsql>> %GITHUB_ENV%
echo LIBSSH2DIR=%GITHUB_WORKSPACE%\libssh2-dll>> %GITHUB_ENV%
- name: Install sphinx
if: ${{ matrix.build_conf == 'Release' }}
shell: cmd
run: pip install Sphinx
- name: Download and unpack libssh2 source
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://github.com/libssh2/libssh2/archive/refs/tags/libssh2-1.10.0.zip" -OutFile libssh2.zip
7z.exe x libssh2.zip -o${{env.LIBSSH2DIR}}\..
- name: Download and unpack wxWidgets headers
if: ${{ matrix.build_conf != 'Release' }}
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5-headers.7z" -OutFile wxWidgets-headers.7z
7z.exe x wxWidgets-headers.7z -o${{env.WXWIN}}
- name: Download and unpack wxWidgets source
if: ${{ matrix.build_conf == 'Release' }}
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.7z" -OutFile wxWidgets-source.7z
7z.exe x wxWidgets-source.7z -o${{env.WXWIN}}
- name: Download and unpack wxWidgets developer files
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxMSW-3.0.5_vc142_Dev.7z" -OutFile wxWidgets-devel.7z
7z.exe x wxWidgets-devel.7z -o${{env.WXWIN}}
- name: Download and unpack wxWidgets release libraries
if: ${{ matrix.build_conf == 'Release' }}
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxMSW-3.0.5_vc142_ReleaseDLL.7z" -OutFile wxWidgets-libraries.7z
7z.exe x wxWidgets-libraries.7z -o${{env.WXWIN}}
- name: Download and unpack PostgreSQL
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://get.enterprisedb.com/postgresql/postgresql-10.19-1-windows-binaries.zip?ls=Crossover&type=Crossover" -OutFile postgres-binaries.zip
7z.exe x postgres-binaries.zip -o${{env.PGDIR}}\..
- name: Set up Visual Studio shell
if: ${{ matrix.build_conf == 'Release' }}
uses: egor-tensin/vs-shell@v2
with:
arch: x86
- name: Build libssh2
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
run: |
md libssh2-build && cd libssh2-build
cmake -DCRYPTO_BACKEND=WinCNG -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=%LIBSSH2DIR% -DCMAKE_BUILD_TYPE=Release -A Win32 ..\libssh2-libssh2-1.10.0
cmake --build . --target install
- name: Build hhp2cached
if: ${{ matrix.build_conf == 'Release' }}
working-directory: ${{env.WXWIN}}\utils\hhp2cached
shell: cmd
run: |
echo SHARED = 1 >> ..\..\build\msw\config.vc
echo BUILD = release>> ..\..\build\msw\config.vc
nmake -f makefile.vc COMPILER_VERSION=142
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{matrix.build_conf}} ${{env.SOLUTION_FILE_PATH}}