Skip to content

Commit cf3cd91

Browse files
committed
[CI] Pull out style checks into their own workflow
1 parent 424990f commit cf3cd91

File tree

3 files changed

+90
-34
lines changed

3 files changed

+90
-34
lines changed

.github/workflows/proof.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ jobs:
5555
path: ~/.opam
5656
key: ${{ matrix.version }}
5757

58-
# - name: Install Cerberus-lib
59-
# run: |
60-
# opam switch ${{ matrix.version }}
61-
# eval $(opam env --switch=${{ matrix.version }})
62-
# opam pin --yes --no-action add cerberus-lib .
63-
# opam install --yes cerberus-lib
64-
6558
- name: Download cvc5 release
6659
uses: robinraju/release-downloader@v1
6760
with:
@@ -80,13 +73,7 @@ jobs:
8073
opam switch ${{ matrix.version }}
8174
eval $(opam env --switch=${{ matrix.version }})
8275
opam pin --yes --no-action add cn .
83-
opam install --yes cn ocamlformat.0.27.0
84-
85-
- name: Check CN code formatting
86-
run: |
87-
opam switch ${{ matrix.version }}
88-
eval $(opam env --switch=${{ matrix.version }})
89-
dune build @fmt
76+
opam install --yes cn
9077
9178
- name: Checkout cn-tutorial
9279
uses: actions/checkout@v4

.github/workflows/spec-testing.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,6 @@ jobs:
3232
- name: System dependencies (ubuntu)
3333
run: |
3434
sudo apt-get install build-essential libgmp-dev z3 opam cmake lcov
35-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
36-
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
37-
sudo add-apt-repository "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
38-
sudo apt-get update
39-
sudo apt-get install clang-19 clang-format-19
40-
41-
- name: Check LibCN code formatting
42-
run: |
43-
find runtime/libcn/ -iname '*.h' -o -iname '*.c' | xargs clang-format-19 --dry-run -Werror
44-
45-
- name: Check Clang warnings
46-
run: |
47-
find runtime/libcn/ -iname '*.c' | xargs clang-19 -I runtime/libcn/include/ -fsyntax-only -Werror
4835
4936
- name: Restore OPAM cache
5037
id: cache-opam-restore
@@ -68,13 +55,6 @@ jobs:
6855
path: ~/.opam
6956
key: ${{ matrix.version }}
7057

71-
# - name: Install Cerberus-lib
72-
# run: |
73-
# opam switch ${{ matrix.version }}
74-
# eval $(opam env --switch=${{ matrix.version }})
75-
# opam pin --yes --no-action add cerberus-lib .
76-
# opam install --yes cerberus-lib
77-
7858
- name: Install CN
7959
run: |
8060
opam switch ${{ matrix.version }}

.github/workflows/style.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Check style of codebase
2+
name: Style
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
ocaml-format:
12+
name: OCamlFormat
13+
14+
runs-on: ubuntu-22.04
15+
16+
steps:
17+
- name: Checkout CN
18+
uses: actions/checkout@v4
19+
20+
- name: Install OCamlFormat
21+
run: |
22+
sudo apt-get install opam
23+
opam init --yes --no-setup --shell=sh --compiler=5.2.0
24+
eval $(opam env)
25+
opam install ocamlformat.0.27.0
26+
27+
- name: Check CN code formatting
28+
run: |
29+
eval $(opam env)
30+
dune build @fmt
31+
32+
clang-format:
33+
name: ClangFormat
34+
35+
runs-on: ubuntu-22.04
36+
37+
steps:
38+
- name: Checkout CN
39+
uses: actions/checkout@v4
40+
41+
- name: Install ClangFormat
42+
run: |
43+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
44+
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
45+
sudo add-apt-repository "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
46+
sudo apt-get update
47+
sudo apt-get install clang-format-19
48+
49+
- name: Check LibCN code formatting
50+
run: |
51+
find runtime/libcn/ -iname '*.h' -o -iname '*.c' | xargs clang-format-19 --dry-run -Werror
52+
53+
clang-warnings:
54+
name: Clang warnings
55+
56+
runs-on: ubuntu-22.04
57+
58+
steps:
59+
- name: Checkout CN
60+
uses: actions/checkout@v4
61+
62+
- name: Install Clang
63+
run: |
64+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
65+
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
66+
sudo add-apt-repository "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
67+
sudo apt-get update
68+
sudo apt-get install clang-19
69+
70+
- name: Check Clang warnings
71+
run: |
72+
find runtime/libcn/ -iname '*.c' | xargs clang-19 -I runtime/libcn/include/ -fsyntax-only -Werror
73+
74+
gcc-warnings:
75+
name: GCC warnings
76+
77+
runs-on: ubuntu-22.04
78+
79+
steps:
80+
- name: Checkout CN
81+
uses: actions/checkout@v4
82+
83+
- name: Install GCC
84+
run: |
85+
sudo apt-get install gcc-15
86+
87+
- name: Check GCC warnings
88+
run: |
89+
find runtime/libcn/ -iname '*.c' | xargs gcc-19 -I runtime/libcn/include/ -fsyntax-only -Werror

0 commit comments

Comments
 (0)