Skip to content

πŸ’š Fix wheel build #14

πŸ’š Fix wheel build

πŸ’š Fix wheel build #14

name: CMake on CUDA Docker
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: nvidia/cuda:12.6.3-devel-ubuntu22.04
steps:
- name: Install Git 2.18 or higher
run: |
apt-get update
apt-get install -y git cmake python3-dev ninja-build python3-pip
git --version
python3 --version
ln -s /usr/bin/python3 /usr/bin/python
- name: Install cmake
run: |
python -m pip install cmake
cmake --version
- uses: actions/checkout@v4
with:
submodules: true
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT"
- name: Check CUDA installation
run: |
nvcc -V
- name: Configure CMake for python part
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-S $(pwd)
-DBUILD_TESTS=ON # Enable testing
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }}
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest