Bump actions/checkout from 3 to 4 #847
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
# SPDX-License-Identifier: Apache-2.0 OR MIT | |
# | |
# SPDX-FileCopyrightText: Copyright 2022 Micron Technology, Inc. | |
name: clang-tidy | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- master | |
- "v[0-9]+.[0-9]+" | |
paths: | |
- "**.c" | |
- "**.h" | |
- "**.h.in" | |
- .clang-tidy | |
- .github/workflows/clang-tidy.yaml | |
- scripts/dev/clang-tidy.sh | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
permissions: {} | |
jobs: | |
clang-tidy: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/hse-project/ci-images/fedora-37:${{ github.base_ref }} | |
strategy: | |
fail-fast: false | |
matrix: | |
buildtype: [debug, release] | |
steps: | |
- name: Checkout HSE | |
uses: actions/checkout@v4 | |
- name: Cache Meson packagecache | |
uses: actions/cache@v3 | |
with: | |
path: subprojects/packagecache | |
key: meson-packagecache-fedora-37-${{ hashFiles('subprojects/*.wrap') }} | |
- name: Setup clang toolchain | |
run: | | |
echo "CC=clang" >> "$GITHUB_ENV" | |
echo "CXX=clang++" >> "$GITHUB_ENV" | |
- name: Setup | |
run: | | |
meson setup builddir --fatal-meson-warnings --werror \ | |
--buildtype=${{ matrix.buildtype }} -Dtools=enabled -Dpmem=enabled \ | |
-Ddocs=disabled -Dbindings=none | |
- name: Build | |
run: | | |
ninja -C builddir | |
- name: Run clang-tidy | |
run: | | |
ninja -C builddir clang-tidy |