-
Notifications
You must be signed in to change notification settings - Fork 234
58 lines (50 loc) · 1.39 KB
/
Guidelines.yml
File metadata and controls
58 lines (50 loc) · 1.39 KB
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
name: Guidelines
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
push:
branches:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
# Check code formatting and upload a patch when necessary.
#
# Only checks the files changed in the current commit.
Code-Style:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: clang-format
id: clang-format
run: sh/run_test_format.sh
- name: format patch
if: ${{ failure() }}
run: git diff > reformat.patch
- name: upload-full-clang-format-config
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: reformat.patch
path: reformat.patch
# Check that souffle builds with clang and ninja.
Clang-Ninja-Build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v6
- name: Install dependencies
run: sudo sh/setup/install_ubuntu_deps.sh
- name: generate with Ninja
run: cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++ -G Ninja -DCMAKE_BUILD_TYPE=Debug
- name: build
run: cmake --build build