Skip to content

Parallel parsing, fix logging and deprecation warnings #3910

Parallel parsing, fix logging and deprecation warnings

Parallel parsing, fix logging and deprecation warnings #3910

Workflow file for this run

name: Native build with conan on MacOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
merge_group:
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
# The CMake configure and build commands are platform-agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
strategy:
fail-fast: false
matrix:
build-type: [Release]
runs-on: macos-12
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install ICU dependency for python (only needed for E2E test)
run: |
df -h
brew install pkg-config icu4c
echo PATH="/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH" >> $GITHUB_ENV
echo PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig" >> $GITHUB_ENV
- name: Install python dependencies for E2E tests
run: |
pip3 install pyaml pyicu
- name: Install dependencies
run: |
brew install llvm@16
brew install conan@2
echo 'export PATH="/usr/local/opt/llvm@16/bin:$PATH"' >> ~/.bash_profile
echo PATH="/usr/local/opt/llvm@16/bin:$PATH" >> $GITHUB_ENV
echo 'export LDFLAGS="-L/usr/local/opt/llvm@16/lib -L/usr/local/opt/llvm@16/lib/c++ -Wl,-rpath,/usr/local/opt/llvm@16/lib/c++"' >> ~/.bash_profile
echo LDFLAGS="-L/usr/local/opt/llvm@16/lib -L/usr/local/opt/llvm@16/lib/c++ -Wl,-rpath,/usr/local/opt/llvm@16/lib/c++" >> $GITHUB_ENV
echo 'export CPPFLAGS="-I/usr/local/opt/llvm@16/include"' >> ~/.bash_profile
echo CPPFLAGS="/usr/local/opt/llvm@16/include" >> $GITHUB_ENV
source ~/.bash_profile
- name: Print clang version
run: clang++ --version
- name: Cache for conan
uses: actions/cache@v3
env:
cache-name: cache-conan-modules
with:
path: ~/.conan2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.txt') }}
- name: Create build directory
run: mkdir ${{github.workspace}}/build
- name: Install and run conan
working-directory: ${{github.workspace}}/build
run: >
conan install .. -pr:b=../conanprofiles/clang-16-macos -pr:h=../conanprofiles/clang-16-macos -of=. --build=missing;
- name: Configure CMake
# For std::ranges::join_view we need the -fexperimental-library flag on libc++16, which on Mac requires to manually tinker with the linking flags.
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.build-type}} -DCMAKE_TOOLCHAIN_FILE="$(pwd)/build/conan_toolchain.cmake" -DUSE_PARALLEL=true -DRUN_EXPENSIVE_TESTS=false -DENABLE_EXPENSIVE_CHECKS=true -DCMAKE_CXX_COMPILER=clang++ -DADDITIONAL_COMPILER_FLAGS="-fexperimental-library" -D_NO_TIMING_TESTS=ON -DADDITIONAL_LINKER_FLAGS="-L$(brew --prefix llvm)/lib/c++"
- name: Build
# Build your program with the given configuration
# Sourcing the conanrun.sh even for building is required to make gtest_discover_tests pass reliably.
run: >
df -h;
source ${{github.workspace}}/build/conanrun.sh;
cmake --build ${{github.workspace}}/build --config ${{matrix.build-type}} -- -j 1;
- name: Test
working-directory: ${{github.workspace}}/build/test
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: >
df -h;
source ../conanrun.sh;
env CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{matrix.build-type}} .;
- name: Running and printing the benchmark examples.
working-directory: ${{github.workspace}}/build
run: >
source ./conanrun.sh;
benchmark/BenchmarkExamples -p;
- name: E2E
run: >
source ${{github.workspace}}/build/conanrun.sh;
${{github.workspace}}/e2e/e2e.sh;