Skip to content

Commit 4053ea8

Browse files
committed
Merge branch 'master' into metacache
2 parents 76ddfee + 2603082 commit 4053ea8

File tree

303 files changed

+14232
-15546
lines changed

Some content is hidden

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

303 files changed

+14232
-15546
lines changed

.github/workflows/main.yml

Lines changed: 75 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,73 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os:
16-
- macOS-latest
1716
- windows-2016
1817
- windows-2019
19-
- windows-2022
20-
- ubuntu-20.04
2118
platform: [x64, x86]
2219
include:
2320
- os: ubuntu-18.04
2421
platform: x64
2522
container: alpine:3.14
26-
exclude:
27-
- os: macOS-latest
28-
platform: x86
2923
- os: ubuntu-20.04
24+
platform: x64
25+
compiler: clang
26+
- os: ubuntu-20.04
27+
platform: x64
28+
container: asfernandes/firebird-builder:x86_64-5
29+
- os: ubuntu-20.04
30+
platform: x86
31+
# This build is failing at actions/upload-artifact when using the "container" way.
32+
#container: asfernandes/firebird-builder:i586-5
33+
docker: "docker"
34+
- os: windows-2022
35+
platform: x64
36+
docker: "docker"
37+
- os: windows-2022
38+
platform: x86
39+
docker: "docker"
40+
- os: windows-2022
41+
platform: x64
42+
- os: windows-2022
3043
platform: x86
44+
- os: macOS-latest
45+
platform: x64
3146

3247
steps:
3348
- uses: actions/checkout@v1
3449
with:
3550
fetch-depth: 10
3651

37-
- name: Prepare (Linux)
38-
if: matrix.os == 'ubuntu-20.04' && !startsWith(matrix.container, 'alpine')
52+
- name: Prepare (Ubuntu)
53+
if: startsWith(matrix.os, 'ubuntu-') && !matrix.container && !matrix.docker
3954
run: |
4055
sudo apt-get install libtool-bin libtomcrypt1 libtomcrypt-dev libtommath1 libtommath-dev libicu-dev zlib1g-dev
4156
42-
- name: Build (Linux)
43-
if: matrix.os == 'ubuntu-20.04' && !startsWith(matrix.container, 'alpine')
57+
- name: Build (Ubuntu)
58+
if: startsWith(matrix.os, 'ubuntu-') && !matrix.container && !matrix.docker
4459
run: |
4560
CC=clang CXX=clang++ ./autogen.sh --enable-binreloc --prefix=/opt/firebird
4661
make -j4
4762
make dist
4863
tar xzvf gen/Firebird-[0-9]*.tar.gz
4964
(cd Firebird-[0-9]*; sudo ./install.sh -silent)
5065
66+
- name: Build (Linux, Docker)
67+
if: startsWith(matrix.container, 'asfernandes/firebird-builder')
68+
run: /entry.sh
69+
70+
# asfernandes/firebird-builder:i586-5
71+
- name: Build (Linux, Docker)
72+
if: startsWith(matrix.os, 'ubuntu-') && matrix.docker
73+
run: |
74+
cd builds/docker/linux/i586-x86_64
75+
./run-i586.sh
76+
5177
- name: Prepare (Linux, Alpine)
52-
if: matrix.os == 'ubuntu-18.04' && startsWith(matrix.container, 'alpine')
78+
if: startsWith(matrix.container, 'alpine')
5379
run: apk update && apk --no-cache --update add build-base libtool git autoconf automake zlib-dev icu-dev ncurses-dev libedit-dev linux-headers tar
5480

5581
- name: Build (Linux, Alpine)
56-
if: matrix.os == 'ubuntu-18.04' && startsWith(matrix.container, 'alpine')
82+
if: startsWith(matrix.container, 'alpine')
5783
run: |
5884
./autogen.sh --enable-binreloc-threads --with-builtin-tommath --with-builtin-tomcrypt --prefix=/opt/firebird
5985
make -j4
@@ -127,7 +153,7 @@ jobs:
127153
for /r %%i in (*.bat) do unix2dos "%%i"
128154
129155
- name: Build (Windows)
130-
if: startsWith(matrix.os, 'windows-')
156+
if: startsWith(matrix.os, 'windows-') && !matrix.docker
131157
shell: cmd
132158
env:
133159
PLATFORM: ${{ matrix.platform }}
@@ -143,19 +169,37 @@ jobs:
143169
cd builds\win32
144170
run_all.bat JUSTBUILD
145171
146-
- name: Upload (Linux)
147-
if: matrix.os == 'ubuntu-20.04' && !startsWith(matrix.container, 'alpine')
172+
- name: Build (Windows, Docker)
173+
if: startsWith(matrix.os, 'windows-') && matrix.docker
174+
shell: cmd
175+
env:
176+
PLATFORM: ${{ matrix.platform }}
177+
run: |
178+
mkdir output
179+
cd builds\docker\windows
180+
call build.bat
181+
call run.bat C:\fbscripts\build-%PLATFORM%.bat
182+
183+
- name: Upload (Ubuntu)
184+
if: startsWith(matrix.os, 'ubuntu-') && !matrix.container && !matrix.docker
185+
uses: actions/upload-artifact@main
186+
with:
187+
name: firebird-ubuntu-20.04-clang-${{ matrix.platform }}
188+
path: gen/Firebird-*.tar.gz
189+
190+
- name: Upload (Linux, Docker)
191+
if: startsWith(matrix.container, 'asfernandes/firebird-builder') || (startsWith(matrix.os, 'ubuntu-') && matrix.docker)
148192
uses: actions/upload-artifact@main
149193
with:
150194
name: firebird-linux-${{ matrix.platform }}
151-
path: gen/Firebird-[0-9]*.tar.gz
195+
path: gen/Firebird-*.tar.gz
152196

153197
- name: Upload (Linux, Alpine)
154-
if: matrix.os == 'ubuntu-18.04' && startsWith(matrix.container, 'alpine')
155-
uses: actions/upload-artifact@master
198+
if: startsWith(matrix.container, 'alpine')
199+
uses: actions/upload-artifact@main
156200
with:
157-
name: firebird-linux-alpine
158-
path: gen/Firebird-[0-9]*.tar.gz
201+
name: firebird-alpine-x64
202+
path: gen/Firebird-*.tar.gz
159203

160204
- name: Upload (MacOS)
161205
if: matrix.os == 'macOS-latest'
@@ -165,15 +209,22 @@ jobs:
165209
path: gen/artifacts
166210

167211
- name: Upload (Windows x64)
168-
if: startsWith(matrix.os, 'windows-') && matrix.platform == 'x64'
212+
if: startsWith(matrix.os, 'windows-') && !matrix.docker && matrix.platform == 'x64'
169213
uses: actions/upload-artifact@main
170214
with:
171-
name: firebird-windows-x64-vs-${{ env.VS_VERSION }}
215+
name: firebird-windows-vs-${{ env.VS_VERSION }}-x64
172216
path: output_x64
173217

174218
- name: Upload (Windows x86)
175-
if: startsWith(matrix.os, 'windows-') && matrix.platform == 'x86'
219+
if: startsWith(matrix.os, 'windows-') && !matrix.docker && matrix.platform == 'x86'
176220
uses: actions/upload-artifact@main
177221
with:
178-
name: firebird-windows-x86-vs-${{ env.VS_VERSION }}
222+
name: firebird-windows-vs-${{ env.VS_VERSION }}-x86
179223
path: output_win32
224+
225+
- name: Upload (Windows, Docker)
226+
if: startsWith(matrix.os, 'windows-') && matrix.docker
227+
uses: actions/upload-artifact@main
228+
with:
229+
name: firebird-windows-${{ matrix.platform }}
230+
path: output

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ endif()
155155
set(FB_PREFIX ${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME})
156156
set(FB_IPC_NAME "FirebirdIPI")
157157
set(FB_LOGFILENAME "firebird.log")
158-
set(FB_PIPE_NAME "interbas")
159158
set(FB_SERVICE_NAME "gds_db")
160159
set(FB_SERVICE_PORT 3050)
161160

