Skip to content

Redesign the build test CI jobs #403

Redesign the build test CI jobs

Redesign the build test CI jobs #403

Workflow file for this run

# This file is part of covfie, a part of the ACTS project
#
# Copyright (c) 2022 CERN
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
name: Build Tests
on: [ push, pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
linux-core:
strategy:
matrix:
BUILD:
- "Release"
- "Debug"
CXX_STANDARD:
- 20
COMPILER:
- NAME: "gcc"
CXX: "g++"
- NAME: "clang"
CXX: "clang++"
name: "Linux/Core/${{ matrix.BUILD }}/${{ matrix.COMPILER.NAME }}/C++${{ matrix.CXX_STANDARD }}"
runs-on: "ubuntu-latest"
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: apt-get update && apt-get -y install
libboost-filesystem-dev
libboost-program-options-dev
libboost-log-dev
wget
cmake
libbenchmark-dev
g++
clang
- name: Install Google Test
run: |
wget https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
tar -xzvf v1.14.0.tar.gz
cmake -S googletest-1.14.0 -B gtest_build -DBUILD_GMOCK=Off -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefixes/gtest/
cmake --build gtest_build -- -j $(nproc)
cmake --install gtest_build
- name: Configure
run: cmake
-DCMAKE_CXX_COMPILER=$(which ${{ matrix.COMPILER.CXX }})
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD }}
-DCOVFIE_REQUIRE_CXX20=${{ matrix.CXX_STANDARD == 20 && 'On' || 'Off' }}
-DCOVFIE_FAIL_ON_WARNINGS=TRUE
-DCOVFIE_BUILD_TESTS=On
-DCOVFIE_BUILD_EXAMPLES=On
-DCOVFIE_BUILD_BENCHMARKS=On
-DCOVFIE_TEST_HEADERS=On
-DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }}
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/.prefixes/gtest/"
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build -- -j $(nproc)
- name: Core tests
run: build/tests/core/test_core
- name: CPU tests
run: build/tests/cpu/test_cpu
linux-cuda:
strategy:
matrix:
BUILD:
- "Release"
- "Debug"
CXX_STANDARD:
- 20
COMPILER:
- NAME: "gcc"
CXX: "g++"
CUDA_COMPILER:
- NAME: "nvcc"
CUDACC: "nvcc"
name: "Linux/CUDA/${{ matrix.BUILD }}/${{ matrix.COMPILER.NAME }}+${{ matrix.CUDA_COMPILER.NAME }}/C++${{ matrix.CXX_STANDARD }}"
runs-on: "ubuntu-latest"
container: "nvidia/cuda:12.6.2-devel-ubuntu24.04"
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: apt-get update && apt-get -y install
libboost-filesystem-dev
libboost-program-options-dev
libboost-log-dev
wget
cmake
libbenchmark-dev
g++-10
clang
- name: Install Google Test
run: |
wget https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
tar -xzvf v1.14.0.tar.gz
cmake -S googletest-1.14.0 -B gtest_build -DBUILD_GMOCK=Off -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefixes/gtest/
cmake --build gtest_build -- -j $(nproc)
cmake --install gtest_build
- name: Configure
run: cmake
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD }}
-DCMAKE_CUDA_ARCHITECTURES=52
-DCMAKE_CUDA_HOST_COMPILER=$(which g++-10)
-DCOVFIE_FAIL_ON_WARNINGS=TRUE
-DCOVFIE_BUILD_TESTS=On
-DCOVFIE_BUILD_EXAMPLES=On
-DCOVFIE_BUILD_BENCHMARKS=On
-DCOVFIE_PLATFORM_CUDA=On
-DCOVFIE_PLATFORM_CPU=On
-DCOVFIE_TEST_HEADERS=On
-DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }}
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/.prefixes/gtest/"
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build -- -j $(nproc)
- name: Core tests
run: build/tests/core/test_core
- name: CPU tests
run: build/tests/cpu/test_cpu