Skip to content

Implement cgroup v2 #21

Implement cgroup v2

Implement cgroup v2 #21

Workflow file for this run

name: Run integration tests
on:
push:
branches-ignore:
- main
- '[0-9]+.[0-9]+'
- gh-readonly-queue/main/*
- gh-readonly-queue/main/[0-9]+.[0-9]+
pull_request:
branches:
- main
- '[0-9]+.[0-9]+'
jobs:
integration:
runs-on: ubuntu-24.04
container:
image: domjudge/gitlabci:24.04
options: --privileged --cgroupns=host
services:
sqlserver:
image: mariadb
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: domjudge
MYSQL_PASSWORD: domjudge
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: info
run: cat /proc/cmdline && echo && cat /proc/mounts && echo && ls -al /sys/fs/cgroup && echo && uname -a && echo && stat -fc %T /sys/fs/cgroup && echo && cat /proc/self/cgroup
- name: Install DOMjudge
run: .github/jobs/baseinstall.sh all
- name: Set up chroot
run: sudo misc-tools/dj_make_chroot -a amd64
- name: Check nginx
run: curl -v https://localhost/domjudge/
#- name: Testing submit client
# working-directory: submit
# run: make check-full
- name: Configure judgehost
run: sudo cp /opt/domjudge/judgehost/etc/sudoers-domjudge /etc/sudoers.d/ && sudo chmod 400 /etc/sudoers.d/sudoers-domjudge && cat /opt/domjudge/judgehost/etc/sudoers-domjudge
- name: Create user
run: sudo userdel -f -r domjudge-run-0 ; sudo useradd -d /nonexistent -g nogroup -s /bin/false -u 2222 domjudge-run-0
- name: Start judging
run: sudo -u domjudge sh -c 'cd /opt/domjudge/judgehost/ && nohup bin/judgedaemon -n 0 &'
- name: DEBUG
run: ls -al /opt/domjudge/judgehost/log/
- name: Monitor judgehost log and stop once all submissions are judged
run: |
tail -f /opt/domjudge/judgehost/log/judge*-0.log | while read line; do
echo "$line"
if [[ "$line" == *"No submissions in queue"* ]]; then
break
fi
done