-
Notifications
You must be signed in to change notification settings - Fork 13.6k
workflows/premerge: Add macOS testing for release branch #124303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1dfa287
workflows/premerge: Add macOS testing for release branch
tstellar e804579
Remove safe directory
tstellar 6e1df98
Remove old tests
tstellar 31f636a
typo
tstellar 55ab9a0
XXX: Debug
tstellar a5ea95e
Drop libcxx tests
tstellar 1ddc081
Disable check-clang-tools
tstellar 36794cf
Disable runtimes
tstellar 1f9b05c
Revert "Disable check-clang-tools"
tstellar 9b57642
Disable lldb tests
tstellar a5ccba1
Try to xfail some tests
tstellar 1e6994d
Try again to filter out tests
tstellar 77ad8b5
Try to filter tests again
tstellar f475f73
Fix XFAIL
tstellar 7b2d53a
Fix xfalis
tstellar 67472af
Merge branch 'main' into macos-premerge-release
tstellar 3ddc308
Fixup merge
tstellar b44d122
Fix source
tstellar 83065a4
Add concurrency
tstellar ab2ed0b
Add comment for failing tests
tstellar cd89a78
Remove xfail
tstellar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ on: | |
push: | ||
branches: | ||
- 'main' | ||
- 'release/**' | ||
|
||
jobs: | ||
premerge-checks-linux: | ||
|
@@ -70,3 +71,70 @@ jobs: | |
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})" | ||
|
||
|
||
permerge-check-macos: | ||
runs-on: macos-14 | ||
if: >- | ||
github.repository_owner == 'llvm' && | ||
(startswith(github.ref_name, 'release/') || | ||
startswith(github.base_ref, 'refs/heads/release/') | ||
steps: | ||
- name: Checkout LLVM | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Setup ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
max-size: "2000M" | ||
- name: Install Ninja | ||
uses: llvm/actions/install-ninja@main | ||
- name: Build and Test | ||
run: | | ||
git config --global --add safe.directory '*' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm assuming this was copied from the Linux build? Can you try a build without it? |
||
|
||
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})" | ||
|
||
mac_check_targets=$(check-targets ${modified_projects} | sort | uniq | tr '\n' ' ') | ||
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 | ||
cmake -G Ninja \ | ||
-B build \ | ||
-S llvm \ | ||
-DLLVM_ENABLE_PROJECTS="$(echo ${mac_projects} | tr ' ' ';')" \ | ||
-DLLVM_ENABLE_RUNTIMES="$(echo ${mac_runtimes} | tr ' ' ';')" \ | ||
-DLLVM_DISABLE_ASSEMBLY_FILES=ON \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DLLVM_ENABLE_ASSERTIONS=ON \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
|
||
ninja -C build $mac_check_targets $mac_runtime_check_targets |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you only want this for post-submit testing on the release branch? Is this just for testing currently similar to what we're doing for Linux?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to do pre-commit and post-commit testing, which is what we are currently doing on the release branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.
The plan is to enable premerge testing on the release branch around when we do it on
main
?When exactly do you need this ready by? The LLVM 20 branch date? (Just so I can have a better idea of when we need the new premerge to be up and running).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to have the mac testing ready by the LLVM 20 branch date. For Windows and Linux we are already covered on the release branch by buildkite, so there is no rush to start using the new GitHub Actions workflow for those platforms.
If the new workflow isn't ready. I can patch the workflow file in the release branch to drop the:
And also disable the linux job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I'd like to have everything ready by then, but can't make any guarantees. We'll probably have to backport some patches to the release branch as once we validate the new premerge workflow, we want to stop running the Buildkite pipeline, but they should be lowrisk (only impacting CI), and I can help with that.