Enforce style #2486
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: "Code Checks" | |
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
formatting-check: | |
name: Formatting Check | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check that C and C++ code is correctly formatted | |
uses: jidicula/clang-format-action@v4.11.0 | |
with: | |
exclude-regex: '(build|config|deps)' | |
clang-format-version: 15 | |
shell-check: | |
name: Shell check | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ludeeus/action-shellcheck@1.1.0 | |
name: Check that shell scripts follow best practices | |
with: | |
scandir: './bin' | |
clang-tidy-check: | |
name: Clang Tidy check | |
runs-on: [self-hosted, linux, normal] | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: 'Set up Docker' | |
uses: ./.github/actions/with-docker | |
with: | |
tag: llvm-backend-ci-${{ github.sha }} | |
os: ubuntu | |
distro: jammy | |
llvm: 15 | |
- name: 'Run clang-tidy checks' | |
run: | | |
docker exec -t llvm-backend-ci-${GITHUB_SHA} /bin/bash -c 'mkdir build && cd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DBUILD_TESTS=On ..' | |
docker exec -t llvm-backend-ci-${GITHUB_SHA} scripts/clang-tidy.sh | |
- name: 'Tear down Docker' | |
if: always() | |
run: | | |
docker stop --time=0 llvm-backend-ci-${GITHUB_SHA} | |
docker container rm --force llvm-backend-ci-${GITHUB_SHA} || true | |
scala-check: | |
name: Scala formatting check | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
- name: 'Set up Java 17' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: 'Install Maven' | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes maven | |
- name: 'Check code is formatted correctly' | |
run: | | |
cd matching | |
mvn spotless:check --batch-mode -U |