-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.13 KB
/
Copy pathcmake-multi-platform.yml
File metadata and controls
48 lines (39 loc) · 1.13 KB
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
name: CMake Multi-Platform
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
build_type: [Debug, Release]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '4.1.1'
# Linux Dependencies
- name: Install Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libopencv-dev libeigen3-dev libopenexr-dev
# Configure
- name: Configure with CMake
run: |
cmake -B build -S $GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DOpenCV_DIR=/usr/lib/x86_64-linux-gnu/cmake/opencv4
# Build
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} --parallel
# Install
- name: Install
run: cmake --install build --prefix instdir