forked from google/libultrahdr
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (81 loc) · 3.7 KB
/
cmake_linux.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
name: Build and Test CI - Linux
# Build and Test CI for ubuntu-latest
on: [ push, pull_request ]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
config:
# <Ubuntu-latest Platform, Release Build, GCC toolchain, Ninja generator>
- name: "ubuntu latest gcc rel ninja"
os: ubuntu-latest
build_type: Release
cc: gcc
cxx: g++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_ENABLE_INSTALL=1 -DUHDR_ENABLE_WERROR=1'
# <Ubuntu-latest Platform, Release Build, Clang toolchain, Ninja generator>
- name: "ubuntu latest clang rel ninja"
os: ubuntu-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'
# <Ubuntu-latest Platform, Release Build, GCC toolchain, Ninja generator, Build Deps>
- name: "ubuntu latest gcc rel ninja with deps"
os: ubuntu-latest
build_type: Release
cc: gcc
cxx: g++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_BUILD_DEPS=1 -DUHDR_ENABLE_WERROR=1'
# <Ubuntu-latest Platform, Release Build, Clang toolchain, Ninja generator, Build Deps, Sanitizer Address>
- name: "ubuntu latest clang rel ninja with deps sanitize address"
os: ubuntu-latest
build_type: Release
cc: clang
cxx: clang++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_BUILD_DEPS=1 -DUHDR_SANITIZE_OPTIONS=address -DUHDR_ENABLE_WERROR=1'
# <Ubuntu-latest Platform, Release Build, Clang toolchain, Ninja generator, Build Fuzzers, Sanitizer Address>
- name: "ubuntu latest clang rel ninja fuzzers sanitize address"
os: ubuntu-latest
build_type: Release
cc: clang
cxx: clang++
cmake-opts: '-DUHDR_BUILD_FUZZERS=1 -DUHDR_SANITIZE_OPTIONS=address -DUHDR_ENABLE_WERROR=1'
# <Ubuntu-latest Platform, Release Build, GCC toolchain, Ninja generator, Static linking>
- name: "ubuntu latest gcc rel ninja static"
os: ubuntu-latest
build_type: Release
cc: gcc
cxx: g++
cmake-opts: '-DUHDR_BUILD_TESTS=1 -DUHDR_ENABLE_LOGS=1 -DUHDR_ENABLE_INSTALL=1 -DBUILD_SHARED_LIBS=0 -DUHDR_ENABLE_WERROR=1'
# <Ubuntu-latest Platform, Release Build, Clang toolchain, Ninja generator, Static linking>
- name: "ubuntu latest clang rel ninja static"
os: ubuntu-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'
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 Ubuntu
run: sudo apt install -y libjpeg-dev
- 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 }}