Merge branch 'windows-extensions-fix' into 'master' #771
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 a single platform. There is a different starter workflow if you need cross-platform coverage. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml | |
name: CMake | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
BUILD_TYPE: Release | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
jobs: | |
latest-cpp: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure system | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install libboost-test-dev | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure | |
latest-cpp32: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure system | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install g++-multilib libboost-test-dev | |
wget https://downloads.sourceforge.net/project/boost/boost/1.84.0/boost_1_84_0.tar.gz --no-verbose | |
tar -xf boost_1_84_0.tar.gz | |
cd boost_1_84_0 | |
./bootstrap.sh | |
sudo ./b2 cxxflags=-m32 --with-serialization --with-test --with-timer install -j4 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-m32" | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure | |
latest-clangpp: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure system | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install clang libboost-test-dev | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=clang++ | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure | |
macos-cpp: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure system | |
run: | | |
brew install boost | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure | |
# macos-gpp: | |
# runs-on: macos-14 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Configure system | |
# run: | | |
# brew install boost gcc@13 | |
# - name: Configure CMake | |
# run: | | |
# g++-13 --version | |
# cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=g++-13 -DCMAKE_CXX_STANDARD=23 -DCMAKE_CXX_FLAGS="-Wl,-ld_classic" # https://developer.apple.com/forums/thread/737707?answerId=765203022#765203022 | |
# - name: Build | |
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose | |
# - name: Test | |
# working-directory: ${{github.workspace}}/build | |
# run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure | |
windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up CMake | |
uses: lukka/get-cmake@latest | |
- name: Set up MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- name: Install vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
.\vcpkg\bootstrap-vcpkg.bat | |
- name: Install Boost | |
run: .\vcpkg\vcpkg install boost-multi-array boost-test boost-timer boost-serialization | |
- name: Set up Boost environment variables | |
run: | | |
echo "BOOST_ROOT=$(Get-Location)\vcpkg\installed\x64-windows" >> $env:GITHUB_ENV | |
echo "BOOST_INCLUDEDIR=$(Get-Location)\vcpkg\installed\x64-windows\include" >> $env:GITHUB_ENV | |
echo "BOOST_LIBRARYDIR=$(Get-Location)\vcpkg\installed\x64-windows\lib" >> $env:GITHUB_ENV | |
echo "PATH=$(Get-Location)\vcpkg\installed\x64-windows\bin;$env:PATH" >> $env:GITHUB_ENV | |
- name: Configure CMake | |
run: cmake -S . -B build -A x64 -DCMAKE_TOOLCHAIN_FILE=.\vcpkg\scripts\buildsystems\vcpkg.cmake -DBOOST_ROOT=.\vcpkg\installed\x64-windows | |
- name: Build | |
run: cmake --build build --config Release | |
- name: Run tests | |
run: ctest --test-dir build --timeout 120 --output-on-failure -C Release | |
timeout-minutes: 10 | |