From ed921006e9c7a6811f2f1b0bd18d1941be2cceeb Mon Sep 17 00:00:00 2001 From: Peter Kurfer <peter@icb4dc0.de> Date: Wed, 12 Feb 2025 15:53:43 +0100 Subject: [PATCH] fix(act): use different LLVM versions --- .forgejo/workflows/act_runtime.yaml | 4 ++++ act_runtime/Dockerfile | 10 ++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/act_runtime.yaml b/.forgejo/workflows/act_runtime.yaml index a78ab56..80fa20f 100644 --- a/.forgejo/workflows/act_runtime.yaml +++ b/.forgejo/workflows/act_runtime.yaml @@ -10,6 +10,9 @@ on: - ".forgejo/workflows/act_runtime.yaml" - "act_runtime/**" +env: + LLVM_VERSIONS: '{"24.04": "19", "22.04": "15"}' + jobs: build_images: strategy: @@ -40,3 +43,4 @@ jobs: tags: code.icb4dc0.de/infrastructure/images/act_runtime:${{ matrix.base_tage }} build-args: | BASE_IMAGE=ubuntu:${{ matrix.base_tage }} + LLVM_VERSION=${{ fromJSON(env.LLVM_VERSIONS)[matrix.base_tage] }} diff --git a/act_runtime/Dockerfile b/act_runtime/Dockerfile index 6cd1e20..35566a1 100644 --- a/act_runtime/Dockerfile +++ b/act_runtime/Dockerfile @@ -9,9 +9,7 @@ ARG TARGETARCH RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - # common tools -RUN --mount=type=cache,target=/var/lib/cache \ - --mount=type=cache,target=/var/cache/apt \ - apt-get update && \ +RUN apt-get update && \ apt-get install -y \ lsb-release \ sudo \ @@ -29,6 +27,7 @@ RUN --mount=type=cache,target=/var/lib/cache \ nodejs \ libgraphite2-3 \ zstd && \ + apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ ln -s /usr/lib/llvm-${LLVM_VERSION}/bin/clang /usr/bin/clang && \ ln -s -f /usr/lib/llvm-${LLVM_VERSION}/bin/llc /usr/bin/ @@ -37,15 +36,14 @@ ADD --chmod=444 https://cli.github.com/packages/githubcli-archive-keyring.gpg /e ADD --chmod=444 https://download.docker.com/linux/debian/gpg /etc/apt/keyrings/docker.asc # Docker and other tools -RUN --mount=type=cache,target=/var/lib/cache \ - --mount=type=cache,target=/var/cache/apt \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && \ +RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && \ echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list && \ apt-get update && \ apt-get install -y \ gh \ docker-ce-cli docker-buildx-plugin && \ + apt-get clean && \ rm -rf /var/lib/apt/lists/* # Rclone