mirror of
https://github.com/CLIUtils/CLI11.git
synced 2026-01-19 04:52:08 +00:00
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:
52
.github/workflows/tests.yml
vendored
52
.github/workflows/tests.yml
vendored
@@ -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()
|
||||
|
||||
@@ -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]+\"(.+)\"")
|
||||
|
||||
Reference in New Issue
Block a user