Initial commit
This commit is contained in:
23
.github/workflows/auto-clang-format.yml
vendored
Normal file
23
.github/workflows/auto-clang-format.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: auto-clang-format
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: DoozyX/clang-format-lint-action@v0.13
|
||||
with:
|
||||
source: '.'
|
||||
exclude: './third_party ./external'
|
||||
extensions: 'h,cpp,hpp'
|
||||
clangFormatVersion: 13
|
||||
inplace: True
|
||||
- uses: EndBug/add-and-commit@v4
|
||||
with:
|
||||
author_name: Clang Robot
|
||||
author_email: robot@example.com
|
||||
message: ':art: Committing clang-format changes'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
117
.github/workflows/ci.yml
vendored
Normal file
117
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
CLANG_TIDY_VERSION: "13.0.0"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{matrix.os}}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
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
|
||||
|
||||
- os: 'ubuntu-latest'
|
||||
triplet: x64-linux
|
||||
|
||||
- os: 'macos-latest'
|
||||
triplet: x64-osx
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- 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 }}-
|
||||
|
||||
- name: setup dependencies
|
||||
uses: aminya/setup-cpp@v1
|
||||
with:
|
||||
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
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_configuration}}
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest -C ${{matrix.build_configuration}}
|
||||
|
||||
Reference in New Issue
Block a user