Skip to content

Commit

Permalink
Merge pull request #223 from costateixeira/build-again
Browse files Browse the repository at this point in the history
get linux online build to work again
  • Loading branch information
grahamegrieve authored Dec 17, 2023
2 parents 24b8d7e + 4e74373 commit 4d408a0
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 106 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/linux-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
pull_request:
# pull_request:
jobs:
Build-Docker-Image:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -39,9 +39,10 @@ jobs:
docker build \
--tag fhirserver \
.
- name: Scan Code
run: |
docker run --entrypoint /work/fhirserver/utilities/codescan/codescan fhirserver /work/bootstrap
# - name: Scan Code
# run: |
# export DISPLAY=0:0
# docker run --entrypoint /work/fhirserver/utilities/codescan/codescan fhirserver /work/bootstrap
- name: Prepare ini file
env:
FHIRSERVER_LOCATIONS_CLONE_PATH: /work/fhirserver
Expand Down Expand Up @@ -72,8 +73,15 @@ jobs:
-v ~/test-settings.ini:/work/fhirserver/exec/64/test-settings.ini \
fhirserver -tests
- name: Tag and push Docker image
run: |
docker tag fhirserver ${{ secrets.DOCKERHUB_USERNAME }}/fhirserver:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/fhirserver:latest
# - name: Tag and push Docker image
# run: |
# # Extract the FHIR server version from the library/version.inc file
# FHIR_VERSION=$(grep -oP "FHIR_CODE_FULL_VERSION = '\K[^']+" library/version.inc)
#
# # Tag the Docker image with the extracted version and "latest"
# docker tag fhirserver ${{ secrets.DOCKERHUB_USERNAME }}/fhirserver:$FHIR_VERSION
# docker tag fhirserver ${{ secrets.DOCKERHUB_USERNAME }}/fhirserver:latest
#
# # Push both tagged images to Docker Hub
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/fhirserver:$FHIR_VERSION
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/fhirserver:latest
24 changes: 22 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
FROM ubuntu:20.04 as builder
FROM ubuntu:22.04 as builder

ENV DEBIAN_FRONTEND=noninteractive


RUN apt update && apt install -y tzdata wget git unixodbc-dev libgtk2.0-dev xvfb sqlite3 libsqlite3-dev build-essential

# Download and build OpenSSL 1.1.1w
WORKDIR /tmp
RUN wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz \
&& tar -xf openssl-1.1.1w.tar.gz \
&& cd openssl-1.1.1w \
&& ./config \
&& make \
&& make test \
&& make install

RUN ls -la /usr/local/lib/

# Set the timezone
RUN echo "UTC" > /etc/timezone

RUN apt update && apt install -y wget git unixodbc-dev libgtk2.0-dev xvfb sqlite3 libsqlite3-dev && \
cd /tmp && \
wget https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.26-linux-glibc2.12-x86-64bit.tar.gz && \
Expand All @@ -20,7 +38,7 @@ WORKDIR /work/fhirserver
COPY . /work/fhirserver

