Skip to content

Commit

Permalink
Added Windows CI to GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lastique committed Nov 5, 2023
1 parent 6ec7f68 commit dacd13d
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -682,3 +682,73 @@ jobs:
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 $BUILD_JOBS
windows:
strategy:
fail-fast: false
matrix:
include:
- toolset: msvc-14.0
cxxstd64: "14"
cxxstd32: "14"
cxxflags: "/arch:AVX"
os: windows-2019
- toolset: msvc-14.2
cxxstd64: "14,17,20,latest"
cxxstd32: "14"
cxxflags: "/arch:AVX"
os: windows-2019
- toolset: msvc-14.3
cxxstd64: "14,17,20,latest"
cxxstd32: "14"
cxxflags: "/arch:AVX"
os: windows-2022
- toolset: clang-win
cxxstd64: "14,17,latest"
cxxstd32: "14"
cxxflags: "-mavx -mcx16"
os: windows-2022
- toolset: gcc
cxxstd64: "03,11,14,17,2a"
cxxflags: "-march=native"
os: windows-2019

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

steps:
- uses: actions/checkout@v3

- name: Setup Boost
shell: cmd
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
python tools/boostdep/depinst/depinst.py --git_args "--jobs %GIT_FETCH_JOBS%" %LIBRARY%
cmd /c bootstrap
b2 -d0 headers
- name: Run tests
shell: cmd
run: |
cd ../boost-root
set B2_ARGS="-j %NUMBER_OF_PROCESSORS% toolset=${{matrix.toolset}} embed-manifest-via=linker"
set BUILD_VARIANT="${{matrix.build_variant}}"
if "${{matrix.build_variant}}" == "" ( set B2_ARGS="%B2_ARGS% variant=%DEFAULT_BUILD_VARIANT%" ) else ( set B2_ARGS="%B2_ARGS% variant=${{matrix.build_variant}}" )
if not "${{matrix.cxxflags}}" == "" set B2_ARGS="%B2_ARGS% ""cxxflags=${{matrix.cxxflags}}"""
echo B2_ARGS: %B2_ARGS%
if not "${{matrix.cxxstd64}}" == "" b2 %B2_ARGS% cxxstd=${{matrix.cxxstd64}} address-model=64 libs/%LIBRARY%/test
if not "${{matrix.cxxstd32}}" == "" b2 %B2_ARGS% cxxstd=${{matrix.cxxstd32}} address-model=32 libs/%LIBRARY%/test

0 comments on commit dacd13d

Please sign in to comment.