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 22b1a12 commit f38af02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 54 deletions.
17 changes: 4 additions & 13 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 Expand Up @@ -60,13 +58,6 @@ jobs:
path: ${{ steps.vars.outputs.container-filename }}
retention-days: 14

- name: Test Container
run: |
for image in ${{ steps.vars.outputs.container-name-tag }}; do
# Use --pull=never to ensure we are testing the just built image.
podman run --pull=never --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
done
push-ci-container:
if: github.event_name == 'push'
needs:
Expand All @@ -87,9 +78,9 @@ jobs:
podman load -i ${{ needs.build-ci-container.outputs.container-filename }}
podman tag ${{ needs.build-ci-container.outputs.container-name-tag }} ${{ needs.build-ci-container.outputs.container-name }}:latest
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
podman push ${{ needs.build-ci-container.outputs.container-name-tag }}
podman push ${{ needs.build-ci-container.outputs.container-name }}:latest
echo "podman push ${{ needs.build-ci-container.outputs.container-name-tag }}"
echo "podman push ${{ needs.build-ci-container.outputs.container-name }}:latest"
podman tag ${{ needs.build-ci-container.outputs.container-name-agent-tag }} ${{ needs.build-ci-container.outputs.container-name-agent }}:latest
podman push ${{ needs.build-ci-container.outputs.container-name-agent-tag }}
podman push ${{ needs.build-ci-container.outputs.container-name-agent }}:latest
echo "podman push ${{ needs.build-ci-container.outputs.container-name-agent-tag }}"
echo "podman push ${{ needs.build-ci-container.outputs.container-name-agent }}:latest"
41 changes: 0 additions & 41 deletions .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,7 @@
FROM docker.io/library/ubuntu:22.04 as base
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

FROM base as ci-container

COPY --from=stage1-toolchain $LLVM_SYSROOT $LLVM_SYSROOT

# Need to install curl for hendrikmuhs/ccache-action
# Need nodejs for some of the GitHub actions.
# Need perl-modules for clang analyzer tests.
Expand Down

0 comments on commit f38af02

Please sign in to comment.