From 94ef423ff9f05fa3d7152bab262bd03e52816185 Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Sat, 13 Sep 2025 10:58:17 +0800 Subject: [PATCH] ci: build builders --- .github/workflows/cuda-builder.yml | 14 +++++++++----- Containerfile => cuda-builder.cf | 16 +++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) rename Containerfile => cuda-builder.cf (81%) diff --git a/.github/workflows/cuda-builder.yml b/.github/workflows/cuda-builder.yml index dbd1149..0cc57ed 100644 --- a/.github/workflows/cuda-builder.yml +++ b/.github/workflows/cuda-builder.yml @@ -1,4 +1,4 @@ -name: CUDA Builder +name: cuda builder on: workflow_dispatch: @@ -6,7 +6,12 @@ on: branches: - main paths: - - Containerfile + - cuda-builder.cf + pull_request: + branches: + - main + paths: + - cuda-builder.cf permissions: contents: read @@ -23,8 +28,7 @@ jobs: - 12.9.0 - 13.0.0 steps: - - name: Normalize owner and set IMAGE_NAME - shell: bash + - shell: bash run: | echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/cuda-builder" >> "$GITHUB_ENV" @@ -56,7 +60,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: Containerfile + file: cuda-builder.cf build-args: | CUDA_TAG=${{ matrix.cuda_tag }} pull: true diff --git a/Containerfile b/cuda-builder.cf similarity index 81% rename from Containerfile rename to cuda-builder.cf index 1bd0e62..be4b0ab 100644 --- a/Containerfile +++ b/cuda-builder.cf @@ -12,11 +12,17 @@ ARG CUDA_TAG ENV CUDA_TAG=${CUDA_TAG} # System dependencies for building Rust/CUDA projects -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - curl ca-certificates pkg-config build-essential \ - libssl-dev git clang cmake && \ - rm -rf /var/lib/apt/lists/* +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + curl \ + ca-certificates \ + pkg-config \ + build-essential \ + libssl-dev \ + git \ + clang \ + cmake \ + && rm -rf /var/lib/apt/lists/* # Install Rust (stable, minimal profile) ENV RUSTUP_HOME=/opt/rustup \