diff --git a/.github/workflows/build-gitlab-container-PR.yml b/.github/workflows/build-gitlab-container-PR.yml index 662580e1..731c7be4 100644 --- a/.github/workflows/build-gitlab-container-PR.yml +++ b/.github/workflows/build-gitlab-container-PR.yml @@ -48,6 +48,23 @@ jobs: with: images: ghcr.io/${{ github.repository }} + - name: Building an example chroot... + run: | + sudo apt install make pkg-config sudo debootstrap libcgroup-dev php-cli php-curl php-json php-xml php-zip lsof procps gcc g++ libcgroup-dev make acl zip unzip pv mariadb-server nginx php php-fpm php-gd php-cli php-intl php-mbstring php-mysql php-curl php-json php-xml php-zip composer ntp python3-yaml php-bcmath + cd docker-gitlabci + wget https://github.com/DOMjudge/domjudge/archive/refs/heads/main.zip + unzip main.zip + cd domjudge-main + make configure + ./configure --with-domjudge-user=domjudge --with-judgehost_chrootdir="$(pwd)/chroot" + cd misc-tools + make dj_make_chroot + sudo ./dj_make_chroot + sudo tar -cvf chroot.tar "$(pwd)/chroot" + + - run: | + sudo find . -name chroot + pwd - name: Build and push Docker images uses: docker/build-push-action@v5 with: diff --git a/docker-gitlabci/Dockerfile b/docker-gitlabci/Dockerfile index 8472933f..343fad02 100644 --- a/docker-gitlabci/Dockerfile +++ b/docker-gitlabci/Dockerfile @@ -63,3 +63,6 @@ RUN wget $GITHUBDICTIONARY -O $CODESPELLDICTLOCATION # Do some extra setup RUN mkdir -p /run/php \ && rm /etc/php/*/fpm/pool.d/www.conf + +COPY ["domjudge-main/chroot.tar", "/"] +ADD ["domjudge-main/chroot.tar", "/"] diff --git a/docker-gitlabci/build.sh b/docker-gitlabci/build.sh index 74f21a5e..0b637933 100755 --- a/docker-gitlabci/build.sh +++ b/docker-gitlabci/build.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +# This script is not used in GHA CI if [[ -n ${CI} ]] then set -euxo pipefail