Skip to content

Commit 3685828

Browse files
committed
Merge commit '5fe40b063bcf511ad3b7bf704cf292578ab2bc1c' as 'c_src/libpg_query'
2 parents eae3aef + d1300e4 commit 3685828

File tree

815 files changed

+755792
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

815 files changed

+755792
-0
lines changed

c_src/libpg_query/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sql binary
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-20.04]
12+
compiler: [clang, gcc]
13+
protobuf_lib: [protobuf-c, protobuf-cpp]
14+
valgrind: [valgrind,no-valgrind]
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
- name: Cache protobuf library
19+
if: matrix.protobuf_lib == 'protobuf-cpp'
20+
id: cache-protobuf
21+
uses: actions/cache@v4
22+
with:
23+
path: protobuf-25.1
24+
key: ${{ runner.os }}-protobuf-25.1
25+
- name: Build protobuf library
26+
if: matrix.protobuf_lib == 'protobuf-cpp' && steps.cache-protobuf.outputs.cache-hit != 'true'
27+
run: |
28+
git clone --depth 1 --branch v25.1 https://github.com/protocolbuffers/protobuf.git protobuf-25.1
29+
cd protobuf-25.1
30+
git submodule update --init --recursive
31+
cmake .
32+
cmake --build . --parallel 10
33+
- name: Install protobuf library
34+
if: matrix.protobuf_lib == 'protobuf-cpp'
35+
run: |
36+
cd protobuf-25.1
37+
sudo make install
38+
sudo ldconfig
39+
- name: Install Valgrind
40+
if: matrix.valgrind == 'valgrind'
41+
run: sudo apt update && sudo apt install -y valgrind
42+
- name: Determine make flags
43+
id: make_flags
44+
run: |
45+
if [ "$PROTOBUF_LIB" = protobuf-cpp ]
46+
then
47+
echo "::set-output name=proto_flags::USE_PROTOBUF_CPP=1"
48+
else
49+
echo "::set-output name=proto_flags::"
50+
fi
51+
if [ "$COMPILER" = clang ]
52+
then
53+
echo "::set-output name=compiler_flags::CC=clang CXX=clang"
54+
elif [ "$COMPILER" = gcc ]
55+
then
56+
echo "::set-output name=compiler_flags::CC=gcc CXX=g++"
57+
else
58+
echo "::set-output name=compiler_flags::"
59+
fi
60+
if [ "$VALGRIND" = valgrind ]
61+
then
62+
echo "::set-output name=debug_flags::VALGRIND=1 DEBUG=1"
63+
else
64+
echo "::set-output name=debug_flags::"
65+
fi
66+
env:
67+
PROTOBUF_LIB: ${{ matrix.protobuf_lib }}
68+
COMPILER: ${{ matrix.compiler }}
69+
VALGRIND: ${{ matrix.valgrind }}
70+
- name: Build and run tests
71+
run: make $FLAGS
72+
env:
73+
FLAGS: ${{ format('{0} {1} {2}', steps.make_flags.outputs.proto_flags, steps.make_flags.outputs.compiler_flags, steps.make_flags.outputs.debug_flags) }}
74+
build_macos:
75+
runs-on: macos-latest
76+
steps:
77+
- name: Check out code
78+
uses: actions/checkout@v4
79+
- name: Build and run tests
80+
run: make
81+
build_windows_msvc:
82+
runs-on: windows-latest
83+
strategy:
84+
fail-fast: false
85+
matrix:
86+
arch: [x64, x86]
87+
steps:
88+
- name: Configure MSVC developer console
89+
uses: ilammy/msvc-dev-cmd@v1
90+
with:
91+
arch: ${{ matrix.arch }}
92+
- name: Check out code
93+
uses: actions/checkout@v4
94+
- name: Build and run tests
95+
run: nmake /F Makefile.msvc
96+
build_windows_msys2:
97+
runs-on: windows-latest
98+
strategy:
99+
fail-fast: false
100+
matrix:
101+
sys: [mingw64, mingw32, ucrt64, clang64]
102+
steps:
103+
- name: Set up MSYS2 and compiler
104+
uses: msys2/setup-msys2@v2
105+
with:
106+
msystem: ${{matrix.sys}}
107+
pacboy: >-
108+
toolchain:p
109+
install: >-
110+
make
111+
diffutils
112+
- name: Check out code
113+
uses: actions/checkout@v4
114+
- name: Build and run tests
115+
shell: msys2 {0}
116+
run: |
117+
make

c_src/libpg_query/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
postgres/*
2+
postgres.tar.bz2
3+
4+
*.o
5+
*.a
6+
*.obj
7+
pg_query.lib
8+
9+
examples/*
10+
!examples/*.c
11+
12+
test/*
13+
!test/*.c
14+
!test/*.sql
15+
!test/*.expected.json
16+
!test/valgrind.supp
17+
!test/**/
18+
test/*.dSYM
19+
20+
tmp/*
21+
!tmp/.gitkeep
22+
23+
.vs/*

c_src/libpg_query/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.2

0 commit comments

Comments
 (0)