Huge experimental refactor. #451
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check code style | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
check_code_style: | |
defaults: | |
run: | |
shell: cmd | |
env: | |
BUILD_DIRECTORY: ${{github.workspace}}\Build | |
CC: clang-cl | |
CXX: clang-cl | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup Dependencies | |
uses: ./.github/actions/SetupDependencies | |
with: | |
platform: ${{runner.os}} | |
build_type: Debug | |
- name: Install Ninja | |
run: choco install ninja | |
# There is a separate LLVM installation on Windows build agents. | |
# We need to remove it from path, otherwise it could be selected instead of VS 2022 CLangCL. | |
- name: Remove LLVM from Path | |
shell: pwsh | |
run: | | |
$PathWithoutLLVM13 = $Env:Path.Replace("C:\Program Files\LLVM\bin", "") | |
echo "PATH=$PathWithoutLLVM13" >> $Env:GITHUB_ENV | |
- name: Create build directory | |
run: cmake -E make_directory ${{env.BUILD_DIRECTORY}} | |
- name: Configure | |
working-directory: ${{env.BUILD_DIRECTORY}} | |
run: > | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && | |
cmake -G Ninja ${{github.workspace}} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug | |
- name: Execute Code Generation | |
working-directory: ${{env.BUILD_DIRECTORY}} | |
run: > | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && | |
cmake --build . --target BuildTimeCodeGeneration | |
- name: Run CLang Tools | |
run: > | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && | |
powershell .\Script\CodeStyle\CheckCLangFormat.ps1 && | |
powershell .\Script\CodeStyle\CheckCLangTidy.ps1 ${{env.BUILD_DIRECTORY}} |