Merge pull request #64 from bbc/philipn-mxfdump-generic-streams #255
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |