-
Notifications
You must be signed in to change notification settings - Fork 53
128 lines (107 loc) · 5.02 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: Windows
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-2019
steps:
- name: Install Visual Studio 2019
uses: microsoft/setup-msbuild@v1.0.2
- name: Download and extract OpenCV source
run: |
cd ..
Invoke-WebRequest -Uri https://github.com/opencv/opencv/archive/refs/tags/4.8.0.zip -OutFile opencv_4.8.0.zip
Expand-Archive -Path opencv_4.8.0.zip -DestinationPath .
- name: Configure and build OpenCV
run: |
cd ../opencv-4.8.0
mkdir build
cd build
cmake .. -DBUILD_TESTS:BOOL=OFF -DBUILD_PERF_TESTS:BOOL=OFF -DCMAKE_INSTALL_PREFIX="C:/Program Files/OpenCV"
cmake --build . --config Release --parallel
- name: Install OpenCV
run: |
cd ../opencv-4.8.0/build
cmake --install . --config Release
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '5.15.2'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
- name: Download and extract VTK source
run: |
cd ..
Invoke-WebRequest -Uri https://github.com/Kitware/VTK/archive/refs/tags/v9.2.0.zip -OutFile VTK-9.2.0.zip
Expand-Archive -Path VTK-9.2.0.zip -DestinationPath .
- name: Configure and build VTK with Qt
run: |
cd ../VTK-9.2.0
mkdir build
cd build
cmake .. -DVTK_GROUP_ENABLE_Qt=YES -DCMAKE_INSTALL_PREFIX="C:/Program Files/VTK"
cmake --build . --config Release --parallel
- name: Install VTK
run: |
cd ../VTK-9.2.0/build
cmake --install . --config Release
- name: Install vcpkg
run: |
cd C:/
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
- name: Install PCL with vcpkg
run: |
cd C:/vcpkg
.\vcpkg install pcl:x64-windows
- name: Download and extract PCL source
run: |
cd ..
Invoke-WebRequest -Uri https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.12.1.zip -OutFile pcl-pcl-1.12.1.zip
Expand-Archive -Path pcl-pcl-1.12.1.zip -DestinationPath .
- name: Configure and build PCL
run: |
cd ../pcl-pcl-1.12.1
mkdir build
cd build
cmake .. -DBUILD_visualization:BOOL=ON -DBUILD_TESTS:BOOL=OFF -DBUILD_PERFORMANCE_TESTS:BOOL=OFF -DCMAKE_INSTALL_PREFIX="C:/Program Files/PCL" -DWITH_OPENNI:BOOL=OF -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON -DVTK_DIR="C:\Program Files\VTK\lib\cmake\vtk-9.2" -DPCL_DIR="C:\Program Files\PCL\cmake" -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DBUILD_outofcore=OFF -DBUILD_tools=OFF
cmake --build . --config Release --parallel
- name: Install PCL
run: |
cd ../pcl-pcl-1.12.1/build
cmake --install . --config Release
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Ninja
uses: seanmiddleditch/gha-setup-ninja@v3
with:
version: 1.11.1 # Current latest version.
- name: Set up MSVC environment
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVTK_DIR="C:/Program Files/VTK/lib/cmake/vtk-9.2" -DPCL_DIR="C:/Program Files/PCL/cmake" -DOpenCV_DIR="C:/Program Files/OpenCV/x64/vc16/lib" -DFRAMELESSHELPER_ENABLE_SPECTRE=ON -DFRAMELESSHELPER_ENABLE_EHCONTGUARD=ON -DFRAMELESSHELPER_ENABLE_INTELCET=ON -DFRAMELESSHELPER_ENABLE_CFGUARD=ON -GNinja
- name: Build
# Build your program with the given configuration
run: |
cd build
cmake --build . --target all --config Release --parallel