brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · d6a878b Raw
39 lines · plain
1# ===----------------------------------------------------------------------===##2#3# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4# See https://llvm.org/LICENSE.txt for license information.5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6#7# ===----------------------------------------------------------------------===##8#9# This file defines the image we use for Linux testing using Github Actions.10# From the root of the monorepo, this image can be built with:11#12#   $ docker build --file libcxx/utils/ci/docker/linux-builder.dockerfile \13#                  --build-arg BASE_IMAGE_VERSION=<sha>                   \14#                  --build-arg GITHUB_RUNNER_VERSION=<version> .15#16# This image also gets built on every push to `main` that modifies these Docker17# files, and can be found at ghcr.io/llvm/libcxx-linux-builder.18 19ARG BASE_IMAGE_VERSION20FROM ghcr.io/llvm/libcxx-linux-builder-base:${BASE_IMAGE_VERSION}21 22ARG GITHUB_RUNNER_VERSION23 24# Setup the user25RUN useradd gha -u 1001 -m -s /bin/bash26RUN adduser gha sudo27RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers28WORKDIR /home/gha29USER gha30 31# Install the Github Actions runner32ENV RUNNER_MANUALLY_TRAP_SIG=133ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=134RUN mkdir actions-runner && \35    cd actions-runner && \36    curl -O -L https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \37    tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \38    rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz39