File tree Expand file tree Collapse file tree 4 files changed +51
-6
lines changed
Expand file tree Collapse file tree 4 files changed +51
-6
lines changed Original file line number Diff line number Diff line change 5252 pip3 install --user black
5353 black --version
5454 gcc --version
55- git clone -b v0.8.31 --depth 1 https://github.com/citusdata/tools.git ../tools
56- sudo make -C ../tools install
57- install_uncrustify
58- rm -rf uncrustify*
55+ # Install uncrustify the Citus way
56+ make -C ci -f tools.mk tools
5957
6058 - name : Check code formatting and banned function
6159 if : ${{ env.TEST == 'linting' }}
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ endif
191191.PHONY : indent
192192indent :
193193 citus_indent
194- black .
194+ black --exclude=ci/tools .
195195
196196# make lint; is an alias for make spellcheck
197197# make linting; is an alias for make spellcheck
@@ -203,7 +203,7 @@ lint linting: spellcheck ;
203203.PHONY : spellcheck
204204spellcheck :
205205 citus_indent --check
206- black --check .
206+ black --exclude=ci/tools -- check .
207207 ci/banned.h.sh
208208
209209#
Original file line number Diff line number Diff line change 1+ FROM debian:bullseye-slim
2+
3+ RUN apt-get update \
4+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
5+ build-essential \
6+ ca-certificates \
7+ curl \
8+ git \
9+ gawk \
10+ make \
11+ cmake \
12+ python3 \
13+ sudo \
14+ && rm -rf /var/lib/apt/lists/*
15+
16+ WORKDIR /usr/src/pg_auto_failover/ci
17+ COPY tools.mk ./
18+
19+ WORKDIR /usr/src/pg_auto_failover
20+ RUN make -C ci -f tools.mk tools
Original file line number Diff line number Diff line change 1+ #
2+ # Install CI tools, mostly Citus style checker and linter for C code.
3+ #
4+ # See https://github.com/citusdata/citus/blob/main/STYLEGUIDE.md
5+ #
6+
7+ CITUS_TOOLS = https://github.com/citusdata/tools.git
8+ UNCRUSTIFY = https://github.com/uncrustify/uncrustify/archive/uncrustify-0.68.1.tar.gz
9+ UNCRUSTIFY_DIR = uncrustify-uncrustify-0.68.1
10+
11+ CMAKE_OPTS = -DCMAKE_POLICY_VERSION_MINIMUM=3.5
12+
13+ tools : citus-tools ;
14+
15+ mkdir :
16+ mkdir tools
17+
18+ uncrustify : mkdir
19+ curl -L $(UNCRUSTIFY ) | tar -C tools -xz
20+ mkdir tools/$(UNCRUSTIFY_DIR ) /build
21+ cd tools/$(UNCRUSTIFY_DIR ) /build && cmake $(CMAKE_OPTS ) ..
22+ make -C tools/$(UNCRUSTIFY_DIR ) /build -j5
23+ sudo make -C tools/$(UNCRUSTIFY_DIR ) /build install
24+
25+ citus-tools : uncrustify
26+ git clone --depth 1 $(CITUS_TOOLS ) tools/tools
27+ sudo make -C tools/tools uncrustify/.install
You can’t perform that action at this time.
0 commit comments