RUN /work/bootstrap/linux-libraries.sh /work/bootstrap
RUN cp exec/pack/linux/*.so /usr/lib/
RUN cp /usr/local/lib/*.so* /usr/lib/
RUN /work/fhirserver/build/linux-fhirserver.sh /work/bootstrap
RUN cp exec/pack/*.properties exec/64

Expand All @@ -29,6 +47,8 @@ ENV PORT 80
ENV TERMINOLOGY_CACHE /terminology
VOLUME /terminology

ENV DEBIAN_FRONTEND=

RUN printf '#!/bin/bash \n\
Xvfb :99 -screen 0 1024x768x8 -nolisten tcp & \n\
echo "[web]" > /work/fhirserver/exec/64/web.ini; \n\
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Reference Implementation Server + Libraries for the FHIR Specification, written

![Build Status](https://img.shields.io/github/actions/workflow/status/HealthIntersections/fhirserver/linux-docker-build.yml?label=Build%20status)


## Basic Information

This is a set of FHIR applications written in Pascal. It is also
Expand Down
30 changes: 15 additions & 15 deletions build/linux-fhirserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,47 @@ cp exec/pack/*.cfg exec/pack/*.dat exec/64/
echo compile libraries

echo "## compile packages/fhir_fsl.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir_fsl.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir_fsl.lpk -q -q --build-all

echo "## compile packages/fhir_indy.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir_indy.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir_indy.lpk -q -q --build-all

echo "## compile packages/fcomp.lpk"
$BUILD/tools/lazarus/lazbuild packages/fcomp.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fcomp.lpk -q -q --build-all

echo "## compile packages/fhir.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir.lpk -q -q --build-all

echo "## compile packages/fhir2.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir2.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir2.lpk -q -q --build-all

echo "## compile packages/fhir3.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir3.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir3.lpk -q -q --build-all

echo "## compile packages/fhir4.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir4.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir4.lpk -q -q --build-all

echo "## compile packages/fhir4b.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir4b.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir4b.lpk -q -q --build-all

echo "## compile packages/fhir5.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir5.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir5.lpk -q -q --build-all

echo "## compile packages/fhir_xver.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir_xver.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir_xver.lpk -q -q --build-all

echo "## compile packages/fhir_fui.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir_fui.lpk -q -q
$BUILD/tools/lazarus/lazbuild packages/fhir_fui.lpk -q -q --build-all

echo "## compile codescanner"
$BUILD/tools/lazarus/lazbuild utilities/codescan/codescan.lpi --build-mode=linux -q -q
$BUILD/tools/lazarus/lazbuild utilities/codescan/codescan.lpi --build-mode=linux -q -q --build-all

echo "## compile console"
$BUILD/tools/lazarus/lazbuild server/fhirconsole.lpi --build-mode=linux -q -q
$BUILD/tools/lazarus/lazbuild server/fhirconsole.lpi --build-mode=linux -q -q --build-all

echo "## compile toolkit"
$BUILD/tools/lazarus/lazbuild toolkit2/fhirtoolkit.lpr --build-mode=linux -q -q
$BUILD/tools/lazarus/lazbuild toolkit2/fhirtoolkit.lpr --build-mode=linux -q -q --build-all

echo "## compile server"
$BUILD/tools/lazarus/lazbuild server/fhirserver.lpr --build-mode=linux -q -q
$BUILD/tools/lazarus/lazbuild server/fhirserver.lpr --build-mode=linux -q -q --build-all

22 changes: 11 additions & 11 deletions build/linux-libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,37 +82,37 @@ cd ..
# ---- register the source with lazarus ----------

echo "## compile package source/tzdb/dist/tzdb_fpc.lpk"
tools/lazarus/lazbuild source/tzdb/dist/tzdb_fpc.lpk -q
tools/lazarus/lazbuild source/tzdb/dist/tzdb_fpc.lpk -q --build-all

echo "## compile package source/extrasyn/extrahighlighters.lpk"
tools/lazarus/lazbuild source/extrasyn/extrahighlighters.lpk -q
tools/lazarus/lazbuild source/extrasyn/extrahighlighters.lpk -q --build-all

echo "## compile package source/extrasyn/extrahighlighters_dsgn.lpk"
tools/lazarus/lazbuild source/extrasyn/extrahighlighters_dsgn.lpk -q --add-package
tools/lazarus/lazbuild source/extrasyn/extrahighlighters_dsgn.lpk -q --add-package --build-all

echo "## compile package source/ZXing.Delphi/Lazarus/Package/zxing.lpk"
tools/lazarus/lazbuild source/ZXing.Delphi/Lazarus/Package/zxing.lpk -q --add-package --build-ide=
tools/lazarus/lazbuild source/ZXing.Delphi/Lazarus/Package/zxing.lpk -q --add-package --build-all --build-ide=

echo "## compile package source/lazarus-ide-tester/package/idetester.lpk"
tools/lazarus/lazbuild source/lazarus-ide-tester/package/idetester.lpk -q --add-package
tools/lazarus/lazbuild source/lazarus-ide-tester/package/idetester.lpk -q --add-package --build-all

echo "## compile package source/lazarus-ide-tester/ide/idetester_dsgn.lpk"
tools/lazarus/lazbuild source/lazarus-ide-tester/ide/idetester_dsgn.lpk -q --add-package
tools/lazarus/lazbuild source/lazarus-ide-tester/ide/idetester_dsgn.lpk -q --add-package --build-all

echo "## compile package source/HtmlViewer/package/FrameViewer09.lpk"
tools/lazarus/lazbuild source/HtmlViewer/package/FrameViewer09.lpk -q --add-package
tools/lazarus/lazbuild source/HtmlViewer/package/FrameViewer09.lpk -q --add-package --build-all

echo "## compile package source/delphi-markdown/packages/markdownengine.lpk"
tools/lazarus/lazbuild source/delphi-markdown/packages/markdownengine.lpk -q
tools/lazarus/lazbuild source/delphi-markdown/packages/markdownengine.lpk -q --build-all

echo "## compile package source/PdfiumLib/Package/Pdfium.lpk"
tools/lazarus/lazbuild source/PdfiumLib/Package/Pdfium.lpk -q --add-package
tools/lazarus/lazbuild source/PdfiumLib/Package/Pdfium.lpk -q --add-package --build-all

echo "## compile package source/delphi-markdown/tests/markdowntests.lpk"
tools/lazarus/lazbuild source/delphi-markdown/tests/markdowntests.lpk -q
tools/lazarus/lazbuild source/delphi-markdown/tests/markdowntests.lpk -q --build-all

echo "## compile package source/DelphiAST/Package/pascalast.lpk"
tools/lazarus/lazbuild source/DelphiAST/Package/pascalast.lpk --quiet
tools/lazarus/lazbuild source/DelphiAST/Package/pascalast.lpk --quiet --build-all

# ---- back to the server ----------

Expand Down
2 changes: 1 addition & 1 deletion ipsmanager/ipsmanager.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@
<CompilerMessages>
<IgnoredMessages idx5024="True"/>
</CompilerMessages>
<CustomOptions Value="-k--library-path=/home/grahame/work/fhirserver/dependencies/openssl/linux-x86_64/"/>
<CustomOptions Value="-k--library-path=/usr/local/lib64"/>
</Other>
</CompilerOptions>
<Debugging>
Expand Down
3 changes: 1 addition & 2 deletions ipsmanager/views/mvbase.pas
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unit mvBase;
unit mvbase;

{$i fhir.inc}

Expand Down Expand Up @@ -53,4 +53,3 @@ procedure TViewManager.initialize;
end;

end.

5 changes: 2 additions & 3 deletions ipsmanager/views/mvdatasources.pas
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unit mvDataSources;
unit mvdatasources;

{$i fhir.inc}

Expand All @@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils,
mvBase;

type
{ TDataSourceViewManager }

Expand All @@ -27,4 +27,3 @@ procedure TDataSourceViewManager.initialize;
end;

end.

24 changes: 12 additions & 12 deletions server/fhirconsole.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="..\exec\64\FHIRConsole"/>
<Filename Value="../exec/64/FHIRConsole"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir);..\library"/>
<Libraries Value="..\dependencies\openssl\$(TargetOS)-$(TargetCPU)"/>
<OtherUnitFiles Value="admin;tx"/>
<UnitOutputDirectory Value="lib\console\$(BuildMode)"/>
<IncludeFiles Value="$(ProjOutDir);../library"/>
<Libraries Value="/usr/local/lib64"/>
<OtherUnitFiles Value="admin;tx;../library/fsl/tests;../library/fhir/tests;../library/fhir4/tests;../library/fhir4b/tests;../library/fhir5/tests;../library/ftx/tests;../library/fxver/tests;../library/cda/tests;../library/v2/tests;../library/fdb/tests;modules;tests;admin;../library/fcomp/tests;tx"/>
<UnitOutputDirectory Value="lib/console/$(BuildMode)"/>
</SearchPaths>
<CodeGeneration>
<TargetCPU Value="x86_64"/>
Expand All @@ -138,14 +138,14 @@
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options>
<LinkerOptions Value="-R .\"/>
<LinkerOptions Value="-R ./"/>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CustomOptions Value="-k--verbose -k--library-path=/home/grahame/work/fhirserver/dependencies/openssl/linux-x86_64/"/>
<CustomOptions Value="-k--verbose -k--library-path=/usr/local/lib64"/>
</Other>
</CompilerOptions>
</Item4>
Expand Down Expand Up @@ -274,13 +274,13 @@
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="..\exec\64\FHIRConsole"/>
<Filename Value="../exec/64/FHIRConsole"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir);..\library"/>
<Libraries Value="..\dependencies\openssl\$(TargetOS)-$(TargetCPU)"/>
<OtherUnitFiles Value="admin;tx"/>
<UnitOutputDirectory Value="lib\console\$(BuildMode)"/>
<IncludeFiles Value="$(ProjOutDir);../library"/>
<Libraries Value="/usr/local/lib64"/>
<OtherUnitFiles Value="admin;tx;../library/fsl/tests;../library/fhir/tests;../library/fhir4/tests;../library/fhir4b/tests;../library/fhir5/tests;../library/ftx/tests;../library/fxver/tests;../library/cda/tests;../library/v2/tests;../library/fdb/tests;modules;tests;admin;../library/fcomp/tests;tx"/>
<UnitOutputDirectory Value="lib/console/$(BuildMode)"/>
</SearchPaths>
<CodeGeneration>
<TargetCPU Value="x86_64"/>
Expand Down
Loading

0 comments on commit 4d408a0

Please sign in to comment.