-
Notifications
You must be signed in to change notification settings - Fork 19
120 lines (110 loc) · 3.27 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build and Test
on:
pull_request:
push:
jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
include:
- name: ubuntu
os: ubuntu-latest
cmake_config_args: >-
-DCMAKE_BUILD_TYPE=Debug
-DBMX_BUILD_WITH_LIBCURL=ON
- name: ubuntu-valgrind
os: ubuntu-latest
apt_installs: >-
valgrind
cmake_config_args: >-
-DCMAKE_BUILD_TYPE=Debug
-DBMX_BUILD_WITH_LIBCURL=ON
-DBMX_TEST_WITH_VALGRIND=ON
-DLIBMXF_TEST_WITH_VALGRIND=ON
-DLIBMXFPP_TEST_WITH_VALGRIND=ON
- name: macos-brew
os: macos-latest
cmake_config_args: >-
-DCMAKE_BUILD_TYPE=Debug
-DBMX_BUILD_WITH_LIBCURL=ON
- name: macos-xcode-universal
os: macos-latest
cmake_config_args: >-
-G Xcode
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
-DBUILD_SHARED_LIBS=OFF
-DBMX_BUILD_URIPARSER_SOURCE=ON
-DBMX_BUILD_WITH_LIBCURL=ON
cmake_build_args: >-
--config Debug
cmake_test_args: >-
-C Debug
- name: windows
os: windows-latest
cmake_build_args: >-
--config Debug
cmake_test_args: >-
-C Debug
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies (ubuntu)
if: ${{ contains(matrix.os, 'ubuntu') }}
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install \
${{ matrix.apt_installs }} \
git \
pkg-config \
g++ \
gcc \
cmake \
uuid-dev \
liburiparser-dev \
libexpat1-dev \
libcurl4-openssl-dev
- name: Install dependencies (macos-brew)
if: ${{ matrix.name == 'macos-brew' }}
shell: bash
run: |
brew install git cmake expat uriparser curl
- name: Install dependencies (macos-xcode-universal)
if: ${{ matrix.name == 'macos-xcode-universal' }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Show Versions
shell: bash
run: |
git --version
cmake --version
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure
shell: bash
run: |
mkdir -p out/build
cmake \
-B out/build \
${{ matrix.cmake_config_args }} \
-DCMAKE_INSTALL_PREFIX:PATH=out/install \
-DLIBMXF_BUILD_EXAMPLES=ON \
-DLIBMXF_BUILD_TOOLS=ON \
-DLIBMXFPP_BUILD_EXAMPLES=ON \
-DLIBMXFPP_BUILD_TOOLS=ON \
.
- name: Build
shell: bash
run: |
cmake --build out/build ${{ matrix.cmake_build_args }}
- name: Test
shell: bash
run: |
cd out/build
ctest --output-on-failure ${{ matrix.cmake_test_args }}
- name: Install
shell: bash
run: |
cmake --build out/build --target install ${{ matrix.cmake_build_args }}