-
Notifications
You must be signed in to change notification settings - Fork 8
77 lines (65 loc) · 3.12 KB
/
build-and-test.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
name: build-and-test
on: [push]
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Add ./install to $PATH
shell: bash
# Within the Windows environment the GITHUB_WORKSPACE variable uses a \ as a separator. MinGW cmake cannot handle this.
# ${GITHUB_WORKSPACE//'\'/'/'} replaces \ with / using the bash shell.
run: |
echo "${GITHUB_WORKSPACE//'\'/'/'}/install" >> $GITHUB_PATH
echo "${GITHUB_WORKSPACE//'\'/'/'}/install/bin" >> $GITHUB_PATH
# Clones to ${{ github.workspace }}.
- name: Clone PicoTree
uses: actions/checkout@v3
- name: Clone Google Test
uses: actions/checkout@v3
with:
repository: google/googletest
ref: release-1.12.1
path: googletest
- name: Clone Eigen
shell: bash
run: |
git clone https://gitlab.com/libeigen/eigen.git --branch 3.3.9 --depth 1 || exit 1
cd eigen && git switch -c 3.3.9
- name: Clone OpenCV
uses: actions/checkout@v3
with:
repository: opencv/opencv
ref: 4.6.0
path: opencv
- name: CMake Google Test
uses: Jaybro/action-cmake@v1
with:
cmake-source-dir: googletest
cmake-build-dir: googletest/build
# GTest is build statically but the CMake + Visual Studio combination wants to link against it as being dynamic.
# https://github.com/google/googletest/tree/release-1.8.1/googletest#visual-studio-dynamic-vs-static-runtimes
cmake-configure-flags: -Dgtest_force_shared_crt=ON
cmake-install: true
- name: CMake Eigen
uses: Jaybro/action-cmake@v1
with:
cmake-source-dir: eigen
cmake-build-dir: eigen/build
cmake-install: true
- name: CMake OpenCV
uses: Jaybro/action-cmake@v1
with:
cmake-source-dir: opencv
cmake-build-dir: opencv/build
# The output directories for binaries and libraries may vary in Windows depending on architecture and VS version. OpenCV
# allows setting the OPENCV_BIN_INSTALL_PATH and OPENCV_LIB_INSTALL_PATH cmake variables to change these (for Windows
# only). The directories are relative to the CMAKE_INSTALL_PREFIX variable.
cmake-configure-flags: -DBUILD_LIST=core -DOPENCV_BIN_INSTALL_PATH="bin" -DOPENCV_LIB_INSTALL_PATH="lib" -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JAVA=OFF -DBUILD_JPEG=OFF -DBUILD_ZLIB=OFF -DBUILD_OPENJPEG=OFF -DVIDEOIO_ENABLE_PLUGINS=OFF -DWITH_OPENJPEG=OFF -DWITH_LAPACK=OFF -DWITH_CUDA=OFF -DWITH_OPENMP=OFF -DWITH_DIRECTX=OFF -DWITH_OPENGL=OFF -DCV_DISABLE_OPTIMIZATION=ON -DCV_ENABLE_INTRINSICS=OFF -DCV_TRACE=OFF -DCPU_BASELINE="" -DOPENCV_DNN_CUDA=OFF -DWITH_OPENCL=OFF -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENCLAMDFFT=OFF -DWITH_OPENCL_D3D11_NV=OFF -DWITH_OPENCL_SVM=OFF
cmake-install: true
- name: CMake PicoTree
uses: Jaybro/action-cmake@v1
with:
cmake-ctest: true