Code style #1365
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 style | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/code-style.yaml' | |
- 'docs/examples/c*/**' | |
- 'jni/**' | |
- 'src/soter/**' | |
- 'src/themis/**' | |
- 'src/wrappers/themis/jsthemis/**' | |
- 'src/wrappers/themis/themispp/**' | |
- 'tests/common/**' | |
- 'tests/soter/**' | |
- 'tests/themis/**' | |
- 'tests/themispp/**' | |
- 'tools/afl/**' | |
- '**/*.mk' | |
- 'Makefile' | |
- '!**/README*' | |
push: | |
branches: | |
- master | |
- stable | |
- release/* | |
schedule: | |
- cron: '20 6 * * 1' # every Monday at 6:20 UTC | |
env: | |
WITH_FATAL_WARNINGS: yes | |
jobs: | |
check-formatting: | |
name: Check formatting | |
runs-on: ubuntu-20.04 | |
# GitHub's host contains way too much crap in /etc/apt/sources.list | |
# which causes package conflicts in clang-format-8 and clang-tidy-8 | |
# installation. Run this job in a pristine Ubuntu 20.04 container. | |
container: ubuntu:20.04 | |
steps: | |
- name: Install system dependencies | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
apt update | |
apt install --yes make clang-8 clang-format-8 clang-tidy-8 libstdc++-8-dev \ | |
nodejs npm libssl-dev \ | |
default-jdk git | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Check code formatting | |
env: | |
CC: clang-8 | |
CXX: clang++-8 | |
CLANG_FORMAT: clang-format-8 | |
CLANG_TIDY: clang-tidy-8 | |
run: | | |
make fmt_check ENGINE=boringssl | |
make fmt_check ENGINE=openssl |