fix ambiguity between libraries fmt and stl with function 'format_to' in roofer_app #201
Workflow file for this run
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
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
name: Build and Test (vcpkg) | |
on: | |
pull_request: | |
branches: [ "develop"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
fail-fast: false | |
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. | |
# See: https://github.com/actions/runner-images?tab=readme-ov-file#available-images | |
matrix: | |
os: [ ubuntu-22.04, ubuntu-24.04, windows-2022, macos-14 ] | |
build_type: [ Release ] | |
c_compiler: [ gcc, clang, cl ] | |
# Default compilers: | |
# - Ubuntu 22.04 (jammy): gcc-11, clang-14 | |
# - Ubuntu 24.04 (noble): gcc-13, clang-18 | |
# - macOS 14: clang-15 | |
include: | |
- os: ubuntu-22.04 | |
c_compiler: gcc | |
cpp_compiler: g++ | |
- os: ubuntu-22.04 | |
c_compiler: clang | |
cpp_compiler: clang++ | |
- os: ubuntu-24.04 | |
c_compiler: gcc | |
cpp_compiler: g++ | |
- os: ubuntu-24.04 | |
c_compiler: clang | |
cpp_compiler: clang++ | |
- os: windows-2022 | |
c_compiler: cl | |
cpp_compiler: cl | |
- os: macos-14 | |
c_compiler: clang | |
cpp_compiler: clang++ | |
exclude: | |
- os: ubuntu-22.04 | |
c_compiler: cl | |
- os: ubuntu-24.04 | |
c_compiler: cl | |
- os: windows-2022 | |
c_compiler: gcc | |
- os: windows-2022 | |
c_compiler: clang | |
- os: macos-14 | |
c_compiler: cl | |
- os: macos-14 | |
c_compiler: gcc | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
steps: | |
- uses: actions/checkout@v4 | |
# Need python for running the tests on the installed exes | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Install python dependencies | |
run: pip install -r "${{ github.workspace }}/requirements.txt" | |
- name: Set reusable strings | |
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | |
shell: bash | |
run: | | |
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV | |
echo "pybind11_ROOT=$(python -m pybind11 --cmakedir)" >> $GITHUB_ENV | |
- uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: "Install vcpkg" | |
shell: bash | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> "$GITHUB_ENV" | |
echo "${{ github.workspace }}/vcpkg" >> $GITHUB_PATH | |
cd vcpkg | |
git checkout 0104b799f55b33a4e1b97ecc3a975da664540b71 | |
- if: runner.os == 'Windows' | |
name: "Bootstrap vcpkg" | |
run: | | |
vcpkg/bootstrap-vcpkg.bat | |
- if: runner.os != 'Windows' | |
name: "Bootstrap vcpkg" | |
run: | | |
./vcpkg/bootstrap-vcpkg.sh | |
- if: runner.os == 'macOS' | |
name: "Install additional macOS build tools" | |
run: | | |
brew install autoconf autoconf-archive automake libtool | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: > | |
cmake -B build | |
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
--preset gh-${{ runner.os }} | |
-S ${{ github.workspace }} | |
- name: Show error logs | |
if: ${{ failure() }} | |
shell: bash | |
run: > | |
cat D:/a/roofer/roofer/vcpkg/buildtrees/gmp/build-x64-windows-dbg-out.log | |
cat D:/a/roofer/roofer/vcpkg/buildtrees/gmp/build-x64-windows-dbg-err.log | |
- name: Build | |
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
run: cmake --build build --config ${{ matrix.build_type }} --verbose --preset gh-${{ runner.os }} | |
- name: Test | |
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest --preset test-built --build-config ${{ matrix.build_type }} --test-dir build --output-on-failure | |
- name: Install | |
run: cmake --install build --config ${{ matrix.build_type }} --verbose | |
- name: Test installed | |
shell: bash | |
run: ctest --preset test-installed --build-config ${{ matrix.build_type }} --test-dir build --output-on-failure |