builds/cmake/SourceGroups.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ source_group("ISQL files\\${EPP_TXT}" "${SSRC}/isql/${EPP}")
4242
source_group("ISQL files\\${GEN_TXT}" "${BSRC}/isql/${GEN}")
4343
source_group("JRD files" "${SSRC}/jrd/${CPP}")
4444
source_group("JRD files\\Data Access" "${SSRC}/jrd/recsrc/${CPP}")
45+
source_group("JRD files\\Optimizer" "${SSRC}/jrd/optimizer/${CPP}")
46+
source_group("JRD files\\Replication" "${SSRC}/jrd/replication/${CPP}")
4547
source_group("JRD files\\EXTDS" "${SSRC}/jrd/extds/${CPP}")
4648
source_group("JRD files\\${EPP_TXT}" "${SSRC}/jrd/${EPP}")
4749
source_group("JRD files\\${GEN_TXT}" "${BSRC}/jrd/${GEN}")
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
ARG CPUCOUNT=6
2+
3+
ARG GCC_VERSION=10.3.0
4+
ARG LIBTOOL_VERSION=2.4.6
5+
ARG MAKE_VERSION=4.3
6+
ARG BINUTILS_VERSION=2.37
7+
ARG NCURSES_VERSION=6.3
8+
ARG ICU_VERSION=70_1
9+
10+
ARG BASE=ubuntu:raring
11+
ARG BUILD_ARCH=x86_64-pc-linux-gnu
12+
ARG LIBDIR=/usr/lib/x86_64-linux-gnu
13+
14+
FROM ubuntu:focal as downloader
15+
16+
ARG GCC_VERSION
17+
ARG LIBTOOL_VERSION
18+
ARG MAKE_VERSION
19+
ARG BINUTILS_VERSION
20+
ARG NCURSES_VERSION
21+
ARG ICU_VERSION
22+
23+
RUN \
24+
apt-get -y update && \
25+
apt-get -y install curl xz-utils && \
26+
rm -rf /var/lib/apt/lists/* && \
27+
\
28+
mkdir /work && \
29+
cd /work && \
30+
\
31+
echo Downloading tools and libraries && \
32+
curl -SL --output gcc-${GCC_VERSION}.tar.xz https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz && \
33+
curl -SL --output libtool-${LIBTOOL_VERSION}.tar.gz https://ftpmirror.gnu.org/libtool/libtool-${LIBTOOL_VERSION}.tar.gz && \
34+
curl -SL --output make-${MAKE_VERSION}.tar.bz2 https://ftp.gnu.org/gnu/make/make-${MAKE_VERSION}.tar.gz && \
35+
curl -SL --output binutils-${BINUTILS_VERSION}.tar.bz2 https://mirror.nbtelecom.com.br/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.bz2 && \
36+
curl -SL --output ncurses-${NCURSES_VERSION}.tar.gz https://ftp.gnu.org/pub/gnu/ncurses/ncurses-${NCURSES_VERSION}.tar.gz && \
37+
curl -SL --output icu4c-${ICU_VERSION}-src.tgz https://github.com/unicode-org/icu/releases/download/release-`echo ${ICU_VERSION} | tr _ -`/icu4c-${ICU_VERSION}-src.tgz
38+
39+
FROM $BASE
40+
41+
ARG CPUCOUNT
42+
ARG GCC_VERSION
43+
ARG LIBTOOL_VERSION
44+
ARG MAKE_VERSION
45+
ARG BINUTILS_VERSION
46+
ARG NCURSES_VERSION
47+
ARG ICU_VERSION
48+
49+
ARG BUILD_ARCH
50+
ARG LIBDIR
51+
52+
COPY --from=downloader /work /work
53+
54+
RUN \
55+
sed -i 's/archive/old-releases/g' /etc/apt/sources.list && \
56+
apt-get -y update && \
57+
apt-get -y install curl xz-utils lbzip2 bzip2 m4 gcc g++ make libtool autoconf libtommath-dev zlib1g-dev unzip && \
58+
rm -rf /var/lib/apt/lists/* && \
59+
\
60+
cd /work && \
61+
mkdir -p /work/gcc-${GCC_VERSION}-src && \
62+
tar -xvf gcc-${GCC_VERSION}.tar.xz --strip 1 -C gcc-${GCC_VERSION}-src && \
63+
rm gcc-${GCC_VERSION}.tar.xz && \
64+
cd gcc-${GCC_VERSION}-src && \
65+
./contrib/download_prerequisites && \
66+
\
67+
cd /work && \
68+
mkdir -p /work/libtool-${LIBTOOL_VERSION}-src && \
69+
tar -xzvf libtool-${LIBTOOL_VERSION}.tar.gz --strip 1 -C libtool-${LIBTOOL_VERSION}-src && \
70+
rm libtool-${LIBTOOL_VERSION}.tar.gz && \
71+
\
72+
cd /work && \
73+
mkdir -p /work/make-${MAKE_VERSION}-src && \
74+
tar -xzvf make-${MAKE_VERSION}.tar.bz2 --strip 1 -C make-${MAKE_VERSION}-src && \
75+
rm make-${MAKE_VERSION}.tar.bz2 && \
76+
\
77+
cd /work && \
78+
mkdir -p /work/binutils-${BINUTILS_VERSION}-src && \
79+
tar -xjvf binutils-${BINUTILS_VERSION}.tar.bz2 --strip 1 -C binutils-${BINUTILS_VERSION}-src && \
80+
rm binutils-${BINUTILS_VERSION}.tar.bz2 && \
81+
\
82+
cd /work && \
83+
mkdir -p /work/ncurses-${NCURSES_VERSION}-src && \
84+
tar -xzvf ncurses-${NCURSES_VERSION}.tar.gz --strip 1 -C ncurses-${NCURSES_VERSION}-src && \
85+
rm ncurses-${NCURSES_VERSION}.tar.gz && \
86+
\
87+
cd /work && \
88+
mkdir /work/icu-${ICU_VERSION}-src && \
89+
tar xzvf icu4c-${ICU_VERSION}-src.tgz --strip 1 -C icu-${ICU_VERSION}-src && \
90+
rm icu4c-${ICU_VERSION}-src.tgz && \
91+
\
92+
mkdir /work/gcc-${GCC_VERSION}-build && \
93+
cd /work/gcc-${GCC_VERSION}-build && \
94+
/work/gcc-${GCC_VERSION}-src/configure --build=${BUILD_ARCH} --prefix=/opt/gcc-${GCC_VERSION} --enable-languages=c,c++ --enable-bootstrap --enable-threads=posix --disable-multilib && \
95+
make -j${CPUCOUNT} && \
96+
make install && \
97+
\
98+
export LD_LIBRARY_PATH=/opt/gcc-${GCC_VERSION}/lib:/opt/gcc-${GCC_VERSION}/lib64 && \
99+
export LD_RUN_PATH=/opt/gcc-${GCC_VERSION}/lib:/opt/gcc-${GCC_VERSION}/lib64 && \
100+
export PATH=/opt/gcc-${GCC_VERSION}/bin:$PATH && \
101+
\
102+
mkdir /work/libtool-${LIBTOOL_VERSION}-build && \
103+
cd /work/libtool-${LIBTOOL_VERSION}-build && \
104+
/work/libtool-${LIBTOOL_VERSION}-src/configure --build=${BUILD_ARCH} --prefix=/opt/libtool-${LIBTOOL_VERSION} && \
105+
make -j${CPUCOUNT} && \
106+
make install && \
107+
\
108+
export PATH=/opt/libtool-${LIBTOOL_VERSION}/bin:$PATH && \
109+
\
110+
mkdir /work/make-${MAKE_VERSION}-build && \
111+
cd /work/make-${MAKE_VERSION}-build && \
112+
/work/make-${MAKE_VERSION}-src/configure --build=${BUILD_ARCH} --prefix=/opt/make-${MAKE_VERSION} && \
113+
make -j${CPUCOUNT} && \
114+
make install && \
115+
\
116+
export PATH=/opt/make-${MAKE_VERSION}/bin:$PATH && \
117+
\
118+
mkdir /work/binutils-${BINUTILS_VERSION}-build && \
119+
cd /work/binutils-${BINUTILS_VERSION}-build && \
120+
/work/binutils-${BINUTILS_VERSION}-src/configure --build=${BUILD_ARCH} --prefix=/opt/binutils-${BINUTILS_VERSION} && \
121+
make -j${CPUCOUNT} && \
122+
make install && \
123+
\
124+
export PATH=/opt/binutils-${BINUTILS_VERSION}/bin:$PATH && \
125+
\
126+
mkdir /work/ncurses-${NCURSES_VERSION}-build && \
127+
cd /work/ncurses-${NCURSES_VERSION}-build && \
128+
/work/ncurses-${NCURSES_VERSION}-src/configure \
129+
--build=${BUILD_ARCH} \
130+
--prefix=/usr \
131+
--libdir=${LIBDIR} \
132+
--disable-db-install \
133+
--disable-termcap \
134+
--without-ada \
135+
--without-cxx \
136+
--without-cxx-binding \
137+
--without-develop \
138+
--without-tests \
139+
--without-progs \
140+
--with-default-terminfo-dir=/etc/terminfo \
141+
--with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo" \
142+
&& \
143+
make -j${CPUCOUNT} && \
144+
make install && \
145+
\
146+
mkdir /work/icu-${ICU_VERSION}-build && \
147+
cd /work/icu-${ICU_VERSION}-build && \
148+
/work/icu-${ICU_VERSION}-src/source/runConfigureICU Linux --prefix=/opt/icu && \
149+
make -j${CPUCOUNT} && \
150+
make install && \
151+
\
152+
rm -rf /work
153+
154+
COPY scripts/* /
155+
156+
ENV LD_LIBRARY_PATH=/opt/gcc-${GCC_VERSION}/lib:/opt/gcc-${GCC_VERSION}/lib64
157+
ENV LD_RUN_PATH=/opt/gcc-${GCC_VERSION}/lib:/opt/gcc-${GCC_VERSION}/lib64
158+
ENV PATH=/opt/gcc-${GCC_VERSION}/bin:$PATH
159+
160+
ENV PATH=/opt/libtool-${LIBTOOL_VERSION}/bin:$PATH
161+
162+
ENV PATH=/opt/make-${MAKE_VERSION}/bin:$PATH
163+
164+
ENV PATH=/opt/binutils-${BINUTILS_VERSION}/bin:$PATH
165+
166+
ENV LIBRARY_PATH=/opt/icu/lib
167+
ENV LD_LIBRARY_PATH=/opt/icu/lib:$LD_LIBRARY_PATH
168+
ENV C_INCLUDE_PATH=/opt/icu/include
169+
ENV CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH
170+
171+
ENV BUILD_ARCH=$BUILD_ARCH
172+
173+
ENV CPUCOUNT=$CPUCOUNT
174+
175+
WORKDIR /firebird
176+
177+
ENTRYPOINT ["/entry.sh"]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
docker build \
3+
--build-arg BASE=i386/ubuntu:vivid \
4+
--build-arg BUILD_ARCH=i586-pc-linux-gnu \
5+
--build-arg LIBDIR=/lib/i386-linux-gnu \
6+
-t asfernandes/firebird-builder:i586-5 .
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
docker build \
3+
--build-arg BASE=ubuntu:raring \
4+
--build-arg BUILD_ARCH=x86_64-pc-linux-gnu \
5+
--build-arg LIBDIR=/usr/lib/x86_64-linux-gnu \
6+
-t asfernandes/firebird-builder:x86_64-5 .
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
set -e
3+
4+
docker push asfernandes/firebird-builder:x86_64-5
5+
docker push asfernandes/firebird-builder:i586-5
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
docker run --rm --user `id -u`:`id -g` -v `pwd`/../../../..:/firebird -t asfernandes/firebird-builder:i586-5
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
docker run --rm --user `id -u`:`id -g` -v `pwd`/../../../..:/firebird -t asfernandes/firebird-builder:x86_64-5
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
# FIXME: Resolve this with a configure option.
4+
sed -i 's/AC_CHECK_LIB(atomic, main)/AC_CHECK_LIB(:libatomic.a, main)/g' configure.ac
5+
6+
./autogen.sh --build=$BUILD_ARCH --prefix=/opt/firebird --enable-binreloc --with-builtin-tomcrypt --with-termlib=:libncurses.a
7+
make -j${CPUCOUNT}
8+
make dist

0 commit comments

Comments
 (0)