Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
boomanaiden154 committed Jan 21, 2025
1 parent 3418cd0 commit 3680966
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 46 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-ci-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ permissions:

on:
push:
branches:
- main
paths:
- .github/workflows/build-ci-container.yml
- '.github/workflows/containers/github-action-ci/**'
Expand Down
50 changes: 6 additions & 44 deletions .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,8 @@ ENV LLVM_SYSROOT=/opt/llvm
FROM base as stage1-toolchain
ENV LLVM_VERSION=19.1.5

RUN apt-get update && \
apt-get install -y \
wget \
gcc \
g++ \
cmake \
ninja-build \
python3 \
git \
curl \
zlib1g-dev

RUN curl -O -L https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-$LLVM_VERSION.tar.gz && tar -xf llvmorg-$LLVM_VERSION.tar.gz

WORKDIR /llvm-project-llvmorg-$LLVM_VERSION

# Patch to enable better PGO profile data.
# TODO: Remove this for llvm 20
ADD https://github.com/llvm/llvm-project/commit/738250989ce516f02f809bdfde474a039c77e81f.patch .

RUN patch -p1 < 738250989ce516f02f809bdfde474a039c77e81f.patch

RUN cmake -B ./build -G Ninja ./llvm \
-C ./clang/cmake/caches/BOLT-PGO.cmake \
-DBOOTSTRAP_LLVM_ENABLE_LLD=ON \
-DBOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LLD=ON \
-DPGO_INSTRUMENT_LTO=Thin \
-DLLVM_ENABLE_RUNTIMES="compiler-rt" \
-DCMAKE_INSTALL_PREFIX="$LLVM_SYSROOT" \
-DLLVM_ENABLE_PROJECTS="bolt;clang;lld;clang-tools-extra" \
-DLLVM_DISTRIBUTION_COMPONENTS="lld;compiler-rt;clang-format;scan-build" \
-DCLANG_DEFAULT_LINKER="lld"

RUN ninja -C ./build stage2-clang-bolt stage2-install-distribution && ninja -C ./build install-distribution
RUN mkdir -p $LLVM_SYSROOT
RUN touch $LLVM_SYSROOT/stage1-toolchain

FROM base as ci-container

Expand Down Expand Up @@ -68,16 +36,6 @@ RUN apt-get update && \
file \
tzdata

# Install sccache as it is needed by most of the project test workflows and
# cannot be installed by the ccache action when executing as a non-root user.
# TODO(boomanaiden154): This should be switched to being installed with apt
# once we bump to Ubuntu 24.04.
RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.7.6/sccache-v0.7.6-x86_64-unknown-linux-musl.tar.gz' > /tmp/sccache.tar.gz && \
echo "2902a5e44c3342132f07b62e70cca75d9b23252922faf3b924f449808cc1ae58 /tmp/sccache.tar.gz" | sha256sum -c && \
tar xzf /tmp/sccache.tar.gz -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
rm /tmp/sccache.tar.gz && \
chmod +x /usr/local/bin/sccache

ENV LLVM_SYSROOT=$LLVM_SYSROOT
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}

Expand All @@ -91,9 +49,12 @@ RUN useradd gha -u 1001 -m -s /bin/bash
RUN adduser gha sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN touch $LLVM_SYSROOT/ci-container

USER gha
WORKDIR /home/gha


FROM ci-container as ci-container-agent

ENV GITHUB_RUNNER_VERSION=2.321.0
Expand All @@ -104,3 +65,4 @@ RUN mkdir actions-runner && \
tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz

RUN sudo touch $LLVM_SYSROOT/ci-container-agent

0 comments on commit 3680966

Please sign in to comment.