Skip to content

Commit 6133570

Browse files
committed
DO NOT COMMIT: tweak premerge to use custom image
For help in testing the prior commit
1 parent 03e9744 commit 6133570

File tree

1 file changed

+13
-147
lines changed

1 file changed

+13
-147
lines changed

.github/workflows/premerge.yaml

Lines changed: 13 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -26,157 +26,23 @@ concurrency:
2626
jobs:
2727
premerge-checks-linux:
2828
name: Linux Premerge Checks (Test Only - Please Ignore Results)
29-
defaults:
30-
run:
31-
# The premerge Linux docker instance keeps a pristine clone of LLVM in
32-
# /home/gha/llvm-project; that should be used as our main workdir.
33-
working-directory: /home/gha/llvm-project
3429
if: >-
3530
github.repository_owner == 'llvm' &&
3631
(github.event_name != 'pull_request' || github.event.action != 'closed')
37-
runs-on: llvm-premerge-linux-runners
32+
runs-on: ubuntu-latest
33+
container:
34+
image: ghcr.io/gburgessiv/llvm-ci-with-checkout:latest
3835
steps:
39-
- name: Checkout LLVM
40-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41-
with:
42-
path: /home/gha/llvm-project
43-
- name: Setup ccache
44-
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
45-
with:
46-
max-size: "2000M"
47-
- name: Build and Test
48-
# Mark the job as a success even if the step fails so that people do
49-
# not get notified while the new premerge pipeline is in an
50-
# experimental state.
51-
# TODO(boomanaiden154): Remove this once the pipeline is stable and we
52-
# are ready for people to start recieving notifications.
53-
continue-on-error: true
54-
run: |
55-
git config --global --add safe.directory '*'
56-
57-
source <(git diff --name-only HEAD~1...HEAD | python3 .ci/compute_projects.py)
58-
59-
if [[ "${projects_to_build}" == "" ]]; then
60-
echo "No projects to build"
61-
exit 0
62-
fi
63-
64-
echo "Building projects: ${projects_to_build}"
65-
echo "Running project checks targets: ${project_check_targets}"
66-
echo "Building runtimes: ${runtimes_to_build}"
67-
echo "Running runtimes checks targets: ${runtimes_check_targets}"
68-
69-
export CC=/opt/llvm/bin/clang
70-
export CXX=/opt/llvm/bin/clang++
71-
72-
./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}"
73-
- name: Upload Artifacts
74-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
75-
with:
76-
name: Premerge Artifacts (Linux)
77-
path: artifacts/
78-
retention-days: 5
79-
include-hidden-files: 'true'
80-
81-
premerge-checks-windows:
82-
name: Windows Premerge Checks (Test Only - Please Ignore Results)
83-
if: >-
84-
github.repository_owner == 'llvm' &&
85-
(github.event_name != 'pull_request' || github.event.action != 'closed')
86-
runs-on: llvm-premerge-windows-runners
87-
defaults:
88-
run:
89-
shell: bash
90-
steps:
91-
- name: Checkout LLVM
92-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
93-
with:
94-
fetch-depth: 2
95-
- name: Setup ccache
96-
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
97-
with:
98-
variant: "sccache"
99-
max-size: "2000M"
100-
- name: Compute Projects
101-
id: vars
102-
run: |
103-
source <(git diff --name-only HEAD~1...HEAD | python .ci/compute_projects.py)
104-
105-
if [[ "${projects_to_build}" == "" ]]; then
106-
echo "No projects to build"
107-
fi
108-
109-
echo "Building projects: ${projects_to_build}"
110-
echo "Running project checks targets: ${project_check_targets}"
111-
112-
echo "windows-projects=${projects_to_build}" >> $GITHUB_OUTPUT
113-
echo "windows-check-targets=${project_check_targets}" >> $GITHUB_OUTPUT
114-
- name: Build and Test
115-
# Mark the job as a success even if the step fails so that people do
116-
# not get notified while the new premerge pipeline is in an
117-
# experimental state.
118-
# TODO(boomanaiden154): Remove this once the pipeline is stable and we
119-
# are ready for people to start recieving notifications.
120-
continue-on-error: true
121-
if: ${{ steps.vars.outputs.windows-projects != '' }}
122-
shell: cmd
36+
- name: Seed LLVM repo
12337
run: |
124-
set MAX_PARALLEL_COMPILE_JOBS=64
125-
set MAX_PARALLEL_LINK_JOBS=64
126-
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
127-
bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
128-
- name: Upload Artifacts
129-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
130-
with:
131-
name: Premerge Artifacts (Windows)
132-
path: artifacts/
133-
retention-days: 5
134-
include-hidden-files: 'true'
135-
136-
premerge-check-macos:
137-
name: MacOS Premerge Checks
138-
runs-on: macos-14
139-
if: >-
140-
github.repository_owner == 'llvm' &&
141-
(startswith(github.ref_name, 'release/') ||
142-
startswith(github.base_ref, 'release/')) &&
143-
(github.event_name != 'pull_request' || github.event.action != 'closed')
144-
steps:
38+
set -e
39+
echo "Removing old workspace dir"
40+
rmdir "${GITHUB_WORKSPACE}"
41+
echo "Creating symlink"
42+
ln -s /home/gha/llvm-project "${GITHUB_WORKSPACE}"
43+
echo "Successfully linked"
14544
- name: Checkout LLVM
146-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
uses: gburgessiv/checkout@cd9bfd32b603629c83b862731b9177c640196083 # v4.2.2
14746
with:
148-
fetch-depth: 2
149-
- name: Setup ccache
150-
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
151-
with:
152-
max-size: "2000M"
153-
- name: Install Ninja
154-
uses: llvm/actions/install-ninja@main
155-
- name: Build and Test
156-
run: |
157-
source <(git diff --name-only HEAD~2..HEAD | python3 .ci/compute_projects.py)
158-
159-
if [[ "${projects_to_build}" == "" ]]; then
160-
echo "No projects to build"
161-
exit 0
162-
fi
163-
164-
echo "Building projects: ${projects_to_build}"
165-
echo "Running project checks targets: ${project_check_targets}"
166-
167-
# -DLLVM_DISABLE_ASSEMBLY_FILES=ON is for
168-
# https://github.com/llvm/llvm-project/issues/81967
169-
# Disable sharding in lit so that the LIT_XFAIL environment var works.
170-
cmake -G Ninja \
171-
-B build \
172-
-S llvm \
173-
-DLLVM_ENABLE_PROJECTS="${projects_to_build}" \
174-
-DLLVM_DISABLE_ASSEMBLY_FILES=ON \
175-
-DCMAKE_BUILD_TYPE=Release \
176-
-DLLDB_INCLUDE_TESTS=OFF \
177-
-DLLVM_ENABLE_ASSERTIONS=ON \
178-
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
179-
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
180-
181-
# The libcxx tests fail, so we are skipping the runtime targets.
182-
ninja -C build ${project_check_targets}
47+
# This repo is frozen with the docker container; no need to clean.
48+
clean: false

0 commit comments

Comments
 (0)