Skip to content

Add CI support for Windows and MSVC #197

Add CI support for Windows and MSVC

Add CI support for Windows and MSVC #197

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 ]
jobs:
linux-core:
strategy:
matrix:
BUILD:
- "Release"
- "Debug"
CXX_STANDARD:
- 17
- 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:22.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/release-1.11.0.tar.gz
tar -xzvf release-1.11.0.tar.gz
cmake -S googletest-release-1.11.0 -B gtest_build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefixes/gtest/
cmake --build gtest_build
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
-DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }}
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/.prefixes/gtest/"
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build
- 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:
- 17
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: ubuntu:22.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
nvidia-cuda-toolkit
- name: Install Google Test
run: |
wget https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz
tar -xzvf release-1.11.0.tar.gz
cmake -S googletest-release-1.11.0 -B gtest_build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefixes/gtest/
cmake --build gtest_build
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
-DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }}
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/.prefixes/gtest/"
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build
- name: Core tests
run: build/tests/core/test_core
windows-core:
strategy:
matrix:
BUILD:
- "Release"
- "Debug"
CXX_STANDARD:
- 17
- 20
name: "Windows/Core/${{ matrix.BUILD }}/MSVC/C++${{ matrix.CXX_STANDARD }}"
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v3
- name: Install Google Test
run: |
curl -O https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz
tar -xzvf release-1.11.0.tar.gz
cmake -S googletest-release-1.11.0 -B gtest_build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefix/
cmake --build gtest_build
cmake --install gtest_build
- name: Install Google Benchmark
run: |
curl -O https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz
tar -xzvf v1.8.3.tar.gz
cmake -S benchmark-1.8.3 -b gbench_build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefix/
cmake --build gbench_build
cmake --install gbench_build
- name: Install Boost
run: |
curl -O https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz
tar -xzvf boost_1_83_0.tar.gz
cd boost_1_83_0
./bootstrap.sh
b2 install --prefix="$GITHUB_WORKSPACE/.prefix/"
- name: Configure
run: cmake
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD }}
-DCOVFIE_FAIL_ON_WARNINGS=TRUE
-DCOVFIE_BUILD_TESTS=On
-DCOVFIE_BUILD_EXAMPLES=On
-DCOVFIE_BUILD_BENCHMARKS=On
-DCOVFIE_PLATFORM_CPU=On
-DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }}
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/.prefix/"
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build
- name: Core tests
run: build/tests/core/test_core