Skip to content

Commit

Permalink
Added Windows jobs to GitHub Actions CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lastique committed Jan 14, 2024
1 parent 609b700 commit 500d05c
Showing 1 changed file with 92 additions and 1 deletion.
93 changes: 92 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2022 Andrey Semashev
# Copyright 2021-2024 Andrey Semashev
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -482,3 +482,94 @@ jobs:
cmake -DBUILD_SHARED_LIBS=On ../libs/$LIBRARY/test/test_cmake
cmake --build . --target boost_${LIBRARY}_cmake_self_test -j $BUILD_JOBS
cmake --build . --target boost_${LIBRARY}_setup_cmake_self_test -j $BUILD_JOBS
windows:
defaults:
run:
shell: cmd

strategy:
fail-fast: false
matrix:
include:
- toolset: msvc-14.0
cxxstd: "14"
os: windows-2019
extra_tests: 1
- toolset: msvc-14.2
cxxstd: "14,17,20,latest"
os: windows-2019
- toolset: msvc-14.3
cxxstd: "14,17,20,latest"
os: windows-2022
- toolset: clang-win
cxxstd: "14,17,latest"
os: windows-2022
- toolset: gcc
cxxstd: "11-gnu,14-gnu,17-gnu,2a-gnu"
os: windows-2019

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

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

steps:
- uses: actions/checkout@v3

- name: Setup Boost
run: |
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
echo LIBRARY: %LIBRARY%
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
echo GITHUB_REF: %GITHUB_REF%
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
echo BOOST_BRANCH: %BOOST_BRANCH%
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
git submodule update --init tools/boostdep
if not "${{matrix.extra_tests}}" == "" set DEPINST_ARG_INCLUDE_EXAMPLES="--include=example"
python tools/boostdep/depinst/depinst.py %DEPINST_ARG_INCLUDE_EXAMPLES% --git_args "--jobs %GIT_FETCH_JOBS%" %LIBRARY%
if "${{matrix.cmake_tests}}" == "" (
cmd /c bootstrap
b2 -d0 headers
)
- name: Run tests
if: matrix.cmake_tests == ''
run: |
cd ../boost-root
set "B2_ARGS=-j %NUMBER_OF_PROCESSORS% toolset=${{matrix.toolset}} embed-manifest-via=linker"
if not "${{matrix.cxxstd}}" == "" set "B2_ARGS=%B2_ARGS% ^"cxxstd=${{matrix.cxxstd}}^""
if not "${{matrix.build_variant}}" == "" ( set "B2_ARGS=%B2_ARGS% variant=${{matrix.build_variant}}" ) else ( set "B2_ARGS=%B2_ARGS% variant=%DEFAULT_BUILD_VARIANT%" )
if not "${{matrix.cxxflags}}" == "" set "B2_ARGS=%B2_ARGS% ^"cxxflags=${{matrix.cxxflags}}^""
if not "${{matrix.linkflags}}" == "" set "B2_ARGS=%B2_ARGS% ^"linkflags=${{matrix.linkflags}}^""
if "${{matrix.extra_tests}}" == "" (
set BOOST_LOG_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
set BOOST_LOG_TEST_WITHOUT_EXAMPLES=1
)
b2 %B2_ARGS% libs/%LIBRARY%/test
- name: Run CMake tests
if: matrix.cmake_tests
run: |
cd ../boost-root
mkdir __build_static__
cd __build_static__
cmake ../libs/%LIBRARY%/test/test_cmake
cmake --build . --target boost_%LIBRARY%_cmake_self_test -j %NUMBER_OF_PROCESSORS%
cmake --build . --target boost_%LIBRARY%_setup_cmake_self_test -j %NUMBER_OF_PROCESSORS%
cd ..
mkdir __build_shared__
cd __build_shared__
cmake -DBUILD_SHARED_LIBS=On ../libs/%LIBRARY%/test/test_cmake
cmake --build . --target boost_%LIBRARY%_cmake_self_test -j %NUMBER_OF_PROCESSORS%
cmake --build . --target boost_%LIBRARY%_setup_cmake_self_test -j %NUMBER_OF_PROCESSORS%

0 comments on commit 500d05c

Please sign in to comment.