Skip to content

Update versions of actions/cache and actions/checkout #590

Update versions of actions/cache and actions/checkout

Update versions of actions/cache and actions/checkout #590

Workflow file for this run

name: Clang Tidy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: turtlesec-no/get-ninja@1.1.0
- name: Create vcpkg build folder
env:
vcpkg_project_root: ${{runner.workspace}}/ms-pacman/build
run: |
mkdir -p ${{ env.vcpkg_project_root }}/vcpkg_installed
mkdir -p ${{ env.vcpkg_project_root }}/_deps
- name: Cache vcpkg
uses: actions/cache@v4
env:
vcpkg_project_root: ${{runner.workspace}}/ms-pacman/build
cache-name: vcpkg-modules
with:
path: |
/home/runner/.cache/vcpkg
${{ env.vcpkg_project_root }}/vcpkg_installed
${{ env.vcpkg_project_root }}/_deps
key: clang-tidy-13-cache-${{ hashFiles('vcpkg.json') }}-${{ hashFiles('cmake/vcpkg.cmake') }}
- name: Install LLVM-13 dependencies
run: |
sudo wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
sudo apt update -y
sudo apt-get install clang++-13 clang-tidy-13 llvm-13
- name: Install Build dependencies
run: |
sudo apt update -y
sudo apt-get install -y libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libudev-dev libxcursor-dev make ninja-build cmake
- name: Configure CMake
working-directory: build
run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
- name: Show vcpkg logs
if: always()
shell: bash
run: |
cat /home/runner/work/ms-pacman/ms-pacman/build/vcpkg-manifest-install.log
cat /home/runner/work/ms-pacman/ms-pacman/build/_deps/vcpkg-src/buildtrees/sfml/install-x64-linux-dbg-out.log
- name: Run clang-tidy-13
working-directory: build
run: run-clang-tidy-13