diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6e40701..73f11c1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,5 +4,5 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - # Check for updates to GitHub Actions every weekday - interval: "daily" \ No newline at end of file + # Check for updates to GitHub Actions every week + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/dockerpush.yml b/.github/workflows/dockerpush.yml index 67114ec..0f5f595 100644 --- a/.github/workflows/dockerpush.yml +++ b/.github/workflows/dockerpush.yml @@ -10,7 +10,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: true + submodules: recursive + fetch-depth: 0 - name: ccache uses: hendrikmuhs/ccache-action@v1 - name: Build containers diff --git a/Makefile b/Makefile index 769e515..5d89cd1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SMIV := 5.2.0 +SMIV := 5.1.3 RDMPV := 7.0.12 JARS := ctpanonymiser-1.0.0/CTPAnonymiser-portable-1.0.0.jar smi-nerd-v$(SMIV).jar @@ -14,9 +14,9 @@ all: $(BINS) minidocker: smi/smiinit smi/smiinit.sh smi/CTPAnonymiser-portable-1.0.0.jar smi/smi-nerd-v$(SMIV).jar smi/ctp-whitelist.script smi/eng.traineddata.gz mkdir -p smi touch smi/dummy.sh - (cd smi-services-v4.0.0-linux-x64;tar cf - .) | (cd smi ; tar xf -) - $(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/adoptopenjdk/openjdk11:debian-jre)) - tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install libicu63" + (cd smi-services-v$(SMIV)-linux-x64 && tar cf - .) | (cd smi && tar xf -) + $(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/eclipse-temurin:11-jre)) + tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install -y libicu-dev" buildah config --cmd "/smi/smiinit.sh" "$(ctr1)" buildah commit "$(ctr1)" "smidocker" @@ -63,7 +63,7 @@ smi/eng.traineddata.gz: curl -sL https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata | gzip -9 > $@ smi-services-v$(SMIV)-linux-x64/default.yaml: - curl -L https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-services-v$(SMIV)-linux-x64.tgz | tar xzf - + curl -sL https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-services-v$(SMIV)-linux-x64.tgz | tar xzf - sed -i -e 's:MappingTable'"'"':smi.MappingTable'"'"':' smi-services-v$(SMIV)-linux-x64/default.yaml sed -i -e 's/CTPAnonymiserOptions:/CTPAnonymiserOptions:\n SRAnonTool: '\''\/smi\/dummy.sh'\''/' smi-services-v$(SMIV)-linux-x64/default.yaml @@ -74,7 +74,7 @@ docker: smiinit $(JARS) $(HOME)/rdmp-cli/rdmp ctp-whitelist.script smi-services- buildah copy "$(ctr1)" smiinit /bin/ buildah copy "$(ctr1)" $(HOME)/rdmp-cli /rdmp-cli buildah copy "$(ctr1)" $(JARS) ctp-whitelist.script smi-services-v$(SMIV)-linux-x64/ /smi - ./eqnames.pl < smi-services-v3.0.2-linux-x64/default.yaml | buildah run "$(ctr1)" -- bash 2>&1 | tee dockerbuild.log + ./eqnames.pl < smi-services-v$(SMIV)-linux-x64/default.yaml | buildah run "$(ctr1)" -- bash 2>&1 | tee dockerbuild.log buildah config --cmd "/bin/smiinit -c /smi -f /smi.yaml" "$(ctr1)" buildah commit "$(ctr1)" "smifull" @@ -83,19 +83,19 @@ $(HOME)/rdmp-cli/rdmp: rdmp-cli-linux-x64.zip chmod +x $(HOME)/rdmp-cli/rdmp rdmp-cli-linux-x64.zip: - wget https://github.com/HicServices/RDMP/releases/download/v$(RDMPV)/rdmp-cli-linux-x64.zip + wget -q https://github.com/HicServices/RDMP/releases/download/v$(RDMPV)/rdmp-cli-linux-x64.zip ctpanonymiser-v$(SMIV).zip: - wget https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/ctpanonymiser-v$(SMIV).zip + wget -q https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/ctpanonymiser-v$(SMIV).zip ctpanonymiser-1.0.0/CTPAnonymiser-portable-1.0.0.jar: ctpanonymiser-v$(SMIV).zip [ -e $@ ] || unzip -DD $< smi-nerd-v$(SMIV).jar: - wget https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-nerd-v$(SMIV).jar + wget -q https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-nerd-v$(SMIV).jar ctp-whitelist.script: - wget https://raw.githubusercontent.com/SMI/SmiServices/v$(SMIV)/data/ctp/ctp-whitelist.script + wget -q https://raw.githubusercontent.com/SMI/SmiServices/v$(SMIV)/data/ctp/ctp-whitelist.script smiinit: smiinit.cpp yaml-cpp/build/libyaml-cpp.a ifeq ($(UNAME), Darwin)