Skip to content

Commit

Permalink
Added CMake testing on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lastique committed Oct 19, 2024
1 parent bc85d86 commit 03f3395
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ jobs:

- name: CMake tests
cmake_tests: 1
os: ubuntu-20.04
os: ubuntu-22.04

timeout-minutes: 15
runs-on: ${{matrix.os}}
Expand Down Expand Up @@ -524,9 +524,13 @@ jobs:
run: |
cd boost-root
cd __build_static__
ctest --output-on-failure --no-tests=error
ctest --output-on-failure --no-tests=error -j $BUILD_JOBS
windows:
defaults:
run:
shell: cmd

strategy:
fail-fast: false
matrix:
Expand All @@ -553,12 +557,15 @@ jobs:
addrmd: 64
os: windows-2019

- name: CMake tests
cmake_tests: 1
os: windows-2022

timeout-minutes: 15
runs-on: ${{matrix.os}}

steps:
- name: Setup Boost
shell: cmd
run: |
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
Expand Down Expand Up @@ -590,15 +597,33 @@ jobs:
rmdir /s /q "..\snapshot"
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs %GIT_FETCH_JOBS%" %LIBRARY%
cmd /c bootstrap
b2 -d0 headers
if "${{matrix.cmake_tests}}" == "" (
cmd /c bootstrap
b2 -d0 headers
)
- name: Run tests
shell: cmd
if: matrix.cmake_tests == ''
run: |
cd boost-root
if "${{matrix.extra_tests}}" == "" set BOOST_SCOPE_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
if not "${{matrix.cxxstd}}" == "" set CXXSTD=cxxstd=${{matrix.cxxstd}}
if not "${{matrix.addrmd}}" == "" set ADDRMD=address-model=${{matrix.addrmd}}
if not "${{matrix.build_variant}}" == "" (set BUILD_VARIANT=variant=${{matrix.build_variant}}) else (set BUILD_VARIANT=variant=%DEFAULT_BUILD_VARIANT%)
b2 -j %NUMBER_OF_PROCESSORS% libs/%LIBRARY%/test toolset=${{matrix.toolset}} %CXXSTD% %ADDRMD% %BUILD_VARIANT% embed-manifest-via=linker
- name: Build CMake tests
if: matrix.cmake_tests
run: |
cd boost-root
mkdir __build_static__
cd __build_static__
cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON ..
cmake --build . --config Release --target tests -j %NUMBER_OF_PROCESSORS%
- name: Run CMake tests
if: matrix.cmake_tests
run: |
cd boost-root
cd __build_static__
ctest -C Release --output-on-failure --no-tests=error -j %NUMBER_OF_PROCESSORS%

0 comments on commit 03f3395

Please sign in to comment.