Skip to content

Commit

Permalink
Pin dependencies using single configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
oktaal committed Jun 19, 2024
1 parent b7fa8e3 commit 148377e
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 38 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/cpp-prep-dep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ directory=$1
repository=$2
version=$3

if [[ -z $version && $version != "latest" ]];
then
# use the dependencies
source dependencies.cfg
version="${!directory}"
fi

cd ~/.tscan-deps
if [ ! -d $directory ];
then
Expand All @@ -15,7 +22,7 @@ fi
cd $directory
old_commit_hash=$(git rev-parse HEAD)

if [[ -z $version ]];
if [[ -z $version || $version == "latest" ]];
then
echo "Get latest version"
git pull
Expand Down
34 changes: 9 additions & 25 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,6 @@ jobs:
OPENMPFLAG: --disable-openmp
}
dependencies: [ pinned ] # TODO: latest is known to fail //, latest ]
include:
# - dependencies: latest
# alpino: Alpino-x86_64-Linux-glibc-2.17-git819-sicstus
# versions known to works
- dependencies: pinned
# removed for speed, using pre-parsed trees only
# alpino: Alpino-x86_64-Linux-glibc-2.17-git819-sicstus
ticcutils: ecb62eb116ffc3677626c53f012f34e00854e4c4 # 0.33 2023-04-29
libfolia: 1a3f462f8f048df60889817325701130b6271e8a # 2.15 2023-05-01
uctodata: a8be6cf7512998f4c8963d1021f402b8b1290085 # 0.9.1 2022-10-04
ucto: d22029833b264a969351ead0ee3ab9b3f97db97d # 0.30 2023-04-29
timbl: 61929ce6dc7d7077cb5eeceafef86de38eb40daa # 6.9 2023-04-29
mbt: fd7cb7ebdd52bef2794f16f329569bedad3143e9 # 3.10 2023-04-29
mbtserver: a6f04f30f62965c8660ee92be99d4eb86fc4bf65 # 0.17 2023-04-30
frogdata: 99de9597105c2304faeb797264231ba180fcdb20 # 0.22 2023-03-07
frog: 991f6977cfd81b9a6538db0c6de3d26908ec16b7 # 0.29 2023-05-03
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
Expand Down Expand Up @@ -98,31 +82,31 @@ jobs:

- name: Install ticcutils
run: |
.github/workflows/cpp-prep-dep.sh ticcutils https://github.com/LanguageMachines/ticcutils "${{ matrix.ticcutils }}"
.github/workflows/cpp-prep-dep.sh ticcutils https://github.com/LanguageMachines/ticcutils
- name: Install libfolia
run: |
.github/workflows/cpp-prep-dep.sh libfolia https://github.com/LanguageMachines/libfolia "${{ matrix.libfolia }}"
.github/workflows/cpp-prep-dep.sh libfolia https://github.com/LanguageMachines/libfolia
- name: Install uctodata
run: |
.github/workflows/cpp-prep-dep.sh uctodata https://github.com/LanguageMachines/uctodata "${{ matrix.uctodata }}"
.github/workflows/cpp-prep-dep.sh uctodata https://github.com/LanguageMachines/uctodata
- name: Install ucto
run: |
.github/workflows/cpp-prep-dep.sh ucto https://github.com/LanguageMachines/ucto "${{ matrix.ucto }}"
.github/workflows/cpp-prep-dep.sh ucto https://github.com/LanguageMachines/ucto
- name: Install timbl
run: |
.github/workflows/cpp-prep-dep.sh timbl https://github.com/LanguageMachines/timbl "${{ matrix.timbl }}"
.github/workflows/cpp-prep-dep.sh timbl https://github.com/LanguageMachines/timbl
- name: Install mbt
run: |
.github/workflows/cpp-prep-dep.sh mbt https://github.com/LanguageMachines/mbt "${{ matrix.mbt }}"
.github/workflows/cpp-prep-dep.sh mbt https://github.com/LanguageMachines/mbt
- name: Install mbtserver
run: |
.github/workflows/cpp-prep-dep.sh mbtserver https://github.com/LanguageMachines/mbtserver "${{ matrix.mbtserver }}"
.github/workflows/cpp-prep-dep.sh mbtserver https://github.com/LanguageMachines/mbtserver
- name: Install frogdata
run: |
.github/workflows/cpp-prep-dep.sh frogdata https://github.com/LanguageMachines/frogdata "${{ matrix.frogdata }}"
.github/workflows/cpp-prep-dep.sh frogdata https://github.com/LanguageMachines/frogdata
- name: Install frog
run: |
.github/workflows/cpp-prep-dep.sh frog https://github.com/LanguageMachines/frog "${{ matrix.frog }}"
.github/workflows/cpp-prep-dep.sh frog https://github.com/LanguageMachines/frog
- name: Install
run: |
bash bootstrap.sh
Expand Down
21 changes: 11 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,17 @@ WORKDIR /deployment
RUN ./add-alpino.sh
# These will create .deb packages which can be re-used by the final container
# or during a rebuild
RUN ./prep-dep.sh ticcutils https://github.com/LanguageMachines/ticcutils ecb62eb116ffc3677626c53f012f34e00854e4c4
RUN ./prep-dep.sh libfolia https://github.com/LanguageMachines/libfolia 1a3f462f8f048df60889817325701130b6271e8a
RUN ./prep-dep.sh uctodata https://github.com/LanguageMachines/uctodata a8be6cf7512998f4c8963d1021f402b8b1290085
RUN ./prep-dep.sh ucto https://github.com/LanguageMachines/ucto d22029833b264a969351ead0ee3ab9b3f97db97d
RUN ./prep-dep.sh timbl https://github.com/LanguageMachines/timbl 61929ce6dc7d7077cb5eeceafef86de38eb40daa
RUN ./prep-dep.sh mbt https://github.com/LanguageMachines/mbt fd7cb7ebdd52bef2794f16f329569bedad3143e9
RUN ./prep-dep.sh mbtserver https://github.com/LanguageMachines/mbtserver a6f04f30f62965c8660ee92be99d4eb86fc4bf65
RUN ./prep-dep.sh frogdata https://github.com/LanguageMachines/frogdata 99de9597105c2304faeb797264231ba180fcdb20
RUN ./prep-dep.sh frog https://github.com/LanguageMachines/frog 991f6977cfd81b9a6538db0c6de3d26908ec16b7
RUN ./prep-dep.sh wopr https://github.com/LanguageMachines/wopr 6e3068047c0f9d3c66fcedb9c25e68907770ac9d
COPY dependencies.cfg /src/tscan/
RUN ./prep-dep.sh ticcutils https://github.com/LanguageMachines/ticcutils
RUN ./prep-dep.sh libfolia https://github.com/LanguageMachines/libfolia
RUN ./prep-dep.sh uctodata https://github.com/LanguageMachines/uctodata
RUN ./prep-dep.sh ucto https://github.com/LanguageMachines/ucto
RUN ./prep-dep.sh timbl https://github.com/LanguageMachines/timbl
RUN ./prep-dep.sh mbt https://github.com/LanguageMachines/mbt
RUN ./prep-dep.sh mbtserver https://github.com/LanguageMachines/mbtserver
RUN ./prep-dep.sh frogdata https://github.com/LanguageMachines/frogdata
RUN ./prep-dep.sh frog https://github.com/LanguageMachines/frog
RUN ./prep-dep.sh wopr https://github.com/LanguageMachines/wopr

RUN ./build-compound-splitter.sh

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ We strongly recommend to use Docker to install T-scan. Be aware that T-scan and

This version of T-Scan can run directly from Docker:

$ docker-compose up
$ docker compose up

Default address: http://localhost:8830

Expand Down
11 changes: 11 additions & 0 deletions dependencies.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# List of the commit hashes to retrieve for the dependencies
ticcutils=ecb62eb116ffc3677626c53f012f34e00854e4c4 # 0.33 2023-04-29
libfolia=1a3f462f8f048df60889817325701130b6271e8a # 2.15 2023-05-01
uctodata=a8be6cf7512998f4c8963d1021f402b8b1290085 # 0.9.1 2022-10-04
ucto=d22029833b264a969351ead0ee3ab9b3f97db97d # 0.30 2023-04-29
timbl=61929ce6dc7d7077cb5eeceafef86de38eb40daa # 6.9 2023-04-29
mbt=fd7cb7ebdd52bef2794f16f329569bedad3143e9 # 3.10 2023-04-29
mbtserver=a6f04f30f62965c8660ee92be99d4eb86fc4bf65 # 0.17 2023-04-30
frogdata=99de9597105c2304faeb797264231ba180fcdb20 # 0.22 2023-03-07
frog=991f6977cfd81b9a6538db0c6de3d26908ec16b7 # 0.29 2023-05-03
wopr=6e3068047c0f9d3c66fcedb9c25e68907770ac9d
9 changes: 8 additions & 1 deletion docker/deployment/prep-dep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ else
cd $directory
old_commit_hash=$(git rev-parse HEAD)

if [[ -z $version ]];
if [[ -z $version && $version != "latest" ]];
then
# use the dependencies
source /src/tscan/dependencies.cfg
version="${!directory}"
fi

if [[ -z $version || $version == "latest" ]];
then
echo "Using latest version"
elif [[ $version != $old_commit_hash ]];
Expand Down

0 comments on commit 148377e

Please sign in to comment.