Skip to content

Commit

Permalink
CI: enable windows on github-hosted runner
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyedel committed Oct 23, 2022
1 parent 65fffb4 commit 0493f19
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: windows

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
strategy:
matrix:
os: [ windows-2019 ] #, windows-2022]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cachedeps
with:
path: |
C:\dspdf
key: ${{matrix.os}}-dependencies
- name: Download dependency rar archive
if: steps.cachedeps.outputs.cache-hit != 'true'
run: >
(New-Object net.webclient).DownloadFile(
'https://github.com/projekter/dspdfviewer/releases/download/v1.14-42-g4acfb31/DependenciesDyn.rar',
'C:\dependencies.rar'
)
7z x dependencies.rar
working-directory: C:\
- run: mkdir C:\local
- uses: actions/cache@v3
id: cacheboost
with:
path: |
C:\local\boost_1_78_0
key: ${{matrix.os}}-boost
- name: Download boost
if: steps.cacheboost.outputs.cache-hit != 'true'
run: >
(New-Object net.webclient).DownloadFile(
'https://sourceforge.net/projects/boost/files/boost-binaries/1.78.0/boost_1_78_0-msvc-14.2-32.exe/download',
'C:\boost-installer.exe')
- name: install boost
run: |
C:\boost-installer.exe /SP- /VERYSILENT
Start-Sleep -Seconds 5
Get-Process boost* | Wait-Process
if: steps.cacheboost.outputs.cache-hit != 'true'
- uses: jurplel/install-qt-action@v3
with:
arch: win32_msvc2019
version: 5.15.2
cache: true
- run: mkdir build
- name: cmake
working-directory: ./build
run: >
cmake .. -G "Visual Studio 16 2019" -T v142 -A Win32
-DUsePrerenderedPDF=ON
-DBoostStaticLink=ON
-DWindowsStaticLink=OFF
-DRunDualScreenTests=OFF
-DBOOST_ROOT=C:\local\boost_1_78_0
-DBOOST_LIBRARYDIR=C:\local\boost_1_78_0\lib32-msvc-14.2\
- run: cmake --build .
working-directory: ./build
- name: ctest
working-directory: ./build
run: |
$env:Path += ";C:\dspdf\popplerDyn\deps\cairo\bin"
$env:Path += ";C:\dspdf\popplerDyn\deps\expat\bin"
$env:Path += ";C:\dspdf\popplerDyn\deps\fontconfig\lib"
$env:Path += ";C:\dspdf\popplerDyn\deps\freetype\bin"
$env:Path += ";C:\dspdf\popplerDyn\deps\lcms\lib\MS"
$env:Path += ";C:\dspdf\popplerDyn\deps\libiconv\lib"
$env:Path += ";C:\dspdf\popplerDyn\deps\libjpeg-turbo\bin"
$env:Path += ";C:\dspdf\popplerDyn\deps\libpng\bin"
$env:Path += ";C:\dspdf\popplerDyn\deps\libtiff\bin"
$env:Path += ";C:\dspdf\popplerDyn\deps\openjpeg\bin"
$env:Path += ";C:\dspdf\popplerDyn\deps\zlib\bin"
$env:Path += ";C:\dspdf\popplerDyn\poppler\bin"
$env:CTEST_OUTPUT_ON_FAILURE = "1"
ctest -C Debug

0 comments on commit 0493f19

Please sign in to comment.