forked from google/libultrahdr
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (67 loc) · 2.89 KB
/
cmake_mac.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
name: Build and Test CI - macOS
# Build and Test CI for macOS-latest
on: [ push, pull_request ]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
config:
# <macOS-latest ARM64 Platform, Release Build, Clang toolchain, Ninja generator>
- name: "macOS latest ARM64 clang rel ninja"
os: macos-latest
build_type: Release
cc: clang
cxx: clang++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_ENABLE_INSTALL=1 -DUHDR_ENABLE_WERROR=1'
# <macOS-13 Platform, Release Build, Clang toolchain, Ninja generator>
- name: "macOS-13 clang rel ninja"
os: macos-13
build_type: Release
cc: clang
cxx: clang++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_ENABLE_INSTALL=1 -DUHDR_ENABLE_WERROR=1'
# <macOS-latest ARM64 Platform, Release Build, Clang toolchain, Ninja generator, Build Deps>
- name: "macOS latest ARM64 clang rel ninja with deps"
os: macos-latest
build_type: Release
cc: clang
cxx: clang++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_BUILD_DEPS=1 -DUHDR_ENABLE_WERROR=1'
# <macOS-latest ARM64 Platform, Release Build, Clang toolchain, Ninja generator, Static linking>
- name: "macOS latest ARM64 clang rel ninja static"
os: macos-latest
build_type: Release
cc: clang
cxx: clang++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_ENABLE_INSTALL=1 -DBUILD_SHARED_LIBS=0 -DUHDR_ENABLE_WERROR=1'
# <macOS-13 Platform, Release Build, Clang toolchain, Ninja generator, Static linking>
- name: "macOS-13 clang rel ninja static"
os: macos-13
build_type: Release
cc: clang
cxx: clang++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_ENABLE_INSTALL=1 -DBUILD_SHARED_LIBS=0 -DUHDR_ENABLE_WERROR=1'
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
- name: Install dependencies on macOS
run: brew install pkg-config jpeg-turbo
- name: Configure CMake
shell: bash
run: |
export CC=${{ matrix.config.cc }}
export CXX=${{ matrix.config.cxx }}
mkdir build
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} ${{ matrix.config.cmake-opts }}
- name: Build
run: cmake --build build --config ${{ matrix.config.build_type }}
- name: Test
working-directory: build
run: ctest --build-config ${{ matrix.config.build_type }}