👷 Add CI pipeline
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Andreas Schneider 2022-07-28 19:37:28 +02:00
parent d30b95f857
commit 816017d4f1
2 changed files with 47 additions and 0 deletions

11
.drone.yml Normal file
View File

@ -0,0 +1,11 @@
kind: pipeline
name: default
steps:
- name: build
image: git.aksdb.de/aksdb/centred:builder-220724
commands:
- ~/lazarus/lazbuild --lazarusdir=~/lazarus --build-mode="Release.win32" -B Client/CentrED.lpr
- ~/lazarus/lazbuild --lazarusdir=~/lazarus --build-mode="Release.Linux.x64" -B Client/CentrED.lpr
- ~/lazarus/lazbuild --lazarusdir=~/lazarus --build-mode="Release.win32" -B Server/cedserver.lpi
- ~/lazarus/lazbuild --lazarusdir=~/lazarus --build-mode="Release.Linux.x64" -B Server/cedserver.lpi

36
Dockerfile.builder Normal file
View File

@ -0,0 +1,36 @@
FROM ubuntu:jammy
RUN apt update && \
apt install -y libgtk2.0-dev libgl-dev binutils-mingw-w64-i686 git wget && \
rm -rf /var/lib/apt/lists/* && \
ln -s /usr/bin/i686-w64-mingw32-windres /usr/bin/i386-win32-windres && \
ln -s /usr/bin/i686-w64-mingw32-windres /usr/bin/windres
RUN cd /root && \
export FPCVERSION=3.2.2 && \
export LAZVERSION=2.2.2 && \
wget --content-disposition https://sourceforge.net/projects/freepascal/files/Linux/$FPCVERSION/fpc-$FPCVERSION.x86_64-linux.tar/download && \
wget --content-disposition https://sourceforge.net/projects/freepascal/files/Source/$FPCVERSION/fpc-$FPCVERSION.source.tar.gz/download && \
tar xf fpc-$FPCVERSION.x86_64-linux.tar && \
cd fpc-$FPCVERSION.x86_64-linux && \
echo "/usr" | ./install.sh && \
cd .. && \
tar xf fpc-$FPCVERSION.source.tar.gz && \
cd fpc-$FPCVERSION && \
make crossinstall INSTALL_PREFIX=/usr OS_TARGET=win32 CPU_TARGET=i386 && \
make clean && \
ln -s /usr/lib/fpc/$FPCVERSION/ppcross386 /usr/bin/ppcross386 && \
cd .. && \
wget --content-disposition https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%20$LAZVERSION/lazarus-$LAZVERSION-0.tar.gz/download && \
tar xf lazarus-$LAZVERSION-0.tar.gz && \
cd lazarus && \
make lazbuild && \
cd /root && \
rm -rf *.tar.gz fpc-$FPCVERSION*
RUN cd /root && \
git clone --depth 1 https://github.com/blikblum/multilog && \
git clone --depth 1 https://github.com/almindor/lnet && \
~/lazarus/lazbuild --lazarusdir=~/lazarus --add-package-link ~/multilog/multiloglaz.lpk && \
~/lazarus/lazbuild --lazarusdir=~/lazarus --add-package-link ~/lnet/lazaruspackage/lnetbase.lpk && \
~/lazarus/lazbuild --lazarusdir=~/lazarus --add-package-link ~/lnet/lazaruspackage/lnetvisual.lpk