Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
costateixeira committed Jan 6, 2024
2 parents cffd5c8 + 2ca246d commit 2b8a477
Show file tree
Hide file tree
Showing 81 changed files with 3,181 additions and 1,925 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/linux-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- lastbuilt
# pull_request:
jobs:
Build-Docker-Image:
Expand Down Expand Up @@ -40,10 +39,10 @@ jobs:
docker build \
--tag fhirserver \
.
- name: Scan Code
run: |
export DISPLAY=0:0
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 @@ -74,15 +73,15 @@ jobs:
-v ~/test-settings.ini:/work/fhirserver/exec/64/test-settings.ini \
fhirserver -tests
- 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
# - 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
2 changes: 1 addition & 1 deletion build/linux-fhirserver.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo "## compile packages/fhir_fui.lpk"
$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-all
echo $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-all
Expand Down
47 changes: 29 additions & 18 deletions build/windows-fhirserver.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,56 +12,58 @@ copy ..\exec\pack\*.cfg ..\exec\64\
copy ..\exec\pack\*.dat ..\exec\64\
copy ..\exec\pack\w64\*.dll ..\exec\64\

del ..\exec\64\*.exe

IF %1.==. GOTO No1
set "tmp=%1"

:No1


echo ## compile packages/fhir_indy.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir_indy.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir_indy.lpk -q -q --build-all

echo ## compile packages/fhir_fsl.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir_fsl.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir_fsl.lpk -q -q --build-all

echo ## compile packages/fcomp.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fcomp.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fcomp.lpk -q -q --build-all

echo ## compile packages/fhir.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir.lpk -q -q --build-all

echo ## compile packages/fhir2.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir2.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir2.lpk -q -q --build-all

echo ## compile packages/fhir3.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir3.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir3.lpk -q -q --build-all

echo ## compile packages/fhir4.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir4.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir4.lpk -q -q --build-all

echo ## compile packages/fhir4b.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir4b.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir4b.lpk -q -q --build-all

echo ## compile packages/fhir5.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir5.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir5.lpk -q -q --build-all

echo ## compile packages/fhir_xver.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir_xver.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir_xver.lpk -q -q --build-all

echo ## compile packages/fhir_fui.lpk
%tmp%\tools\lazarus\lazbuild.exe packages/fhir_fui.lpk -q -q
%tmp%\tools\lazarus\lazbuild.exe packages/fhir_fui.lpk -q -q --build-all

echo ## compile code tools
%tmp%\tools\lazarus\lazbuild.exe utilities/codescan/codescan.lpi --build-mode=win64 -q -q
%tmp%\tools\lazarus\lazbuild.exe utilities/codescan/codescan.lpi --build-mode=win64 -q -q --build-all

echo ## compile console
%tmp%\tools\lazarus\lazbuild.exe server/fhirconsole.lpi --build-mode=win64 -q -q
%tmp%\tools\lazarus\lazbuild.exe server/fhirconsole.lpi --build-mode=win64 -q -q --build-all

echo ## compile server
%tmp%\tools\lazarus\lazbuild.exe server/fhirserver.lpr --build-mode=win64 -q -q
%tmp%\tools\lazarus\lazbuild.exe server/fhirserver.lpr --build-mode=win64 -q -q --build-all

echo ## compile toolkit
%tmp%\tools\lazarus\lazbuild.exe toolkit2/fhirtoolkit.lpr --build-mode=win64 -q -q
%tmp%\tools\lazarus\lazbuild.exe toolkit2/fhirtoolkit.lpr --build-mode=win64 -q -q --build-all

copy exec\64\fhirserver.exe exec\64\FHIRServer.debug.exe
del exec\64\fhirserver.exe
Expand All @@ -71,12 +73,21 @@ copy exec\64\fhirtoolkit.exe exec\64\FHIRToolkit.debug.exe
del exec\64\fhirtoolkit.exe

echo ## compile console
%tmp%\tools\lazarus\lazbuild.exe server/fhirconsole.lpi --build-mode=win64-release -q -q
%tmp%\tools\lazarus\lazbuild.exe server/fhirconsole.lpi --build-mode=win64-release -q -q --build-all

