Skip to content

Changed setupcpp to v1 #86

Changed setupcpp to v1

Changed setupcpp to v1 #86

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [ "main", "fix*" ]
pull_request:
branches: [ "main", "fix*" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
Test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2022
- ubuntu-24.04
- macos-14
compiler:
- llvm
- gcc
include:
- os: "windows-2022"
compiler: "msvc"
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
with:
path: |
./build/
~/vcpkg
~/.cache/vcpkg/archives
${{ env.LOCALAPPDATA }}/vcpkg/archives
${{ env.APPDATA }}/vcpkg/archives
${{ env.XDG_CACHE_HOME }}/vcpkg/archives
~/.cache/ccache
~/.ccache
~/.config/ccache
~/Library/Caches/ccache
${{ env.LOCALAPPDATA }}/ccache
${{ env.XDG_CACHE_HOME }}/ccache
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt', './vcpkg.json') }}
restore-keys: |
${{ runner.os }}-${{ env.BUILD_TYPE }}-
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows') }}
cmake: true
ninja: true
vcpkg: false
cppcheck: false
clang-tidy: false
- name: Configure CMake (non-Windows)
if: runner.os != 'Windows'
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Configure CMake (Windows)
if: runner.os == 'Windows'
run: cmake -B ${{github.workspace}}/build
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}