Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linuxscripts #10

Closed
wants to merge 75 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
cffd5c8
add healthcheck
costateixeira Dec 10, 2023
f3ae6de
force build all
costateixeira Dec 14, 2023
0a5d9ff
Merge branch 'master' into force-build-all
costateixeira Dec 29, 2023
3c79473
fix unicode and fhirpath tests
Jan 2, 2024
d7b31fe
compile fix
Jan 2, 2024
b42bc46
build-all everywhere
costateixeira Jan 2, 2024
2cb3cc1
Merge branch 'master' into force-build-all
costateixeira Jan 2, 2024
b645b80
delete executables before building on windows
grahamegrieve Jan 2, 2024
99e641b
improve server build
Jan 3, 2024
cae1897
upgrade MySQL driver
Jan 3, 2024
92ea08e
add linux ssl build (script needs root access)
costateixeira Jan 3, 2024
ad5b549
more tx validation fixes
Jan 3, 2024
e52ff6a
Update linux-dependencies.sh
costateixeira Jan 3, 2024
db71df1
Update linux-dependencies.sh
costateixeira Jan 3, 2024
96e7e0f
build on linux
costateixeira Jan 3, 2024
944ad3f
Update linux-toolchain.sh
costateixeira Jan 3, 2024
ff82660
update linux scripts
costateixeira Jan 3, 2024
ae5d408
Update linux-dependencies.sh
costateixeira Jan 3, 2024
59db421
Update linux-dependencies.sh
costateixeira Jan 3, 2024
c8cca46
Update linux-dependencies.sh
costateixeira Jan 3, 2024
2422ac8
Update linux-dependencies.sh
costateixeira Jan 3, 2024
147aa60
Update linux-dependencies.sh
costateixeira Jan 3, 2024
6711f18
Change script to executable
costateixeira Jan 3, 2024
3de811f
chmod
costateixeira Jan 3, 2024
3c8f2c2
Update linux-dependencies.sh
costateixeira Jan 3, 2024
961858f
update scripts
costateixeira Jan 3, 2024
2fdf99f
Update linux-dependencies.sh
costateixeira Jan 3, 2024
804b876
Update linux.sh
costateixeira Jan 3, 2024
be01b6d
try to build
costateixeira Jan 3, 2024
6d7a18a
work on linux build
costateixeira Jan 3, 2024
428df71
only server
costateixeira Jan 3, 2024
7358399
add customoptions for linking openssl
costateixeira Jan 3, 2024
4bb8294
build only server for debugging
costateixeira Jan 3, 2024
2c068c8
try again
costateixeira Jan 3, 2024
47601dd
Update linux.sh
costateixeira Jan 3, 2024
2bea2be
Update linux.sh
costateixeira Jan 3, 2024
3391a31
build all again
costateixeira Jan 3, 2024
6f23fc9
fix all lib paths
costateixeira Jan 3, 2024
f38d572
add more library paths
costateixeira Jan 3, 2024
ac0035e
add more library paths to build toolkit now
costateixeira Jan 3, 2024
496fd94
start cleaning up
costateixeira Jan 3, 2024
c172dc9
oops
costateixeira Jan 3, 2024
986363d
Change script to executable
costateixeira Jan 3, 2024
991309d
fix
costateixeira Jan 3, 2024
0f8692b
Update linux-libraries.sh
costateixeira Jan 3, 2024
0f172a9
try parametrized openssl folder
costateixeira Jan 3, 2024
313af93
clarify message
Jan 4, 2024
771d43b
Revert "try parametrized openssl folder"
costateixeira Jan 4, 2024
2cbda9c
Merge branch 'HealthIntersections:master' into linuxscripts
costateixeira Jan 4, 2024
28e6992
delete unneeded script
costateixeira Jan 4, 2024
65d42c5
rework gzip handling
Jan 5, 2024
a58df1d
Fix bug with not populating ValueSet.expansion.property
Jan 5, 2024
44fc581
Merge branch 'HealthIntersections:master' into linuxscripts
costateixeira Jan 5, 2024
0f01bda
get all tests passing on windows
grahamegrieve Jan 5, 2024
2e0a5fb
Merge branch 'master' of https://github.com/HealthIntersections/fhirs…
costateixeira Jan 5, 2024
f3ca42f
Merge branch 'HealthIntersections-master' into linuxscripts
costateixeira Jan 5, 2024
0d2d1ee
Update fhirserver.lpi
costateixeira Jan 5, 2024
e936e4e
Update README.md
costateixeira Jan 5, 2024
1c9a4ff
rework fsl_gzip a little per comments from fibonacci
Jan 5, 2024
2877ab8
get changes
costateixeira Jan 5, 2024
e375790
Merge branch 'HealthIntersections-master' into linuxscripts
costateixeira Jan 5, 2024
3f701eb
Update linux-docker-build.yml
costateixeira Jan 5, 2024
bdd497a
Update linux-docker-build.yml
costateixeira Jan 5, 2024
d8be251
more gzip clean up
Jan 5, 2024
58dfe8e
Merge branch 'HealthIntersections:master' into linuxscripts
costateixeira Jan 5, 2024
730e26d
fix issues with build
costateixeira Jan 6, 2024
563597d
fix path
costateixeira Jan 6, 2024
9d734f9
windows update build
costateixeira Jan 6, 2024
1ce6781
Update linux-docker-build.yml
costateixeira Jan 6, 2024
9b89c52
fix gzip related issues
Jan 6, 2024
b57e201
Merge branch 'master' of https://github.com/costateixeira/fhirserver …
costateixeira Jan 6, 2024
4702ed6
Merge branch 'master' into linuxscripts
costateixeira Jan 6, 2024
d5f848f
catch up w origin
costateixeira Jan 6, 2024
a00750b
Merge branch 'master' of https://github.com/HealthIntersections/fhirs…
costateixeira Jan 6, 2024
0b6162e
Merge branch 'HealthIntersections-master1' into linuxscripts
costateixeira Jan 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/linux-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ on:
push:
branches:
- master
# pull_request:
- linuxscripts
pull_request:
jobs:
Build-Docker-Image:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# -
# name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache terminology files
uses: actions/cache@v2
with:
Expand All @@ -41,7 +42,6 @@ jobs:
.
# - name: Scan Code
# run: |
# export DISPLAY=0:0
# docker run --entrypoint /work/fhirserver/utilities/codescan/codescan fhirserver /work/bootstrap
- name: Prepare ini file
env:
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ RUN cp /usr/local/lib/*.so* /usr/lib/
RUN /work/fhirserver/build/linux-fhirserver.sh /work/bootstrap
RUN cp exec/pack/*.properties exec/64

# Install curl for the health check
RUN apt-get update && apt-get install -y curl

# Set the health check
HEALTHCHECK --interval=1m --timeout=10s --retries=5 \
CMD curl -f http://localhost:${PORT}/fhir/metadata || exit 1

# Set the environment variables
ENV DISPLAY :99
ENV PORT 80
ENV TERMINOLOGY_CACHE /terminology
Expand Down
13 changes: 8 additions & 5 deletions build/linux-fhirserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

BUILD=${1:-"/tmp/fsbuild"}
OPENSSL_DIR=${OPENSSL_DIR:-"/tmp/openssl"}

mkdir -p exec/64/
cp exec/pack/*.cfg exec/pack/*.dat exec/64/
Expand All @@ -11,16 +12,17 @@ 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-all

$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-all
$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-all
$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-all
$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-all
Expand All @@ -44,7 +46,8 @@ echo "## compile packages/fhir_fui.lpk"
$BUILD/tools/lazarus/lazbuild packages/fhir_fui.lpk -q -q --build-all

echo "## compile codescanner"
echo $BUILD/tools/lazarus/lazbuild utilities/codescan/codescan.lpi --build-mode=linux -q -q --build-all
$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
16 changes: 15 additions & 1 deletion build/linux-libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,24 @@ echo "Updating dependencies for linux"
# ---- initial set up ----------

BUILDDIR=${1:-"/tmp/fsbuild"}
OPENSSL_DIR=${OPENSSL_DIR:-"/tmp/openssl"}

mkdir -p $BUILDDIR
pushd $BUILDDIR
mkdir -p $OPENSSL_DIR

# Download and build OpenSSL 1.1.1w
cd /tmp
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 --prefix=$OPENSSL_DIR --openssldir=$OPENSSL_DIR
make
make test
make install

pushd $BUILDDIR
mkdir source

cd source

echo "## git tzdb"
Expand Down
2 changes: 2 additions & 0 deletions build/linux-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ echo "Preparing dependencies for linux"
# ---- initial set up ----------

BUILDDIR=${1:-"/tmp/fsbuild"}
OPENSSL_DIR=${OPENSSL_DIR:-"/tmp/openssl"}

mkdir -p $BUILDDIR
pushd $BUILDDIR

Expand Down
12 changes: 12 additions & 0 deletions build/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@

BASEDIR=$(dirname "$0")
BUILDDIR=${1:-"/tmp/fsbuild"}
OPENSSL_DIR=${OPENSSL_DIR:-"/tmp/openssl"}

export OPENSSL_DIR

mkdir -p $OPENSSL_DIR
sudo mkdir /7Zip
sudo chmod 777 /7Zip

# export PATH=$OPENSSL_DIR/bin:$PATH
# export LD_LIBRARY_PATH=$OPENSSL_DIR:$LD_LIBRARY_PATH
# export PKG_CONFIG_PATH=$OPENSSL_DIR/pkgconfig:$PKG_CONFIG_PATH

# $BASEDIR/linux-dependencies.sh $BUILDDIR;
$BASEDIR/linux-toolchain.sh $BUILDDIR;
$BASEDIR/linux-libraries.sh $BUILDDIR;
$BASEDIR/linux-fhirserver.sh $BUILDDIR;
13 changes: 11 additions & 2 deletions build/windows-fhirserver.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ 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"

Expand Down Expand Up @@ -79,6 +81,13 @@ echo ## compile server
echo ## compile toolkit
%tmp%\tools\lazarus\lazbuild.exe toolkit2/fhirtoolkit.lpr --build-mode=win64-release -q -q --build-all

copy exec\64\*.exe "C:\Users\graha\Health Intersections Dropbox\Health Intersections Team Folder\executables\win64"

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%
4 changes: 2 additions & 2 deletions build/windows-release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ del release-notes-old.md 1>nul
echo ## build FHIRConsole ##
call clean 1>nul
utilities\codescan\codescan.exe -proj-version c:\work\fhirserver\server\fhirconsole.lpi -version %1 -debug false || goto :error
%tmp%\tools\lazarus\lazbuild.exe -B server\fhirconsole.lpi --build-mode=win64-release -q -q
%tmp%\tools\lazarus\lazbuild.exe -B server\fhirconsole.lpi --build-mode=win64-release -q -q --build-all
utilities\codescan\codescan.exe -check exec\64\fhirconsole.exe -message "Building the console failed" || goto :error

:: =========================================================================================
Expand Down Expand Up @@ -96,7 +96,7 @@ utilities\codescan\codescan.exe -check exec\64\fhirserver.exe -message "Building
echo ## build FHIRToolkit ##
call clean 1>nul
utilities\codescan\codescan.exe -proj-version toolkit2\fhirtoolkit.lpi -version %1 -debug false || goto :error
%tmp%\tools\lazarus\lazbuild.exe -B toolkit2\fhirtoolkit.lpi --build-mode=win64-release -q -q
%tmp%\tools\lazarus\lazbuild.exe -B toolkit2\fhirtoolkit.lpi --build-mode=win64-release -q -q --build-all
utilities\codescan\codescan.exe -check exec\64\fhirtoolkit.exe -message "Building the toolkit failed" || goto :error

echo All compile done
Expand Down
4 changes: 2 additions & 2 deletions build/windows-update.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ set "tmp=%1"

:No1

call windows-libraries.bat %tmp%
call build\windows-libraries.bat %tmp%
pause

call windows-fhirserver.bat %tmp%
call build\windows-fhirserver.bat %tmp%
pause
Binary file modified dependencies/openssl/linux-x86_64/libcrypto.so
Binary file not shown.
Binary file modified dependencies/openssl/linux-x86_64/libcrypto.so.1.1
100755 → 100644
Binary file not shown.
Binary file modified dependencies/openssl/linux-x86_64/libssl.so
Binary file not shown.
Binary file modified dependencies/openssl/linux-x86_64/libssl.so.1.1
100755 → 100644
Binary file not shown.
Loading
Loading