echo ## compile server
%tmp%\tools\lazarus\lazbuild.exe server/fhirserver.lpr --build-mode=win64-release -q -q
%tmp%\tools\lazarus\lazbuild.exe server/fhirserver.lpr --build-mode=win64-release -q -q --build-all

echo ## compile toolkit
%tmp%\tools\lazarus\lazbuild.exe toolkit2/fhirtoolkit.lpr --build-mode=win64-release -q -q
%tmp%\tools\lazarus\lazbuild.exe toolkit2/fhirtoolkit.lpr --build-mode=win64-release -q -q --build-all

IF EXIST "C:\Users\graha\Health Intersections Dropbox\Health Intersections Team Folder\fhirserver\win64" (
copy exec\64\*.exe "C:\Users\graha\Health Intersections Dropbox\Health Intersections Team Folder\fhirserver\win64"
}

IF EXIST exec\64\fhirserver.exe (
echo Sucess!
) ELSE (
echo Failed (no server executable found)
)
chdir /d %FSDIR%
22 changes: 11 additions & 11 deletions build/windows-libraries.bat
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ cd ..

Rem -- now build

tools\lazarus\lazbuild.exe source\tzdb\dist\tzdb_fpc.lpk -q -q
tools\lazarus\lazbuild.exe source\extrasyn\extrahighlighters.lpk -q -q
tools\lazarus\lazbuild.exe source\extrasyn\extrahighlighters_dsgn.lpk -q -q
tools\lazarus\lazbuild.exe source\ZXing.Delphi\Lazarus\Package\zxing.lpk -q -q
tools\lazarus\lazbuild.exe source\lazarus-ide-tester\package\idetester.lpk -q -q
tools\lazarus\lazbuild.exe source\lazarus-ide-tester\ide\idetester_dsgn.lpk -q -q
tools\lazarus\lazbuild.exe source\HtmlViewer\package\FrameViewer09.lpk -q -q
tools\lazarus\lazbuild.exe source\delphi-markdown\packages\markdownengine.lpk -q -q
tools\lazarus\lazbuild.exe source\delphi-markdown\tests\markdowntests.lpk -q -q
tools\lazarus\lazbuild.exe source\PdfiumLib\Package\Pdfium.lpk -q -q
tools\lazarus\lazbuild.exe source\DelphiAST\Package\pascalast.lpk -q -q
tools\lazarus\lazbuild.exe source\tzdb\dist\tzdb_fpc.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\extrasyn\extrahighlighters.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\extrasyn\extrahighlighters_dsgn.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\ZXing.Delphi\Lazarus\Package\zxing.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\lazarus-ide-tester\package\idetester.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\lazarus-ide-tester\ide\idetester_dsgn.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\HtmlViewer\package\FrameViewer09.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\delphi-markdown\packages\markdownengine.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\delphi-markdown\tests\markdowntests.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\PdfiumLib\Package\Pdfium.lpk -q -q --build-all
tools\lazarus\lazbuild.exe source\DelphiAST\Package\pascalast.lpk -q -q --build-all


chdir /d %FSDIR% &rem restore current directory
4 changes: 1 addition & 3 deletions build/windows-toolchain.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ curl -L https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/wincro
powershell -command "Expand-Archive -Force tools\CrossLibsLinuxx64.zip tools"
powershell -command "Expand-Archive -Force tools\WinCrossBinsLinuxx64.zip tools"

pause

rem -- run the installer- will finish with a full install of Lazarus

tools\fpclazup --fpcVersion="stable.gitlab" --lazVersion="stable.gitlab" --installdir=tools --noconfirm --include=anchordocking,lazprojectgroups,virtualtreeview,fpdebug
rem tools\fpclazup --installdir=tools --noconfirm --include=anchordocking,lazprojectgroups,virtualtreeview,fpdebug
tools\fpclazup --ostarget="linux" --cputarget="x86_64" --only="FPCCleanOnly,FPCBuildOnly" --installdir=tools. --noconfirm
tools\fpclazup --ostarget="linux" --cputarget="x86_64" --only="FPCCleanOnly,FPCBuildOnly" --installdir=tools --noconfirm

Rem ---- back to the fhirserver directory ----------

Expand Down
Loading

0 comments on commit 2b8a477

Please sign in to comment.