Skip to content

Build checking

Build checking #257

Workflow file for this run

name: Build checking
on:
# workflow_dispatch - manual start build from action menu
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- '.github/workflows/clean_workflow.yml'
- '.github/workflows/codeql-analysis.yml'
- '.github/workflows/docker_build.yml'
- '.github/workflows/prebuild.yml'
- '.github/workflows/release.yml'
- 'ci/**'
- 'docs/**'
- '.clang-format'
- '.gitignore'
- 'CHANGELOG.md'
- 'CMakePresets.json'
- 'CONTRIBUTORS'
- 'LICENSE'
- 'README.md'
pull_request:
branches:
- master
env:
BUILD_TYPE: Release
X_VCPKG_NUGET_ID_PREFIX: 'colorer'
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
jobs:
macos-clang:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
arch: [ x64 ]
icu: [ON, OFF]
zip: [ON, OFF]
libxml: [ON, OFF]
name: macos-${{ matrix.arch }}-icu_${{ matrix.icu }}-zip_${{ matrix.zip }}-libxml_${{ matrix.libxml }}
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install dependency
# icu4c is already installed
run: brew install xerces-c spdlog minizip ninja libxml2 icu4c
- name: Relink icu, because he is 'keg-only'
run: brew link icu4c --force
- name: Create Build folder
run: mkdir -p _build
- name: Configure CMake
run: >
cmake -S . -B _build
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCOLORER_BUILD_TEST=ON
-DCOLORER_USE_VCPKG=OFF
-DCOLORER_BUILD_ARCH=${{ matrix.arch }}
-DCOLORER_USE_ICU_STRINGS=${{ matrix.icu }}
-DCOLORER_USE_ZIPINPUTSOURCE=${{ matrix.zip }}
-DCOLORER_USE_LIBXML=${{ matrix.libxml }}
- name: Build
run: cmake --build _build --config $BUILD_TYPE -j$(getconf _NPROCESSORS_ONLN) --verbose
- name: Test
run: ./_build/tests/unit/unit_tests