[llvm] workflows/release-binaries: Checkout validate-release-version in upload step (PR #209246)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 09:43:11 PDT 2026


https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/209246

>From f820c159dcab154820b31f7028bfadb722951241 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 13 Jul 2026 08:58:14 -0700
Subject: [PATCH 1/3] workflows/release-binaries: Checkout
 validate-release-version in upload step

The upload-release-artifact composite action uses
validate-release-version, so we need to make sure to check it out.

Also, run the upload step during PR testing so we can catch errors
like this in the future.
---
 .github/workflows/release-binaries.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 6fdf5e8c14cb8..2afaf70b5afd3 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -371,8 +371,6 @@ jobs:
     needs:
       - prepare
       - build-release-package
-    if: >-
-      github.event_name != 'pull_request'
     runs-on: ubuntu-24.04
     permissions:
       contents: write # For release uploads
@@ -386,6 +384,7 @@ jobs:
           persist-credentials: false
           sparse-checkout: |
             .github/workflows/upload-release-artifact
+            .github/workflows/validate-release-version
             llvm/utils/release/github-upload-release.py
             llvm/utils/git/requirements.txt
           sparse-checkout-cone-mode: false

>From 78e3988c5048f5b56870713e8c2015856ece9dac Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Wed, 15 Jul 2026 16:40:08 -0700
Subject: [PATCH 2/3] Validate-Release-Version fixes

---
 .github/workflows/validate-release-version/action.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/validate-release-version/action.yml b/.github/workflows/validate-release-version/action.yml
index 1a10ad67cb549..425da2731837d 100644
--- a/.github/workflows/validate-release-version/action.yml
+++ b/.github/workflows/validate-release-version/action.yml
@@ -9,7 +9,7 @@ runs:
   using: "composite"
   steps:
     - env:
-      RELEASE_VERSON: ${{ inputs.release-version }}
-
+        RELEASE_VERSON: ${{ inputs.release-version }}
+      shell: bash
       run: |
         grep -e '^[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$' <<< "$RELEASE_VERSION"

>From fcde03bd1a53a0162fc30371b32761f4cf0f0b72 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 16 Jul 2026 09:42:27 -0700
Subject: [PATCH 3/3] More validate-release fixes

---
 .../workflows/upload-release-artifact/action.yml   |  3 ++-
 llvm/include/llvm/ProfileData/SampleProfReader.h   | 14 ++++++++------
 llvm/unittests/ProfileData/SampleProfTest.cpp      |  8 --------
 3 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/upload-release-artifact/action.yml b/.github/workflows/upload-release-artifact/action.yml
index 9bddb961c76bd..3705b3033c56e 100644
--- a/.github/workflows/upload-release-artifact/action.yml
+++ b/.github/workflows/upload-release-artifact/action.yml
@@ -43,6 +43,7 @@ runs:
   steps:
     - name: Validate Input
       uses: ./.github/workflows/validate-release-version
+      if: inputs.release-version != ''
       with:
         release-version: ${{ inputs.release-version }}
 
@@ -110,7 +111,7 @@ runs:
 
     - name: Upload Release
       shell: bash
-      if: inputs.upload == 'true'
+      if: inputs.upload == 'true' && inputs.release-version != ''
       env:
         INPUTS_RELEASE_VERSION: ${{ inputs.release-version }}
         DOWNLOAD_PATH: ${{ steps.download-artifact.outputs.download-path }}
diff --git a/llvm/include/llvm/ProfileData/SampleProfReader.h b/llvm/include/llvm/ProfileData/SampleProfReader.h
index 94ac079882582..5ad1633b66321 100644
--- a/llvm/include/llvm/ProfileData/SampleProfReader.h
+++ b/llvm/include/llvm/ProfileData/SampleProfReader.h
@@ -942,6 +942,14 @@ class SampleProfileFuncOffsetTable {
   using OnDiskTableType =
       llvm::OnDiskIterableChainedHashTable<FuncOffsetHashTableInfo>;
 
+  SampleProfileFuncOffsetTable() = delete;
+  SampleProfileFuncOffsetTable(const SampleProfileFuncOffsetTable &) = delete;
+  SampleProfileFuncOffsetTable &
+  operator=(const SampleProfileFuncOffsetTable &) = delete;
+  SampleProfileFuncOffsetTable(SampleProfileFuncOffsetTable &&) = delete;
+  SampleProfileFuncOffsetTable &
+  operator=(SampleProfileFuncOffsetTable &&) = delete;
+
   explicit SampleProfileFuncOffsetTable(InMemoryModeT,
                                         size_t InitialCapacity = 0) {
     InMemoryTable.reserve(InitialCapacity);
@@ -976,12 +984,6 @@ class SampleProfileFuncOffsetTable {
     return std::nullopt;
   }
 
-  /// Clear the in-memory map and release the on-disk table.
-  void clear() {
-    InMemoryTable.clear();
-    OnDiskTable.reset();
-  }
-
 private:
   llvm::DenseMap<hash_code, uint64_t> InMemoryTable;
   std::unique_ptr<OnDiskTableType> OnDiskTable;
diff --git a/llvm/unittests/ProfileData/SampleProfTest.cpp b/llvm/unittests/ProfileData/SampleProfTest.cpp
index b874d9722c51e..e52bbdb069ff0 100644
--- a/llvm/unittests/ProfileData/SampleProfTest.cpp
+++ b/llvm/unittests/ProfileData/SampleProfTest.cpp
@@ -608,10 +608,6 @@ TEST_F(SampleProfTest, SampleProfileFuncOffsetTableInMemory) {
   EXPECT_EQ(Table.lookup(0x11112222ULL), 100);
   EXPECT_EQ(Table.lookup(0x33334444ULL), 200);
   EXPECT_EQ(Table.lookup(0x55556666ULL), std::nullopt);
-
-  // Test clear
-  Table.clear();
-  EXPECT_EQ(Table.lookup(0x11112222ULL), std::nullopt);
 }
 
 TEST_F(SampleProfTest, SampleProfileFuncOffsetTableOnDisk) {
@@ -651,10 +647,6 @@ TEST_F(SampleProfTest, SampleProfileFuncOffsetTableOnDisk) {
 
   // Test non-existent key
   EXPECT_EQ(Table.lookup(0x9999999999999999ULL), std::nullopt);
-
-  // Test clear
-  Table.clear();
-  EXPECT_EQ(Table.lookup(0x1111111122222222ULL), std::nullopt);
 }
 
 // Verify that requesting format version 103 results in a version 103 profile.



More information about the llvm-commits mailing list