forked from openslide/openslide
-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (48 loc) · 1.98 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
name: Windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.cfg.os }}
name: ${{ matrix.cfg.os }}@${{ matrix.cfg.cxx }}-${{ matrix.cfg.cpp-version }}
strategy:
matrix:
cfg:
- {os: windows-latest, cc: cl, cxx: MSVC, cpp-version: 19.28.29333.0, generator: Ninja}
- {os: windows-latest, cc: cl, cxx: MSVC, cpp-version: 19.28.29333.0, generator: MinGW Makefiles}
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Setup vcpkg and install dependencies
run: |
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg integrate install
./vcpkg/vcpkg install tiff:x64-windows
./vcpkg/vcpkg install glib:x64-windows
./vcpkg/vcpkg install cairo:x64-windows
./vcpkg/vcpkg install gdk-pixbuf:x64-windows
./vcpkg/vcpkg install openjpeg:x64-windows
./vcpkg/vcpkg install sqlite3:x64-windows
./vcpkg/vcpkg install libxml2:x64-windows
./vcpkg/vcpkg install zlib:x64-windows
./vcpkg/vcpkg install libpng:x64-windows
- name: Build with CMake and vcpkg
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-G\"${{ matrix.cfg.generator }}\" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TEST:BOOL=OFF -DPYTHON_Openslide:BOOL=OFF -DBUILD_JAVA:BOOL=OFF -DBUILD_JS:BOOL=OFF -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--config Release --target install'