Skip to content

Commit 03f3395

Browse files
committed
Added CMake testing on Windows.
1 parent bc85d86 commit 03f3395

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ jobs:
294294

295295
- name: CMake tests
296296
cmake_tests: 1
297-
os: ubuntu-20.04
297+
os: ubuntu-22.04
298298

299299
timeout-minutes: 15
300300
runs-on: ${{matrix.os}}
@@ -524,9 +524,13 @@ jobs:
524524
run: |
525525
cd boost-root
526526
cd __build_static__
527-
ctest --output-on-failure --no-tests=error
527+
ctest --output-on-failure --no-tests=error -j $BUILD_JOBS
528528
529529
windows:
530+
defaults:
531+
run:
532+
shell: cmd
533+
530534
strategy:
531535
fail-fast: false
532536
matrix:
@@ -553,12 +557,15 @@ jobs:
553557
addrmd: 64
554558
os: windows-2019
555559

560+
- name: CMake tests
561+
cmake_tests: 1
562+
os: windows-2022
563+
556564
timeout-minutes: 15
557565
runs-on: ${{matrix.os}}
558566

559567
steps:
560568
- name: Setup Boost
561-
shell: cmd
562569
run: |
563570
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
564571
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
@@ -590,15 +597,33 @@ jobs:
590597
rmdir /s /q "..\snapshot"
591598
git submodule update --init tools/boostdep
592599
python tools/boostdep/depinst/depinst.py --git_args "--jobs %GIT_FETCH_JOBS%" %LIBRARY%
593-
cmd /c bootstrap
594-
b2 -d0 headers
600+
if "${{matrix.cmake_tests}}" == "" (
601+
cmd /c bootstrap
602+
b2 -d0 headers
603+
)
595604
596605
- name: Run tests
597-
shell: cmd
606+
if: matrix.cmake_tests == ''
598607
run: |
599608
cd boost-root
600609
if "${{matrix.extra_tests}}" == "" set BOOST_SCOPE_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
601610
if not "${{matrix.cxxstd}}" == "" set CXXSTD=cxxstd=${{matrix.cxxstd}}
602611
if not "${{matrix.addrmd}}" == "" set ADDRMD=address-model=${{matrix.addrmd}}
603612
if not "${{matrix.build_variant}}" == "" (set BUILD_VARIANT=variant=${{matrix.build_variant}}) else (set BUILD_VARIANT=variant=%DEFAULT_BUILD_VARIANT%)
604613
b2 -j %NUMBER_OF_PROCESSORS% libs/%LIBRARY%/test toolset=${{matrix.toolset}} %CXXSTD% %ADDRMD% %BUILD_VARIANT% embed-manifest-via=linker
614+
615+
- name: Build CMake tests
616+
if: matrix.cmake_tests
617+
run: |
618+
cd boost-root
619+
mkdir __build_static__
620+
cd __build_static__
621+
cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON ..
622+
cmake --build . --config Release --target tests -j %NUMBER_OF_PROCESSORS%
623+
624+
- name: Run CMake tests
625+
if: matrix.cmake_tests
626+
run: |
627+
cd boost-root
628+
cd __build_static__
629+
ctest -C Release --output-on-failure --no-tests=error -j %NUMBER_OF_PROCESSORS%

0 commit comments

Comments
 (0)