SHA1 Re-write #302
Workflow file for this run
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 2024 Matt Borland | |
| # 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) | |
| name: cuda | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| - feature/** | |
| pull_request: | |
| release: | |
| types: [published, created, edited] | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| cuda-cmake-test: | |
| strategy: | |
| fail-fast: false | |
| runs-on: gpu-runner-1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Packages | |
| run: | | |
| sudo apt-get install -y wget | |
| - name: Install CUDA | |
| run: | | |
| wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb | |
| sudo dpkg -i cuda-keyring_1.1-1_all.deb | |
| sudo apt-get update | |
| sudo apt-get install -y cuda-toolkit | |
| echo "PATH=/usr/local/cuda-12.6/bin:${PATH}" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV | |
| echo "CUDA_PATH=/usr/local/cuda-12.6" >> $GITHUB_ENV | |
| # See: https://apt.kitware.com/ | |
| - name: Install CMake from Kitware apt | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ca-certificates gpg gnupg wget | |
| sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1A127079A92F09ED | |
| test -f /usr/share/doc/kitware-archive-keyring/copyright || | |
| wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null | |
| echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null | |
| sudo apt-get update | |
| test -f /usr/share/doc/kitware-archive-keyring/copyright || | |
| sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg | |
| sudo apt-get install -y kitware-archive-keyring | |
| echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy-rc main' | sudo tee -a /etc/apt/sources.list.d/kitware.list >/dev/null | |
| sudo apt-get update | |
| sudo apt-get update | |
| sudo apt-get install -y cmake | |
| - name: Check CMake | |
| run: cmake --version | |
| - 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: Check CUDA Installation | |
| run: | | |
| nvidia-smi | |
| nvcc --version | |
| ls -l /usr/local/cuda-12.6/bin/nvcc | |
| - name: Configure | |
| run: | | |
| cd ../boost-root | |
| mkdir __build__ && cd __build__ | |
| cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY \ | |
| -DBUILD_TESTING=ON \ | |
| -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.6/bin/nvcc \ | |
| -DBOOST_CRYPT_ENABLE_CUDA=1 \ | |
| -DCMAKE_CUDA_ARCHITECTURES=70 \ | |
| -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.6 \ | |
| -DCUDA_PATH=/usr/local/cuda-12.6 \ | |
| -DCMAKE_VERBOSE_MAKEFILE=ON \ | |
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | |
| .. \ | |
| --debug-output | |
| - name: Build tests | |
| run: | | |
| cd ../boost-root/__build__ | |
| cmake --build . --target tests -j $(nproc) --verbose | |
| - name: Run tests | |
| run: | | |
| cd ../boost-root/__build__ | |
| ctest --output-on-failure --no-tests=error |