| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ on: | |||
| 6 | 6 | ||
| 7 | 7 | jobs: | |
| 8 | 8 | test: | |
| 9 | - runs-on: ubuntu-20.04 | ||
| 9 | + runs-on: ubuntu-24.04 | ||
| 10 | 10 | ||
| 11 | 11 | steps: | |
| 12 | 12 | - uses: actions/checkout@v2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,7 @@ | |||
| 1 | 1 | # syntax=docker/dockerfile:1 | |
| 2 | 2 | FROM ubuntu:20.04 | |
| 3 | 3 | ||
| 4 | - RUN apt-get update | ||
| 5 | - RUN apt-get install -y \ | ||
| 4 | + RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
| 6 | 5 | build-essential \ | |
| 7 | 6 | cgroup-lite \ | |
| 8 | 7 | cppreference-doc-en-html \ | |
@@ -13,6 +12,7 @@ RUN apt-get install -y \ | |||
| 13 | 12 | libcups2-dev \ | |
| 14 | 13 | libffi-dev \ | |
| 15 | 14 | libpq-dev \ | |
| 15 | + libsystemd-dev \ | ||
| 16 | 16 | libyaml-dev \ | |
| 17 | 17 | mono-mcs \ | |
| 18 | 18 | openjdk-8-jdk-headless \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1076,7 +1076,7 @@ def build_box_options(self): | |||
| 1076 | 1076 | if self.box_id is not None: | |
| 1077 | 1077 | res += ["--box-id=%d" % self.box_id] | |
| 1078 | 1078 | if self.cgroup: | |
| 1079 | - res += ["--cg", "--cg-timing"] | ||
| 1079 | + res += ["--cg"] | ||
| 1080 | 1080 | if self.chdir is not None: | |
| 1081 | 1081 | res += ["--chdir=%s" % self.chdir] | |
| 1082 | 1082 | for src, dest, options in self.dirs: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,8 +19,16 @@ services: | |||
| 19 | 19 | volumes: | |
| 20 | 20 | - "./codecov:/home/cmsuser/cms/codecov" | |
| 21 | 21 | privileged: true | |
| 22 | + cgroup: host | ||
| 22 | 23 | command: > | |
| 23 | 24 | wait-for-it testdb:5432 -- sh -c " | |
| 25 | + sudo mkdir /run/isolate ; | ||
| 26 | + echo /sys/fs/cgroup | sudo tee /run/isolate/cgroup ; | ||
| 27 | + isolate --print-cg-root ; | ||
| 28 | + isolate-check-environment ; | ||
| 29 | + isolate --cg --box-id 1 --init ; | ||
| 30 | + ls /sys/fs/cgroup/box-1 ; | ||
| 31 | + isolate --cg --box-id 1 --clean ; | ||
| 24 | 32 | dropdb --host=testdb --username=postgres cmsdbfortesting ; | |
| 25 | 33 | createdb --host=testdb --username=postgres cmsdbfortesting ; | |
| 26 | 34 | cmsInitDB ; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -195,9 +195,9 @@ def build_isolate(): | |||
| 195 | 195 | assert_not_root() | |
| 196 | 196 | ||
| 197 | 197 | print("===== Compiling isolate") | |
| 198 | - # We make only the executable isolate, otherwise the tool a2x | ||
| 199 | - # is needed and we have to add more compilation dependencies. | ||
| 200 | - subprocess.check_call(["make", "-C", "isolate", "isolate"]) | ||
| 198 | + # We make only the executable isolate and isolate-cg-keeper, otherwise the | ||
| 199 | + # tool a2x is needed and we have to add more compilation dependencies. | ||
| 200 | + subprocess.check_call(["make", "--directory", "isolate", "isolate", "isolate-cg-keeper"]) | ||
| 201 | 201 | ||
| 202 | 202 | ||
| 203 | 203 | def install_isolate(): | |
@@ -214,7 +214,7 @@ def install_isolate(): | |||
| 214 | 214 | exit(1) | |
| 215 | 215 | ||
| 216 | 216 | # Check if build_isolate() has been called | |
| 217 | - if not os.path.exists(os.path.join("isolate", "isolate")): | ||
| 217 | + if not os.path.exists(os.path.join("isolate", "isolate")) or not os.path.exists(os.path.join("isolate", "isolate-cg-keeper")): | ||
| 218 | 218 | print("[Error] You must run the build_isolate command first") | |
| 219 | 219 | exit(1) | |
| 220 | 220 | ||
@@ -224,6 +224,18 @@ def install_isolate(): | |||
| 224 | 224 | os.path.join(USR_ROOT, "bin", "isolate"), | |
| 225 | 225 | root, 0o4750, group=cmsuser_grp) | |
| 226 | 226 | ||
| 227 | + print("===== Copying isolate-cg-keeper to /usr/local/bin/") | ||
| 228 | + makedir(os.path.join(USR_ROOT, "bin"), root, 0o755) | ||
| 229 | + copyfile(os.path.join(".", "isolate", "isolate-cg-keeper"), | ||
| 230 | + os.path.join(USR_ROOT, "bin", "isolate-cg-keeper"), | ||
| 231 | + root, 0o4750, group=cmsuser_grp) | ||
| 232 | + | ||
| 233 | + print("===== Copying isolate-check-environment to /usr/local/bin/") | ||
| 234 | + makedir(os.path.join(USR_ROOT, "bin"), root, 0o755) | ||
| 235 | + copyfile(os.path.join(".", "isolate", "isolate-check-environment"), | ||
| 236 | + os.path.join(USR_ROOT, "bin", "isolate-check-environment"), | ||
| 237 | + root, 0o4750, group=cmsuser_grp) | ||
| 238 | + | ||
| 227 | 239 | print("===== Copying isolate config to /usr/local/etc/") | |
| 228 | 240 | makedir(os.path.join(USR_ROOT, "etc"), root, 0o755) | |
| 229 | 241 | copyfile(os.path.join(".", "isolate", "default.cf"), | |
@@ -374,6 +386,8 @@ def uninstall(): | |||
| 374 | 386 | ||
| 375 | 387 | print("===== Deleting isolate from /usr/local/bin/") | |
| 376 | 388 | try_delete(os.path.join(USR_ROOT, "bin", "isolate")) | |
| 389 | + try_delete(os.path.join(USR_ROOT, "bin", "isolate-cg-keeper")) | ||
| 390 | + try_delete(os.path.join(USR_ROOT, "bin", "isolate-check-environment")) | ||
| 377 | 391 | ||
| 378 | 392 | print("===== Deleting configuration to /usr/local/etc/") | |
| 379 | 393 | if ask("Type Y if you really want to remove configuration files: "): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments