More windows compilers

This commit is contained in:
McMassiveNZ
2023-01-29 21:13:02 +01:00
parent 64d3273101
commit 43fc0a2a63

View File

@@ -7,19 +7,15 @@ on:
branches: [ "main" ] branches: [ "main" ]
env: env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) CLANG_TIDY_VERSION: "13.0.0"
BUILD_TYPE: Release
jobs: jobs:
build: build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, macos-latest, windows-latest] os: [windows-latest, ubuntu-latest, macos-latest]
build_configuration: [Debug, Release] build_configuration: [Debug, Release]
compiler: [llvm, gcc] compiler: [llvm, gcc]
vcpkg_bootstrap: [bootstrap-vcpkg.sh] vcpkg_bootstrap: [bootstrap-vcpkg.sh]
@@ -32,18 +28,8 @@ jobs:
- os: 'windows-latest' - os: 'windows-latest'
triplet: x64-windows triplet: x64-windows
vcpkg_bootstrap: bootstrap-vcpkg.bat vcpkg_bootstrap: bootstrap-vcpkg.bat
compiler: "msvc"
build_configuration: Debug
- os: 'windows-latest'
triplet: x64-windows
vcpkg_bootstrap: bootstrap-vcpkg.bat
compiler: "msvc"
build_configuration: Release
- os: 'ubuntu-latest' - os: 'ubuntu-latest'
triplet: x64-linux triplet: x64-linux
- os: 'macos-latest' - os: 'macos-latest'
triplet: x64-osx triplet: x64-osx
@@ -65,14 +51,13 @@ jobs:
${{ env.APPDATA }}\vcpkg\archives ${{ env.APPDATA }}\vcpkg\archives
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.build_configuration }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}} key: ${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.build_configuration }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.BUILD_TYPE }}- ${{ runner.os }}-${{ matrix.build_configuration }}-
- name: setup dependencies - name: setup dependencies
uses: aminya/setup-cpp@v1 uses: aminya/setup-cpp@v1
with: with:
compiler: ${{ matrix.compiler }} compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows' )}} vcvarsall: ${{ contains(matrix.os, 'windows')}}
cmake: true cmake: true
ninja: true ninja: true
vcpkg: true vcpkg: true
@@ -87,18 +72,13 @@ jobs:
run: ${{github.workspace}}/external/vcpkg/vcpkg install spdlog --triplet ${{matrix.triplet}} run: ${{github.workspace}}/external/vcpkg/vcpkg install spdlog --triplet ${{matrix.triplet}}
- name: Configure CMake - name: Configure CMake
# 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=${{matrix.build_configuration}} run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_configuration}}
-DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/external/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/external/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build - name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_configuration}} run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_configuration}}
- name: Test - name: Test
working-directory: ${{github.workspace}}/build 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 ${{matrix.build_configuration}} run: ctest -C ${{matrix.build_configuration}}