[llvm] Point workflow yaml at new docker image (PR #133359)
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 27 20:06:05 PDT 2025
https://github.com/gburgessiv updated https://github.com/llvm/llvm-project/pull/133359
>From b67b29f9d7dbe6c9b12b4f0d322b7be41094b36a Mon Sep 17 00:00:00 2001
From: George Burgess IV <george.burgess.iv at gmail.com>
Date: Thu, 27 Mar 2025 20:48:47 -0600
Subject: [PATCH 1/2] .github: rely on new llvm-project checkout
This is now baked into the docker images to speed up
premerge cycle times.
---
.github/workflows/premerge.yaml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index c488421d37450..951c3273d3f4f 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -26,6 +26,11 @@ concurrency:
jobs:
premerge-checks-linux:
name: Linux Premerge Checks (Test Only - Please Ignore Results)
+ defaults:
+ run:
+ # The premerge Linux docker instance keeps a pristine clone of LLVM in
+ # /home/gha/llvm-project; that should be used as our main workdir.
+ working-directory: /home/gha/llvm-project
if: >-
github.repository_owner == 'llvm' &&
(github.event_name != 'pull_request' || github.event.action != 'closed')
@@ -34,7 +39,7 @@ jobs:
- name: Checkout LLVM
uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
- fetch-depth: 2
+ path: /home/gha/llvm-project
- name: Setup ccache
uses: hendrikmuhs/ccache-action at a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
with:
>From 33650c81a6a35117bc0179d423fc6daf106087f8 Mon Sep 17 00:00:00 2001
From: George Burgess IV <george.burgess.iv at gmail.com>
Date: Thu, 27 Mar 2025 20:49:39 -0600
Subject: [PATCH 2/2] DO NOT COMMIT: tweak premerge to use custom image
For help in testing the prior commit
---
.github/workflows/premerge.yaml | 172 +-------------------------------
1 file changed, 5 insertions(+), 167 deletions(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 951c3273d3f4f..89854c8ff7a71 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -34,7 +34,9 @@ jobs:
if: >-
github.repository_owner == 'llvm' &&
(github.event_name != 'pull_request' || github.event.action != 'closed')
- runs-on: llvm-premerge-linux-runners
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/gburgessiv/llvm-ci-with-checkout:latest
steps:
- name: Checkout LLVM
uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -52,169 +54,5 @@ jobs:
# are ready for people to start recieving notifications.
continue-on-error: true
run: |
- git config --global --add safe.directory '*'
-
- modified_files=$(git diff --name-only HEAD~1...HEAD)
- modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
-
- echo $modified_files
- echo $modified_dirs
-
- . ./.ci/compute-projects.sh
-
- all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
- modified_projects="$(keep-modified-projects ${all_projects})"
-
- linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))
- linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
- linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
-
- linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
- linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
- linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
-
- if [[ "${linux_projects}" == "" ]]; then
- echo "No projects to build"
- exit 0
- fi
-
- echo "Building projects: ${linux_projects}"
- echo "Running project checks targets: ${linux_check_targets}"
- echo "Building runtimes: ${linux_runtimes}"
- echo "Running runtimes checks targets: ${linux_runtime_check_targets}"
-
- export CC=/opt/llvm/bin/clang
- export CXX=/opt/llvm/bin/clang++
-
- ./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"
-
- premerge-checks-windows:
- name: Windows Premerge Checks (Test Only - Please Ignore Results)
- if: >-
- github.repository_owner == 'llvm' &&
- (github.event_name != 'pull_request' || github.event.action != 'closed')
- runs-on: llvm-premerge-windows-runners
- defaults:
- run:
- shell: bash
- steps:
- - name: Checkout LLVM
- uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- with:
- fetch-depth: 2
- - name: Setup ccache
- uses: hendrikmuhs/ccache-action at a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
- with:
- variant: "sccache"
- max-size: "2000M"
- - name: Compute Projects
- id: vars
- run: |
- modified_files=$(git diff --name-only HEAD~1...HEAD)
- modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort | uniq)
-
- echo $modified_files
- echo $modified_dirs
-
- . ./.ci/compute-projects.sh
-
- all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
- modified_projects="$(keep-modified-projects ${all_projects})"
-
- windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
- windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq | tr -d '\r' | tr '\n' ' ')
- windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq | tr -d '\r' | tr '\n' ';')
-
- if [[ "${windows_projects}" == "" ]]; then
- echo "No projects to build"
- fi
-
- echo "Building projects: ${windows_projects}"
- echo "Running project checks targets: ${windows_check_targets}"
-
- echo "windows-projects=${windows_projects}" >> $GITHUB_OUTPUT
- echo "windows-check-targets=${windows_check_targets}" >> $GITHUB_OUTPUT
- - name: Build and Test
- # Mark the job as a success even if the step fails so that people do
- # not get notified while the new premerge pipeline is in an
- # experimental state.
- # TODO(boomanaiden154): Remove this once the pipeline is stable and we
- # are ready for people to start recieving notifications.
- continue-on-error: true
- if: ${{ steps.vars.outputs.windows-projects != '' }}
- shell: cmd
- run: |
- set MAX_PARALLEL_COMPILE_JOBS=64
- set MAX_PARALLEL_LINK_JOBS=64
- call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
- bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
-
- premerge-check-macos:
- name: MacOS Premerge Checks
- runs-on: macos-14
- if: >-
- github.repository_owner == 'llvm' &&
- (startswith(github.ref_name, 'release/') ||
- startswith(github.base_ref, 'release/')) &&
- (github.event_name != 'pull_request' || github.event.action != 'closed')
- steps:
- - name: Checkout LLVM
- uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- with:
- fetch-depth: 2
- - name: Setup ccache
- uses: hendrikmuhs/ccache-action at a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
- with:
- max-size: "2000M"
- - name: Install Ninja
- uses: llvm/actions/install-ninja at main
- - name: Build and Test
- run: |
- modified_files=$(git diff --name-only HEAD~1...HEAD)
- modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
-
- echo $modified_files
- echo $modified_dirs
-
- . ./.ci/compute-projects.sh
-
- all_projects="clang clang-tools-extra lld lldb llvm mlir"
- modified_projects="$(keep-modified-projects ${all_projects})"
-
- # We have to disable the runtimes builds due to https://github.com/llvm/llvm-project/issues/90568
- # and the lldb tests depend on libcxx, so we need to skip them.
- mac_check_targets=$(check-targets ${modified_projects} | sort | uniq | tr '\n' ' ' | sed -e 's/check-lldb //g')
- mac_projects=$(add-dependencies ${modified_projects} | sort | uniq | tr '\n' ' ')
-
- mac_runtimes_to_test=$(compute-runtimes-to-test ${modified_projects})
- mac_runtime_check_targets=$(check-targets ${mac_runtimes_to_test} | sort | uniq | tr '\n' ' ')
- mac_runtimes=$(echo ${mac_runtimes_to_test} | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
-
- if [[ "${mac_projects}" == "" ]]; then
- echo "No projects to build"
- exit 0
- fi
-
- echo "Projects to test: ${modified_projects}"
- echo "Runtimes to test: ${mac_runtimes_to_test}"
- echo "Building projects: ${mac_projects}"
- echo "Running project checks targets: ${mac_check_targets}"
- echo "Building runtimes: ${mac_runtimes}"
- echo "Running runtimes checks targets: ${mac_runtime_check_targets}"
-
- # -DLLVM_DISABLE_ASSEMBLY_FILES=ON is for
- # https://github.com/llvm/llvm-project/issues/81967
- # Disable sharding in lit so that the LIT_XFAIL environment var works.
- cmake -G Ninja \
- -B build \
- -S llvm \
- -DLLVM_ENABLE_PROJECTS="$(echo ${mac_projects} | tr ' ' ';')" \
- -DLLVM_DISABLE_ASSEMBLY_FILES=ON \
- -DCMAKE_BUILD_TYPE=Release \
- -DLLDB_INCLUDE_TESTS=OFF \
- -DLLVM_ENABLE_ASSERTIONS=ON \
- -DCMAKE_C_COMPILER_LAUNCHER=ccache \
- -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-
- # The libcxx tests fail, so we are skipping the runtime targets.
- ninja -C build $mac_check_targets
+ ls /home/gha
+ exit 1
More information about the llvm-commits
mailing list