From 125c7e277145c65e4a30d0f67e3d3bac3425c75d Mon Sep 17 00:00:00 2001 From: Le Bao Hiep Date: Wed, 7 Feb 2024 09:00:39 +0700 Subject: [PATCH] Download scratch-run and testlib before running tests --- test-tier3/run | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test-tier3/run b/test-tier3/run index 0819c099..26743a62 100755 --- a/test-tier3/run +++ b/test-tier3/run @@ -1,7 +1,19 @@ #!/bin/bash + +curl --location -o scratch-run.zip $(curl -s https://api.github.com/repos/VNOI-Admin/scratch-run/releases/latest | grep -o -m 1 "https://github\.com.*.*linux_amd64\.zip") +unzip scratch-run.zip +mv scratch-run /usr/bin/scratch-run + mkdir /judge cd /judge || exit curl -L https://github.com/VNOI-Admin/judge-server/archive/master.tar.gz | tar -xz --strip-components=1 + +mkdir -p /usr/lib/fpc/ +cp asset/Windows.pas /usr/lib/fpc/ +fpc -Fe/dev/stderr -O2 /usr/lib/fpc/Windows.pas + +.docker/download_testlib_and_precompile + python3 -m venv --prompt=DMOJ env env/bin/pip3 install -e . runuser -u judge -w PATH -- bash -c '. ~/.profile; /judge/env/bin/python3 -u .docker.test.py'