Skip to content

Commit 19d0d5b

Browse files
committed
Add compile only cmake testing
1 parent b35b4de commit 19d0d5b

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,3 +611,61 @@ jobs:
611611
run: |
612612
cd ../boost-root/__build__
613613
ctest --output-on-failure --no-tests=error
614+
cuda-cmake-test:
615+
strategy:
616+
fail-fast: false
617+
618+
runs-on: ubuntu-22.04
619+
620+
steps:
621+
- uses: Jimver/cuda-toolkit@v0.2.16
622+
id: cuda-toolkit
623+
with:
624+
cuda: '12.5.0'
625+
method: 'network'
626+
sub-packages: '["nvcc"]'
627+
628+
- name: Output CUDA information
629+
run: |
630+
echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}"+
631+
echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
632+
nvcc -V
633+
- uses: actions/checkout@v4
634+
635+
- name: Install Packages
636+
run: |
637+
sudo apt-get install -y cmake make
638+
- name: Setup Boost
639+
run: |
640+
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
641+
LIBRARY=${GITHUB_REPOSITORY#*/}
642+
echo LIBRARY: $LIBRARY
643+
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
644+
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
645+
echo GITHUB_REF: $GITHUB_REF
646+
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
647+
REF=${REF#refs/heads/}
648+
echo REF: $REF
649+
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
650+
echo BOOST_BRANCH: $BOOST_BRANCH
651+
cd ..
652+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
653+
cd boost-root
654+
mkdir -p libs/$LIBRARY
655+
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
656+
git submodule update --init tools/boostdep
657+
python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
658+
- name: Configure
659+
run: |
660+
cd ../boost-root
661+
mkdir __build__ && cd __build__
662+
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DBOOST_MATH_ENABLE_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES=70 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.5 ..
663+
- name: Build tests
664+
run: |
665+
cd ../boost-root/__build__
666+
cmake --build . --target tests
667+
# Will leave this commented out for now. GHA does not install graphics cards by default
668+
#- name: Run tests
669+
# run: |
670+
# cd ../boost-root/__build__
671+
# ctest --output-on-failure --no-tests=error

0 commit comments

Comments
 (0)