[llvm-branch-commits] [llvm] [CI][Github] Add linux premerge workflow (PR #119635)
Aiden Grossman via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Dec 11 16:41:48 PST 2024
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/119635
>From 19f4098c0934f242ed5b332533dfe03c44e82de8 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 11 Dec 2024 23:31:07 +0000
Subject: [PATCH 01/12] [CI][Github] Add linux premerge workflow
This patch adds a Github Actions workflow for Linux premerge. This currently
just calls into the existing CI scripts as a starting point.
---
.github/workflows/premerge.yaml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 .github/workflows/premerge.yaml
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
new file mode 100644
index 00000000000000..33a5b57ab3548f
--- /dev/null
+++ b/.github/workflows/premerge.yaml
@@ -0,0 +1,20 @@
+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: ubuntu-latest
+ steps:
+ - name: Checkout LLVM
+ uses: actions/checkout at v4
+ - name: Build and Test
+ run: |
+ echo test
>From 9c8661960efcbfee9164dcc74bca22c5e30adbc9 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 11 Dec 2024 23:44:30 +0000
Subject: [PATCH 02/12] Modification stuff
---
.github/workflows/premerge.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 33a5b57ab3548f..e471f0d3aa256c 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -17,4 +17,8 @@ jobs:
uses: actions/checkout at v4
- name: Build and Test
run: |
- echo test
+ ${MODIFIED_FILES:=$(git diff --name-only HEAD~1...HEAD)}
+ echo $MODIFIED_FILES
+ modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u)
+ echo "$modified_dirs" >&2
+
>From 60c621205f3994c7a0b4e34d087bb11f6dbda7f4 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 11 Dec 2024 23:51:04 +0000
Subject: [PATCH 03/12] Adjust depth
---
.github/workflows/premerge.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index e471f0d3aa256c..632c5ca38a1784 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout LLVM
uses: actions/checkout at v4
+ with:
+ fetch-depth: 2
- name: Build and Test
run: |
${MODIFIED_FILES:=$(git diff --name-only HEAD~1...HEAD)}
>From 49b3859a055e7aa788c74e09a438001602fc00c1 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 11 Dec 2024 23:53:31 +0000
Subject: [PATCH 04/12] maybe
---
.github/workflows/premerge.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 632c5ca38a1784..1964085cbf0cfc 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -22,5 +22,5 @@ jobs:
${MODIFIED_FILES:=$(git diff --name-only HEAD~1...HEAD)}
echo $MODIFIED_FILES
modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u)
- echo "$modified_dirs" >&2
+ echo "$modified_dirs"
>From 41efe71d08fe063f1ee96731ea32f313e6422a1d Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 11 Dec 2024 23:54:41 +0000
Subject: [PATCH 05/12] fix thing
---
.github/workflows/premerge.yaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 1964085cbf0cfc..17094574499281 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -19,8 +19,8 @@ jobs:
fetch-depth: 2
- name: Build and Test
run: |
- ${MODIFIED_FILES:=$(git diff --name-only HEAD~1...HEAD)}
- echo $MODIFIED_FILES
- modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u)
+ modified_files=$(git diff --name-only HEAD~1...HEAD)
+ echo $modified_files
+ modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
echo "$modified_dirs"
>From cb5cf35c20e40ba461fb0f6f75f0409ce14ec7ad Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 11 Dec 2024 23:59:54 +0000
Subject: [PATCH 06/12] incremental testing
---
.github/workflows/premerge.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 17094574499281..94b0f97ba49509 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -24,3 +24,16 @@ jobs:
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
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)
+
>From 43ca65316a18d34a4557281467d2f3baa94d9ecb Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 12 Dec 2024 00:04:04 +0000
Subject: [PATCH 07/12] Add pipeline
---
.github/workflows/premerge.yaml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 94b0f97ba49509..a32847c94a6093 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -20,9 +20,7 @@ jobs:
- name: Build and Test
run: |
modified_files=$(git diff --name-only HEAD~1...HEAD)
- echo $modified_files
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
- echo "$modified_dirs"
. ./.ci/compute-projects.sh
@@ -37,3 +35,9 @@ jobs:
linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
+ 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}"
+
+ ./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"
>From 67b537d6fe00877ffd318e5fe26094d39211be78 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 12 Dec 2024 00:09:06 +0000
Subject: [PATCH 08/12] Switch container
---
.github/workflows/premerge.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index a32847c94a6093..e9a4f47428206e 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -12,6 +12,8 @@ jobs:
premerge-checks-linux:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/llvm/ci-ubuntu-22.04:latest
steps:
- name: Checkout LLVM
uses: actions/checkout at v4
>From 5f4e4517ced8a40ca78368b1eab14a18cc904d00 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 12 Dec 2024 00:23:04 +0000
Subject: [PATCH 09/12] debugging
---
.github/workflows/premerge.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index e9a4f47428206e..ece3483f2284fa 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -21,6 +21,9 @@ jobs:
fetch-depth: 2
- name: Build and Test
run: |
+ ls
+ pwd
+
modified_files=$(git diff --name-only HEAD~1...HEAD)
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
>From cd8094f61d8e9836ee5edfc72d963aef29f5f110 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 12 Dec 2024 00:25:26 +0000
Subject: [PATCH 10/12] debugging2
---
.github/workflows/premerge.yaml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index ece3483f2284fa..bb7e9674f2a25c 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -21,8 +21,7 @@ jobs:
fetch-depth: 2
- name: Build and Test
run: |
- ls
- pwd
+ ls -a
modified_files=$(git diff --name-only HEAD~1...HEAD)
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
>From 58860c6b2526a1540f9847568c0015c5e03a8da4 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 12 Dec 2024 00:33:42 +0000
Subject: [PATCH 11/12] debugging 3
---
.github/workflows/premerge.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index bb7e9674f2a25c..8eb5f1baa8f911 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -23,6 +23,8 @@ jobs:
run: |
ls -a
+ echo $(pwd)
+
modified_files=$(git diff --name-only HEAD~1...HEAD)
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
>From c6260931f40a6ec7e5a3dbc52f2ee6ba8910045e Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 12 Dec 2024 00:41:32 +0000
Subject: [PATCH 12/12] debugging 4
---
.github/workflows/premerge.yaml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 8eb5f1baa8f911..5535732329116a 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -21,9 +21,7 @@ jobs:
fetch-depth: 2
- name: Build and Test
run: |
- ls -a
-
- echo $(pwd)
+ echo $(git status)
modified_files=$(git diff --name-only HEAD~1...HEAD)
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
More information about the llvm-branch-commits
mailing list