[llvm] [workflows] Build a container for running CI on github actions (PR #75286)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 23 12:37:53 PST 2023


================
@@ -0,0 +1,52 @@
+
+name: Build CI Container
+
+permissions:
+  contents: read
+
+on:
+  push:
+    branches:
+      - main
+    paths:
+      - .github/workflows/build-ci-container.yml
+      - '.github/workflows/containers/github-action-ci/**'
+  pull_request:
+    branches:
+      - main
+    paths:
+      - .github/workflows/build-ci-container.yml
+      - '.github/workflows/containers/github-action-ci/**'
+
+jobs:
+  build-ci-container:
+    if: github.repository_owner == 'llvm'
+    runs-on: ubuntu-latest
+    permissions:
+      packages: write
+    steps:
+      - name: Write Variables
+        id: vars
+        run: |
+          tag=`date +%s`
+          container_name="ghcr.io/$GITHUB_REPOSITORY_OWNER/ci-ubuntu-22.04"
+          echo "container-name=$container_name" >> $GITHUB_OUTPUT
+          echo "container-name-tag=$container_name:$tag" >> $GITHUB_OUTPUT
+
+      - name: Checkout LLVM
+        uses: actions/checkout at v4
----------------
boomanaiden154 wrote:

If we only need the one directory for the step below, maybe we could do a sparse checkout? That would speed things up significantly from my testing.

https://github.com/llvm/llvm-project/pull/75286


More information about the llvm-commits mailing list