Skip to content

[CI][Github] Add linux premerge workflow #119635

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 all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6ffa419
[CI] Refactor common functionality into separate script
boomanaiden154 Dec 11, 2024
d858ae3
Maybe fix paths
boomanaiden154 Dec 11, 2024
a8eae85
Fix spelling
boomanaiden154 Dec 11, 2024
1c020bb
Add missing functions
boomanaiden154 Dec 11, 2024
19f4098
[CI][Github] Add linux premerge workflow
boomanaiden154 Dec 11, 2024
9c86619
Modification stuff
boomanaiden154 Dec 11, 2024
60c6212
Adjust depth
boomanaiden154 Dec 11, 2024
49b3859
maybe
boomanaiden154 Dec 11, 2024
41efe71
fix thing
boomanaiden154 Dec 11, 2024
cb5cf35
incremental testing
boomanaiden154 Dec 11, 2024
43ca653
Add pipeline
boomanaiden154 Dec 12, 2024
67b537d
Switch container
boomanaiden154 Dec 12, 2024
5f4e451
debugging
boomanaiden154 Dec 12, 2024
cd8094f
debugging2
boomanaiden154 Dec 12, 2024
58860c6
debugging 3
boomanaiden154 Dec 12, 2024
c626093
debugging 4
boomanaiden154 Dec 12, 2024
a99b5a3
debugging 5
boomanaiden154 Dec 12, 2024
4d17c17
debugging 6
boomanaiden154 Dec 12, 2024
61a9e61
debugging 7
boomanaiden154 Dec 12, 2024
41296b6
debugging 8
boomanaiden154 Dec 12, 2024
80db387
debugging 9
boomanaiden154 Dec 12, 2024
ed2f888
debugging 10
boomanaiden154 Dec 12, 2024
47c666f
debugging 11
boomanaiden154 Dec 12, 2024
264ae7f
debugging 12
boomanaiden154 Dec 12, 2024
8ecd16d
Reenable
boomanaiden154 Dec 12, 2024
240908a
Add missing system dep
boomanaiden154 Dec 12, 2024
9ad6ac9
More system deps
boomanaiden154 Dec 12, 2024
740ac18
Also update
boomanaiden154 Dec 12, 2024
e6a4282
Force clang
boomanaiden154 Dec 12, 2024
715079b
Early exit
boomanaiden154 Dec 12, 2024
7ad0671
Switch to premerge runners
boomanaiden154 Dec 12, 2024
14b4b9a
test commit
boomanaiden154 Dec 12, 2024
86d4a9b
Minor fixes
boomanaiden154 Dec 13, 2024
b54681c
Merge branch 'main' into users/boomanaiden154/refactor-buildkite-shel…
boomanaiden154 Dec 13, 2024
d580ed0
Merge branch 'users/boomanaiden154/refactor-buildkite-shell-scripts' …
boomanaiden154 Dec 13, 2024
b4a8ef7
Add tzdata for libc++
boomanaiden154 Dec 13, 2024
f49ac63
no prompting during package install
boomanaiden154 Dec 13, 2024
89d14aa
test
boomanaiden154 Dec 13, 2024
8f0dd03
Fix libc++ test failures
boomanaiden154 Dec 14, 2024
536fa84
Only run buildkite agent if it exists
boomanaiden154 Dec 14, 2024
fe5e092
Fix spelling
boomanaiden154 Dec 14, 2024
14dcc62
fix runtimes
boomanaiden154 Dec 14, 2024
0e86199
Try full build
boomanaiden154 Dec 14, 2024
7c9b0e0
Try non-root user
boomanaiden154 Dec 14, 2024
e19ec9e
Remove installing things
boomanaiden154 Dec 14, 2024
7a0634a
Revert "Fix libc++ test failures"
boomanaiden154 Dec 15, 2024
dfd04e9
Merge branch 'main' into users/boomanaiden154/github-actions-linux-pi…
boomanaiden154 Dec 15, 2024
53bd20f
Clean some stuff up
boomanaiden154 Dec 15, 2024
cc7bce1
more cleanup
boomanaiden154 Dec 15, 2024
70bffd2
Switch image back
boomanaiden154 Dec 15, 2024
a37cfb8
Revert "Switch image back"
boomanaiden154 Dec 15, 2024
691dcaa
Minor improvements
boomanaiden154 Dec 15, 2024
f3f68a4
Revert changes
boomanaiden154 Dec 15, 2024
e529bc9
Switch image to official one
boomanaiden154 Dec 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/premerge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: LLVM Premerge Checks

permissions:
contents: read

on:
pull_request:
paths:
- .github/workflows/premerge.yaml

jobs:
premerge-checks-linux:
if: github.repository_owner == 'llvm'
runs-on: llvm-premerge-linux-runners
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
container:
image: ghcr.io/llvm/ci-ubuntu-22.04:latest
defaults:
run:
shell: bash
steps:
- name: Checkout LLVM
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup ccache
uses: hendrikmuhs/[email protected]
- name: Build and Test
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you mean to leave this here for debugging, should we add better output?
Like:

echo "===== Modified files in the PR ====="
echo $modified_files
echo "===== Modified dirs in the PR ====="
echo $modified_dies


. ./.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})"
Loading