-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (56 loc) · 1.56 KB
/
clang-format.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Format-check
on:
push:
branches:
- 'master'
- 'devel'
pull_request:
env:
TZ: Atlantic/Reykjavik
defaults:
run:
shell: bash -ex {0}
jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-20.04
timeout-minutes: 120
strategy:
fail-fast: true
matrix:
include:
- name: "clang-format-12"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: src
fetch-depth: 2
submodules: recursive
- name: Add package source
run: |
echo 'APT::Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main"
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"
sudo apt-get update
- name: Install CMake
run: sudo apt-get install --yes cmake
- name: Install clang-format ${{ matrix.name }}
run: sudo apt-get install --yes ${{ matrix.name }}
- name: Tool versions
run: |
env cmake --version
env ${{ matrix.name }} --version
- name: Configure tests
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
run: |
mkdir build
cd build
cmake ../src
- name: Run tests
run: |
cd build
make check_format