Repository navigation
46 lines (37 loc) · 1.44 KB
/
Copy pathcpp_lib.yml
File metadata and controls
46 lines (37 loc) · 1.44 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
name: "CppLib"
on:
workflow_dispatch:
pull_request:
push:
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
# The token reads only; a job that publishes asks for more
permissions:
contents: read
jobs:
build:
name: CppLib (${{ matrix.platform }}${{ matrix.fetch_opencv && ', OpenCV' || '' }})
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
fetch_opencv: [false, true]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: recursive
# - name: Setup interactive tmate session
# if: ${{ matrix.platform == 'ubuntu-latest' }}
# uses: mxschmitt/action-tmate@35b54afac29c97fb54faba5b513f8fbd1882f113 # v3.9
- name: apt install xorg-dev libglfw3-dev libsdl2-dev (ubuntu only)
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y xorg-dev libglfw3-dev libsdl2-dev
- name: Build and install
shell: bash
run: |
mkdir build
cd build
cmake .. -DHELLOIMGUI_USE_GLFW3=ON -DHELLOIMGUI_USE_SDL2=ON -DHELLOIMGUI_HAS_OPENGL3=ON -DCMAKE_BUILD_TYPE=Release -DHELLOIMGUI_DOWNLOAD_FREETYPE_IF_NEEDED=ON ${{ matrix.fetch_opencv && '-DIMMVISION_FETCH_OPENCV=ON -DIMGUI_BUNDLE_DEMOS_WITH_OPENCV=ON' || '' }}
cmake --build . --config Release -j 3