diff options
Diffstat (limited to 'libcxx/utils')
-rw-r--r-- | libcxx/utils/ci/Dockerfile | 22 | ||||
-rw-r--r-- | libcxx/utils/ci/docker-compose.yml | 14 | ||||
-rwxr-xr-x | libcxx/utils/ci/run-buildbot | 6 | ||||
-rw-r--r-- | libcxx/utils/libcxx/test/params.py | 20 | ||||
-rwxr-xr-x | libcxx/utils/synchronize_csv_status_files.py | 8 |
5 files changed, 61 insertions, 9 deletions
diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile index 63cecea..79e1156 100644 --- a/libcxx/utils/ci/Dockerfile +++ b/libcxx/utils/ci/Dockerfile @@ -38,6 +38,7 @@ # If you're only looking to run the Docker image locally for debugging a # build bot, see the `run-buildbot-container` script located in this directory. +ARG ACTIONS_BASE_IMAGE # HACK: We set the base image in the docker-compose file depending on the final target (buildkite vs github actions). # This means we have a much slower container build, but we can use the same Dockerfile for both targets. @@ -309,7 +310,20 @@ CMD /opt/android/container-setup.sh && buildkite-agent start # # IMAGE: ghcr.io/libcxx/actions-builder. # -FROM builder-base AS actions-builder - -WORKDIR /home/runner -USER runner +FROM $ACTIONS_BASE_IMAGE AS actions-builder + +ARG GITHUB_RUNNER_VERSION + +RUN useradd gha -u 1001 -m -s /bin/bash +RUN adduser gha sudo +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers +WORKDIR /home/gha +USER gha + +ENV RUNNER_MANUALLY_TRAP_SIG=1 +ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1 +RUN mkdir actions-runner && \ + cd actions-runner && \ + curl -O -L https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \ + tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \ + rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz diff --git a/libcxx/utils/ci/docker-compose.yml b/libcxx/utils/ci/docker-compose.yml index 4efc6d2..36b8dd7 100644 --- a/libcxx/utils/ci/docker-compose.yml +++ b/libcxx/utils/ci/docker-compose.yml @@ -3,6 +3,16 @@ x-versions: &compiler_versions LLVM_HEAD_VERSION: 21 services: + builder-base: + image: ghcr.io/llvm/libcxx-linux-builder-base:${TAG} + build: + context: . + dockerfile: Dockerfile + target: builder-base + args: + BASE_IMAGE: ubuntu:jammy + <<: *compiler_versions + actions-builder: image: ghcr.io/llvm/libcxx-linux-builder:${TAG} build: @@ -10,7 +20,9 @@ services: dockerfile: Dockerfile target: actions-builder args: - BASE_IMAGE: ghcr.io/actions/actions-runner:2.326.0 + BASE_IMAGE: ubuntu:jammy + ACTIONS_BASE_IMAGE: builder-base + GITHUB_RUNNER_VERSION: "2.326.0" <<: *compiler_versions android-buildkite-builder: diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot index d8b23be..57ecf1e 100755 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -442,6 +442,12 @@ generic-hardening-mode-extensive) check-runtimes check-abi-list ;; +generic-hardening-mode-extensive-observe-semantic) + clean + generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-hardening-mode-extensive-observe-semantic.cmake" + check-runtimes + check-abi-list +;; generic-hardening-mode-debug) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-hardening-mode-debug.cmake" diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index adfb2a9..81c6134 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -361,6 +361,7 @@ DEFAULT_PARAMETERS = [ AddFeature("libcpp-has-no-incomplete-pstl"), AddFeature("libcpp-has-no-experimental-tzdb"), AddFeature("libcpp-has-no-experimental-syncstream"), + AddFeature("libcpp-has-no-experimental-hardening-observe-semantic"), ], ), # TODO: This can be improved once we use a version of GoogleBenchmark that supports the dry-run mode. @@ -454,5 +455,24 @@ DEFAULT_PARAMETERS = [ help="Whether to test the main or C++03-specific headers. Only changes behaviour when std=c++03.", actions=lambda enabled: [] if not enabled else [AddFlag("-D_LIBCPP_USE_FROZEN_CXX03_HEADERS"), AddFeature("FROZEN-CXX03-HEADERS-FIXME")], ), + Parameter( + name='assertion_semantic', + choices=["ignore", "observe", "quick_enforce", "enforce", "undefined"], + type=str, + default="undefined", + help="Whether to override the assertion semantic used by hardening. This is only meaningful when running the " + "tests against libc++ with hardening enabled. By default, no assertion semantic is specified explicitly, so " + "the default one will be used (depending on the hardening mode).", + actions=lambda assertion_semantic: filter( + None, + [ + AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_IGNORE") if assertion_semantic == "ignore" else None, + AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_OBSERVE") if assertion_semantic == "observe" else None, + AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_QUICK_ENFORCE") if assertion_semantic == "quick_enforce" else None, + AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_ENFORCE") if assertion_semantic == "enforce" else None, + AddFeature("libcpp-assertion-semantic={}".format(assertion_semantic)) if assertion_semantic != "undefined" else None, + ], + ), + ), ] # fmt: on diff --git a/libcxx/utils/synchronize_csv_status_files.py b/libcxx/utils/synchronize_csv_status_files.py index 3132857..5dbd734 100755 --- a/libcxx/utils/synchronize_csv_status_files.py +++ b/libcxx/utils/synchronize_csv_status_files.py @@ -231,7 +231,7 @@ class PaperInfo: return PaperInfo( paper_number=paper, - paper_name=issue['title'], + paper_name=issue['title'].removeprefix(paper + ': '), status=PaperStatus.from_github_issue(issue), meeting=issue.get('meeting Voted', None), first_released_version=None, # TODO @@ -269,14 +269,14 @@ def merge(paper: PaperInfo, gh: PaperInfo) -> PaperInfo: def load_csv(file: pathlib.Path) -> List[Tuple]: rows = [] - with open(file, newline='') as f: + with open(file, newline='', encoding='utf-8') as f: reader = csv.reader(f, delimiter=',') for row in reader: rows.append(row) return rows def write_csv(output: pathlib.Path, rows: List[Tuple]): - with open(output, 'w', newline='') as f: + with open(output, 'w', newline='', encoding='utf-8') as f: writer = csv.writer(f, quoting=csv.QUOTE_ALL, lineterminator='\n') for row in rows: writer.writerow(row) @@ -417,7 +417,7 @@ def main(argv): # Load all the Github issues tracking papers from Github. if args.load_github_from: print(f"Loading all issues from {args.load_github_from}") - with open(args.load_github_from, 'r') as f: + with open(args.load_github_from, 'r', encoding='utf-8') as f: project_info = json.load(f) else: print("Loading all issues from Github") |