Try to remove Boost_NO_BOOST_CMAKE to build on win #14
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: Unix CI | |
on: [push,pull_request] | |
jobs: | |
Test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-latest | |
- macos-12 | |
compiler: | |
# you can specify the version after `-` like "llvm-13.0.0". | |
- llvm-13.0.0 | |
- clang++-14 | |
- gcc-11 | |
# - gcc-12 | |
standard: [14, 17, 20, 23] | |
generator: | |
- "Ninja Multi-Config" | |
build_type: | |
- Release | |
- Debug | |
exclude: | |
# mingw is determined by this author to be too buggy to support | |
- os: macos-12 | |
compiler: gcc-11 | |
- os: ubuntu-20.04 | |
compiler: llvm-13.0.0 | |
include: | |
# Add appropriate variables for gcov version required. This will intentionally break | |
# if you try to use a compiler that does not have gcov set | |
- compiler: gcc-11 | |
gcov_executable: gcov | |
- compiler: llvm-13.0.0 | |
gcov_executable: "llvm-cov gcov" | |
# Set up preferred package generators, for given build configurations | |
- build_type: Release | |
package_generator: TBZ2 | |
- os: windows-2022 | |
compiler: msvc | |
generator: "Visual Studio 17 2022" | |
build_type: Debug | |
- os: windows-2022 | |
compiler: msvc | |
generator: "Visual Studio 17 2022" | |
build_type: Release | |
package_generator: ZIP | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: ${{ matrix.compiler }} | |
vcvarsall: ${{ contains(matrix.os, 'windows' )}} | |
cmake: true | |
ninja: true | |
vcpkg: false | |
ccache: true | |
clangtidy: true | |
cppcheck: true | |
gcovr: true | |
opencppcoverage: true | |
- name: setup dependencies - Unix | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install -y ninja-build libboost-all-dev libasio-dev | |
- name: setup dependencies - macOS | |
if: runner.os == 'macOS' | |
run: | | |
brew install ninja boost asio | |
- name: setup dependencies - Windows | |
if: runner.os == 'Windows' | |
run: | | |
choco install ninja | |
choco install boost-msvc-14.1 | |
# # Download and extract Asio | |
# Invoke-WebRequest -Uri https://sourceforge.net/projects/asio/files/asio/1.18.2%20%28Stable%29/asio-1.18.2.zip -OutFile asio.zip | |
# Expand-Archive -Path asio.zip -DestinationPath $env:USERPROFILE\asio | |
# # Set ASIO_INCLUDE_DIR environment variable | |
# echo "ASIO_INCLUDE_DIR=$env:USERPROFILE\asio\asio-1.18.2\include" >> $env:GITHUB_ENV | |
- name: Configure CMake | |
run: | | |
# mkdir build | |
# cd build | |
# cmake .. -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DCLI_BuildTests=ON -DCLI_BuildExamples=ON -DCLI_UseBoostAsio=ON | |
cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DCMAKE_CXX_STANDARD=${{matrix.standard}} -DCLI_BuildTests:BOOL=${{ runner.os != 'Windows' }} -DCLI_BuildExamples=ON -DCLI_UseBoostAsio=ON | |
- name: Build | |
run: | | |
# cd /home/runner/work/cli/cli/build | |
# make all | |
cmake --build ./build --config ${{matrix.build_type}} | |
- name: run tests - Unix | |
if: runner.os != 'Windows' | |
# working-directory: ./build/test/${{matrix.build_type}} | |
working-directory: ./build | |
run: | | |
# cd /home/runner/work/cli/cli/build/test/ | |
# ./test_suite | |
ctest -C ${{matrix.build_type}} --rerun-failed --output-on-failure |