Skip to content

Commit b89617d

Browse files
authored
workflows/premerge: Add macOS testing for release branch (llvm#124303)
Also, remove the old pre-merge tests since Linux and Windows are tested on buildkite now.
1 parent 1a25bea commit b89617d

File tree

6 files changed

+70
-164
lines changed

6 files changed

+70
-164
lines changed

.github/workflows/clang-tests.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/libclc-tests.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/lld-tests.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/lldb-tests.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/llvm-tests.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ on:
1111
paths:
1212
- 'llvm/**'
1313
- '.github/workflows/llvm-tests.yml'
14-
- '.github/workflows/llvm-project-tests.yml'
1514
pull_request:
1615
branches:
1716
- 'release/**'
1817
paths:
1918
- 'llvm/**'
2019
- '.github/workflows/llvm-tests.yml'
21-
- '.github/workflows/llvm-project-tests.yml'
2220

2321
concurrency:
2422
# Skip intermediate builds: always.
@@ -27,14 +25,6 @@ concurrency:
2725
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2826

2927
jobs:
30-
check-all:
31-
if: github.repository_owner == 'llvm'
32-
name: Build and Test
33-
uses: ./.github/workflows/llvm-project-tests.yml
34-
with:
35-
build_target: check-all
36-
projects: clang;lld;libclc;lldb
37-
3828
abi-dump-setup:
3929
if: github.repository_owner == 'llvm'
4030
runs-on: ubuntu-latest

.github/workflows/premerge.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
push:
1111
branches:
1212
- 'main'
13+
- 'release/**'
1314

1415
jobs:
1516
premerge-checks-linux:
@@ -132,3 +133,72 @@ jobs:
132133
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
133134
bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
134135
136+
permerge-check-macos:
137+
runs-on: macos-14
138+
concurrency:
139+
group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }}
140+
cancel-in-progress: true
141+
if: >-
142+
(startswith(github.ref_name, 'release/') ||
143+
startswith(github.base_ref, 'refs/heads/release/'))
144+
steps:
145+
- name: Checkout LLVM
146+
uses: actions/checkout@v4
147+
with:
148+
fetch-depth: 2
149+
- name: Setup ccache
150+
uses: hendrikmuhs/[email protected]
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+
modified_files=$(git diff --name-only HEAD~1...HEAD)
158+
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
159+
160+
echo $modified_files
161+
echo $modified_dirs
162+
163+
. ./.ci/compute-projects.sh
164+
165+
all_projects="clang clang-tools-extra lld lldb llvm mlir"
166+
modified_projects="$(keep-modified-projects ${all_projects})"
167+
168+
# We have to disable the runtimes builds due to https://github.com/llvm/llvm-project/issues/90568
169+
# and the lldb tests depend on libcxx, so we need to skip them.
170+
mac_check_targets=$(check-targets ${modified_projects} | sort | uniq | tr '\n' ' ' | sed -e 's/check-lldb //g')
171+
mac_projects=$(add-dependencies ${modified_projects} | sort | uniq | tr '\n' ' ')
172+
173+
mac_runtimes_to_test=$(compute-runtimes-to-test ${modified_projects})
174+
mac_runtime_check_targets=$(check-targets ${mac_runtimes_to_test} | sort | uniq | tr '\n' ' ')
175+
mac_runtimes=$(echo ${mac_runtimes_to_test} | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
176+
177+
if [[ "${mac_projects}" == "" ]]; then
178+
echo "No projects to build"
179+
exit 0
180+
fi
181+
182+
echo "Projects to test: ${modified_projects}"
183+
echo "Runtimes to test: ${mac_runtimes_to_test}"
184+
echo "Building projects: ${mac_projects}"
185+
echo "Running project checks targets: ${mac_check_targets}"
186+
echo "Building runtimes: ${mac_runtimes}"
187+
echo "Running runtimes checks targets: ${mac_runtime_check_targets}"
188+
189+
# -DLLVM_DISABLE_ASSEMBLY_FILES=ON is for
190+
# https://github.com/llvm/llvm-project/issues/81967
191+
# Disable sharding in lit so that the LIT_XFAIL environment var works.
192+
cmake -G Ninja \
193+
-B build \
194+
-S llvm \
195+
-DLLVM_ENABLE_PROJECTS="$(echo ${mac_projects} | tr ' ' ';')" \
196+
-DLLVM_DISABLE_ASSEMBLY_FILES=ON \
197+
-DCMAKE_BUILD_TYPE=Release \
198+
-DLLDB_INCLUDE_TESTS=OFF \
199+
-DLLVM_ENABLE_ASSERTIONS=ON \
200+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
201+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
202+
203+
# The libcxx tests fail, so we are skipping the runtime targets.
204+
ninja -C build $mac_check_targets

0 commit comments

Comments
 (0)