Skip to content

Commit cd599a0

Browse files
committed
CI: enable windows on github-hosted runner
1 parent 65fffb4 commit cd599a0

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/windows.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: windows
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
os: [ windows-2019 ] #, windows-2022]
14+
runs-on: ${{matrix.os}}
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/cache@v3
18+
id: cachedeps
19+
with:
20+
path: |
21+
C:\dspdf
22+
key: ${{matrix.os}}-dependencies
23+
- name: Download dependency rar archive
24+
if: steps.cachedeps.outputs.cache-hit != 'true'
25+
run: >
26+
(New-Object net.webclient).DownloadFile(
27+
'https://github.com/projekter/dspdfviewer/releases/download/v1.14-42-g4acfb31/DependenciesDyn.rar',
28+
'C:\dependencies.rar'
29+
)
30+
31+
7z x dependencies.rar
32+
working-directory: C:\
33+
- run: mkdir C:\local
34+
- uses: actions/cache@v3
35+
id: cacheboost
36+
with:
37+
path: |
38+
C:\local\boost_1_78_0
39+
key: ${{matrix.os}}-boost
40+
- name: Download boost
41+
if: steps.cacheboost.outputs.cache-hit != 'true'
42+
run: >
43+
(New-Object net.webclient).DownloadFile(
44+
'https://sourceforge.net/projects/boost/files/boost-binaries/1.78.0/boost_1_78_0-msvc-14.2-32.exe/download',
45+
'C:\boost-installer.exe')
46+
- name: install boost
47+
run: |
48+
C:\boost-installer.exe /SP- /VERYSILENT
49+
Start-Sleep -Seconds 5
50+
Get-Process boost* | Wait-Process
51+
if: steps.cacheboost.outputs.cache-hit != 'true'
52+
- uses: jurplel/install-qt-action@v3
53+
with:
54+
arch: win32_msvc2019
55+
version: 5.15.2
56+
cache: true
57+
- run: mkdir build
58+
- name: cmake
59+
working-directory: ./build
60+
run: >
61+
cmake .. -G "Visual Studio 16 2019" -T v142 -A Win32
62+
-DUsePrerenderedPDF=ON
63+
-DBoostStaticLink=ON
64+
-DWindowsStaticLink=OFF
65+
-DRunDualScreenTests=OFF
66+
-DBOOST_ROOT=C:\local\boost_1_78_0
67+
-DBOOST_LIBRARYDIR=C:\local\boost_1_78_0\lib32-msvc-14.2\
68+
- run: cmake --build .
69+
working-directory: ./build
70+
- run: ctest -C Debug
71+
working-directory: ./build

0 commit comments

Comments
 (0)