Update task, workflow and dictionary interfaces for DIRECT 7.2.76. #51
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: Lint | |
on: [workflow_dispatch, pull_request] | |
env: | |
TERM: xterm-256color | |
jobs: | |
clang-format: | |
name: Clang-Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install clang-format | |
run: | | |
wget -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-14 main' | |
sudo apt update | |
sudo apt install -y clang-format-14 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Run clang-format | |
run: | | |
output=$(git clang-format-14 --binary=clang-format-14 --diff --commit=origin/dev) | |
grep '^no modified files to format$' <<< "$output" && exit 0 | |
grep '^clang-format did not modify any files$' <<< "$output" && exit 0 | |
echo "$output" | |
echo -e "\033[1;31mCode style does not match clang-format" | |
exit 1 |