From 9a5c27c698d914e801bd770cec4092c3086b643e Mon Sep 17 00:00:00 2001 From: William Di Luigi Date: Sun, 18 Dec 2022 16:18:15 +0100 Subject: [PATCH] Test new cg2 branch of isolate with Ubuntu 22.04 --- .github/workflows/main.yml | 2 +- Dockerfile | 3 +-- cms/grading/Sandbox.py | 2 +- docker-compose.test.yml | 3 +++ isolate | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4ee06799b..b2afa2550f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 1b2624a7f1..ae61a90a76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ # syntax=docker/dockerfile:1 FROM ubuntu:20.04 -RUN apt-get update -RUN apt-get install -y \ +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential \ cgroup-lite \ cppreference-doc-en-html \ diff --git a/cms/grading/Sandbox.py b/cms/grading/Sandbox.py index 741b68dad7..5ec85d3e7c 100644 --- a/cms/grading/Sandbox.py +++ b/cms/grading/Sandbox.py @@ -1076,7 +1076,7 @@ def build_box_options(self): if self.box_id is not None: res += ["--box-id=%d" % self.box_id] if self.cgroup: - res += ["--cg", "--cg-timing"] + res += ["--cg"] if self.chdir is not None: res += ["--chdir=%s" % self.chdir] for src, dest, options in self.dirs: diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 8a121b313f..2a7b3517d8 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -19,8 +19,11 @@ services: volumes: - "./codecov:/home/cmsuser/cms/codecov" privileged: true + cgroup: host command: > wait-for-it testdb:5432 -- sh -c " + sudo mkdir /run/isolate ; + echo /sys/fs/cgroup | sudo tee /run/isolate/cgroup ; dropdb --host=testdb --username=postgres cmsdbfortesting ; createdb --host=testdb --username=postgres cmsdbfortesting ; cmsInitDB ; diff --git a/isolate b/isolate index eda2c65acd..758ab000e3 160000 --- a/isolate +++ b/isolate @@ -1 +1 @@ -Subproject commit eda2c65acd9ad5d4fc8ba46884e66445a8fca1b8 +Subproject commit 758ab000e3a1bcf1e57ffddea2340ffa1a5af49b