Skip to content

Commit

Permalink
Various upgrades to the continuous integrations
Browse files Browse the repository at this point in the history
This commit makes the following changes to the CI system:

1. It adds concurrency groups to improve CI efficiency.
2. It adds a Windows build.
3. It updates the versions of Google Test.
4. It renames some CI jobs.
  • Loading branch information
stephenswat committed Oct 10, 2023
1 parent 695586b commit 60612a2
Showing 1 changed file with 70 additions and 10 deletions.
80 changes: 70 additions & 10 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ name: Build Tests

on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
native:
linux-core:
strategy:
matrix:
BUILD:
Expand All @@ -26,7 +30,7 @@ jobs:
- NAME: "clang"
CXX: "clang++"

name: "CPU/${{ matrix.BUILD }}/${{ matrix.COMPILER.NAME }}/C++${{ matrix.CXX_STANDARD }}"
name: "Linux/Core/${{ matrix.BUILD }}/${{ matrix.COMPILER.NAME }}/C++${{ matrix.CXX_STANDARD }}"

runs-on: "ubuntu-latest"

Expand All @@ -46,9 +50,9 @@ jobs:
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/
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
cmake --install gtest_build
- name: Configure
Expand All @@ -71,7 +75,7 @@ jobs:
- name: CPU tests
run: build/tests/cpu/test_cpu

cuda:
linux-cuda:
strategy:
matrix:
BUILD:
Expand All @@ -86,7 +90,7 @@ jobs:
- NAME: "nvcc"
CUDACC: "nvcc"

name: "CUDA/${{ matrix.BUILD }}/${{ matrix.COMPILER.NAME }}+${{ matrix.CUDA_COMPILER.NAME }}/C++${{ matrix.CXX_STANDARD }}"
name: "Linux/CUDA/${{ matrix.BUILD }}/${{ matrix.COMPILER.NAME }}+${{ matrix.CUDA_COMPILER.NAME }}/C++${{ matrix.CXX_STANDARD }}"

runs-on: "ubuntu-latest"

Expand All @@ -107,9 +111,9 @@ jobs:
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/
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
cmake --install gtest_build
- name: Configure
Expand All @@ -131,3 +135,59 @@ jobs:
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 Boost
run: choco install boost-msvc-14.3
- name: Install Google Test
run: |
Invoke-WebRequest -Uri "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz" -OutFile "gtest.tar.gz"
tar -xf gtest.tar.gz
cmake -S .\googletest-1.14.0 -B .\gtest_build
cmake --build .\gtest_build --config Release
cmake --install .\gtest_build --config Release --prefix ${{ github.workspace }}\.prefix
- name: Install Google Benchmark
run: |
Invoke-WebRequest -Uri "https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz" -OutFile "gbench.tar.gz"
tar -xf gbench.tar.gz
cmake -S .\benchmark-1.8.3 -B .\gbench_build -DCMAKE_PREFIX_PATH=${{ github.workspace }}\.prefix -DBENCHMARK_ENABLE_TESTING=Off
cmake --build .\gbench_build --config Release
cmake --install .\gbench_build --config Release --prefix ${{ github.workspace }}\.prefix
- name: Install Boost
run: |
Invoke-WebRequest -Uri "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz" -OutFile "boost.tar.gz"
tar -xf boost.tar.gz
cd boost_1_83_0
.\bootstrap.bat
.\b2 install --with-log --with-program_options --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

0 comments on commit 60612a2

Please sign in to comment.