Update QEMU job in bare-metal CI #187
Workflow file for this run
This file contains 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: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
cuda: '12.5.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@v4 | |
- 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: Configure | |
run: | | |
cd ../boost-root | |
mkdir __build__ && cd __build__ | |
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DBOOST_CRYPT_ENABLE_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES=70 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.5 .. | |
- name: Build tests | |
run: | | |
cd ../boost-root/__build__ | |
cmake --build . --target tests -j $(nproc) | |
- name: Run tests | |
run: | | |
cd ../boost-root/__build__ | |
ctest --output-on-failure --no-tests=error | |
nvrtc-cmake-test: | |
strategy: | |
fail-fast: false | |
runs-on: gpu-runner-1 | |
steps: | |
- uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
cuda: '12.5.0' | |
method: 'network' | |
- 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@v4 | |
- 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: Configure | |
run: | | |
cd ../boost-root | |
mkdir __build__ && cd __build__ | |
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DBOOST_CRYPT_ENABLE_NVRTC=1 -DCMAKE_CUDA_ARCHITECTURES=70 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.5 -DBOOST_CRYPT_NVRTC_CI_RUN=1 .. | |
pwd | |
- name: Build tests | |
run: | | |
cd ../boost-root/__build__ | |
cmake --build . --target tests -j $(nproc) | |
- name: Run tests | |
run: | | |
cd ../boost-root/__build__ | |
ctest --output-on-failure --no-tests=error |