Merge pull request #166 from cppalliance/163 #310
This file contains hidden or 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
| # | |
| # Copyright 2020-2021 Peter Dimov | |
| # Copyright 2021 Andrey Semashev | |
| # Copyright 2021-2024 Alexander Grund | |
| # Copyright 2022-2025 James E. King III | |
| # | |
| # 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) | |
| # | |
| # This workflow uses the Boost.CI reusable workflow which builds a variety of | |
| # configurations of your project, runs tests, and generates code coverage reports. | |
| # | |
| # To use it, copy this file into your repository as `.github/workflows/ci.yml` and | |
| # customize it appropriately. | |
| # | |
| --- | |
| name: Boost.CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| - bugfix/** | |
| - feature/** | |
| - fix/** | |
| - github/** | |
| - pr/** | |
| paths-ignore: | |
| - LICENSE | |
| - meta/** | |
| - README.md | |
| jobs: | |
| call-boost-ci: | |
| name: Run Boost.CI | |
| uses: boostorg/boost-ci/.github/workflows/reusable.yml@master | |
| with: | |
| exclude_compiler: 'clang-3.5,clang-3.6,clang-3.7,clang-3.8,clang-3.9,clang-4.0,clang-5.0,clang-6.0,clang-7, | |
| clang-8,clang-9,clang-10,clang-11,clang-12, | |
| gcc-4.7,gcc-4.8,gcc-4.9,gcc-5,gcc-6,gcc-7,gcc-8,gcc-9,gcc-10' | |
| # Example of customization: | |
| # with: | |
| # enable_reflection: true | |
| # enable_windows: false | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| cuda-cmake-test: | |
| strategy: | |
| fail-fast: false | |
| runs-on: gpu-runner-1 | |
| steps: | |
| - uses: Jimver/cuda-toolkit@v0.2.30 | |
| id: cuda-toolkit | |
| with: | |
| cuda: '12.8.0' | |
| method: 'network' | |
| sub-packages: '["nvcc"]' | |
| - name: Output CUDA information | |
| run: | | |
| echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}"+ | |
| echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}" | |
| nvcc -V | |
| - uses: actions/checkout@v5 | |
| - name: Install Packages | |
| run: | | |
| sudo apt-get install -y cmake make | |
| - name: Setup Boost | |
| run: | | |
| echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY | |
| LIBRARY=${GITHUB_REPOSITORY#*/} | |
| echo LIBRARY: $LIBRARY | |
| echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV | |
| echo GITHUB_BASE_REF: $GITHUB_BASE_REF | |
| echo GITHUB_REF: $GITHUB_REF | |
| REF=${GITHUB_BASE_REF:-$GITHUB_REF} | |
| REF=${REF#refs/heads/} | |
| echo REF: $REF | |
| BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true | |
| echo BOOST_BRANCH: $BOOST_BRANCH | |
| cd .. | |
| git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root | |
| cd boost-root | |
| mkdir -p libs/$LIBRARY | |
| cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY | |
| git submodule update --init tools/boostdep | |
| python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY | |
| - name: Test C++20/23 | |
| run: | | |
| for std in 20 23; do | |
| echo "======== Testing C++${std} ========" | |
| cd ../boost-root | |
| rm -rf __build__ | |
| mkdir __build__ && cd __build__ | |
| cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DBOOST_SAFE_NUMBERS_ENABLE_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES="75;86" -DCMAKE_CUDA_STANDARD=${std} .. | |
| cmake --build . --target tests -j $(nproc) | |
| ctest -V --no-tests=error | |
| cd $GITHUB_WORKSPACE | |
| done |