From 0fd351d71d3acc545d03fbe6d85cf40448b15f56 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Fri, 22 Dec 2023 10:24:56 +0100 Subject: [PATCH] feat: add llvm & ebpf libraries --- .gitea/workflows/act_runtime.yaml | 4 +++- act_runtime/Dockerfile | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/act_runtime.yaml b/.gitea/workflows/act_runtime.yaml index c539351..f080e52 100644 --- a/.gitea/workflows/act_runtime.yaml +++ b/.gitea/workflows/act_runtime.yaml @@ -9,6 +9,7 @@ on: env: TAGS: '{"ubuntu-latest": {"node:20-bullseye-slim": "20.04-arm64","node:20-bookworm-slim": "arm64"},"ubuntu-latest-amd64": {"node:20-bullseye-slim": "20.04-amd64","node:20-bookworm-slim": "amd64"}}' + VERSIONS: '{"node:20-bullseye-slim": {"llvm": "13"},"node:20-bookworm-slim": {"llvm": "16"}}' jobs: build_images: @@ -41,4 +42,5 @@ jobs: push: true tags: code.icb4dc0.de/infrastructure/images/act_runtime:${{ fromJSON(env.TAGS)[matrix.os][matrix.base] }} build-args: | - BASE_IMAGE=${{ matrix.base }} \ No newline at end of file + BASE_IMAGE=${{ matrix.base }} + LLVM_VERSION=${{ fromJSON(env.VERSIONS)[matrix.base]["llvm"] }} \ No newline at end of file diff --git a/act_runtime/Dockerfile b/act_runtime/Dockerfile index 5455997..29f3405 100644 --- a/act_runtime/Dockerfile +++ b/act_runtime/Dockerfile @@ -1,11 +1,28 @@ ARG BASE_IMAGE=node:20-bookworm-slim +ARG LLVM_VERSION=16 FROM ${BASE_IMAGE} RUN --mount=type=cache,target=/var/lib/apt \ --mount=type=cache,target=/var/lib/cache \ apt-get update && \ - apt-get install -y sudo git-lfs ca-certificates curl jq gnupg gcc make unzip libgraphite2-3 zstd && \ + apt-get install -y \ + sudo \ + git-lfs \ + ca-certificates \ + curl \ + jq \ + gnupg \ + gcc \ + clang-${LLVM_VERSION} \ + llvm-${LLVM_VERSION} \ + libbpf-dev \ + make \ + unzip \ + libgraphite2-3 \ + zstd && \ + ln -s /usr/lib/llvm-16/bin/clangd /usr/bin/cland && \ + ln -s -f /usr/lib/llvm-16/bin/llc /usr/bin/ && \ mkdir -p /etc/apt/keyrings/ && \ curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ echo \