CPM added and directory structure changed

Switch to using CPM package manager instead of vcpkg as its just a wrapper around cmake and makes things more simple.

Switch dependency from spdlog to fmt.

Changed the directory structure to match the setup recommended by GitLab
This commit is contained in:
McMassiveNZ
2023-05-28 20:42:15 +02:00
parent ea2f1c08b7
commit 0e7f06cdd2
14 changed files with 61 additions and 55 deletions

View File

@@ -18,46 +18,38 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]
build_configuration: [Debug, Release]
compiler: [llvm, gcc]
vcpkg_bootstrap: [bootstrap-vcpkg.sh]
exclude:
- os: windows-latest
vcpkg_bootstrap: bootstrap-vcpkg.sh
include:
- os: 'windows-latest'
triplet: x64-windows
vcpkg_bootstrap: bootstrap-vcpkg.bat
compiler: llvm
build_configuration: Debug
- os: 'windows-latest'
triplet: x64-windows
vcpkg_bootstrap: bootstrap-vcpkg.bat
compiler: llvm
build_configuration: Release
- os: 'windows-latest'
triplet: x64-windows
vcpkg_bootstrap: bootstrap-vcpkg.bat
compiler: gcc
build_configuration: Debug
- os: 'windows-latest'
triplet: x64-windows
vcpkg_bootstrap: bootstrap-vcpkg.bat
compiler: gcc
build_configuration: Release
- os: 'windows-latest'
triplet: x64-windows
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
@@ -75,17 +67,8 @@ jobs:
- name: cache
uses: actions/cache@v3
with:
path: |
~/vcpkg
./build/vcpkg_installed
${{ env.HOME }}/.cache/vcpkg/archives
${{ env.XDG_CACHE_HOME }}/vcpkg/archives
${{ env.LOCALAPPDATA }}\vcpkg\archives
${{ env.APPDATA }}\vcpkg\archives
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.build_configuration }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}}
restore-keys: |
${{ runner.os }}-${{ matrix.build_configuration }}-
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: setup dependencies
uses: aminya/setup-cpp@v1
@@ -93,20 +76,12 @@ jobs:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows')}}
cmake: true
vcpkg: true
ccache: true
clangtidy: ${{ env.CLANG_TIDY_VERSION }}
cppcheck: true
- name: Boostrap Vcpkg
run: ${{github.workspace}}/external/vcpkg/${{matrix.vcpkg_bootstrap}} -disableMetrics
- name: Install packaged dependencies
run: ${{github.workspace}}/external/vcpkg/vcpkg install spdlog --triplet ${{matrix.triplet}}
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_configuration}}
-DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/external/vcpkg/scripts/buildsystems/vcpkg.cmake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_configuration}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_configuration}}