ci: add CUDA versions (#864)

* update tests

* update tested cmake version

* try the correct docker tag names

* try different order for cuda build

* reorder the builds

* use an install boost action

* install boost through apt
This commit is contained in:
Philip Top
2023-03-13 11:29:38 -07:00
committed by GitHub
parent 8e4fd15a23
commit 18a256ec85
2 changed files with 37 additions and 19 deletions

View File

@@ -74,18 +74,31 @@ jobs:
- name: Build
run: cmake --build build -j4 -- --keep-going
cuda-build:
name: CUDA build only
cuda11-build:
name: CUDA 11 build only
runs-on: ubuntu-latest
container: nvidia/cuda:10.2-devel-ubuntu18.04
container: nvidia/cuda:11.8.0-devel-ubuntu22.04
steps:
- uses: actions/checkout@v1
- name: Add build tools
run: apt-get update && apt-get install -y wget git cmake
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure
run: cmake -S . -B build -DCLI11_CUDA_TESTS=ON
- name: Build
run: cmake --build build -j2
cuda12-build:
name: CUDA 12 build only
runs-on: ubuntu-latest
container: nvidia/cuda:12.1.0-devel-ubuntu22.04
steps:
- name: Add build tools
run: apt-get update && apt-get install -y wget git cmake
- uses: actions/checkout@v3
with:
submodules: true
- name: Add wget
run: apt-get update && apt-get install -y wget
- name: Get cmake
uses: jwlawson/actions-setup-cmake@v1.13
- name: Configure
run: cmake -S . -B build -DCLI11_CUDA_TESTS=ON
- name: Build
@@ -93,16 +106,15 @@ jobs:
boost-build:
name: Boost build
runs-on: ubuntu-latest
container: zouzias/boost:1.76.0
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
submodules: true
- name: Add deps
run: apt-get update && apt-get install make
- name: Get CMake
uses: jwlawson/actions-setup-cmake@v1.13
- name: Add boost
run: sudo apt-get update && sudo apt-get install -y libboost-dev
# NOTE: If a boost version matching all requirements cannot be found,
# this build step will fail
- name: Configure
run: cmake -S . -B build -DCLI11_BOOST=ON
- name: Build
@@ -260,11 +272,10 @@ jobs:
cmake-version: "3.22"
if: success() || failure()
- name: Check CMake 3.23 (full)
- name: Check CMake 3.23
uses: ./.github/actions/quick_cmake
with:
cmake-version: "3.23"
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
if: success() || failure()
- name: Check CMake 3.24 (full)
@@ -273,3 +284,10 @@ jobs:
cmake-version: "3.24"
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
if: success() || failure()
- name: Check CMake 3.25 (full)
uses: ./.github/actions/quick_cmake
with:
cmake-version: "3.25"
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
if: success() || failure()

View File

@@ -6,10 +6,10 @@ cmake_minimum_required(VERSION 3.4)
# of CMake. For most of the policies, the new version is better (hence the change).
# We don't use the 3.4...3.24 syntax because of a bug in an older MSVC's
# built-in and modified CMake 3.11
if(${CMAKE_VERSION} VERSION_LESS 3.24)
if(${CMAKE_VERSION} VERSION_LESS 3.25)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
else()
cmake_policy(VERSION 3.24)
cmake_policy(VERSION 3.25)
endif()
set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"")