From 751e554b7d7c25861f538178c79439257fe7a7b7 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Sat, 30 May 2026 05:49:31 +0200 Subject: [PATCH 1/7] Change Actions to use self-hosted runner rss-ubuntu-2404 --- .github/workflows/codeql.yml | 2 +- .github/workflows/on-demand-verification.yml | 2 +- .github/workflows/on-push-verification-in-tree.yml | 12 +++++++++++- .../workflows/on-push-verification-out-of-tree.yml | 2 +- .github/workflows/scheduled-verification.yml | 4 ++-- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index dcda35b50..96c959dde 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,7 +17,7 @@ jobs: analyze: name: Analyze - runs-on: ubuntu-24.04 + runs-on: [self-hosted, rss-ubuntu-2404] permissions: # required for all workflows diff --git a/.github/workflows/on-demand-verification.yml b/.github/workflows/on-demand-verification.yml index bd3cbf59b..b024eba6a 100644 --- a/.github/workflows/on-demand-verification.yml +++ b/.github/workflows/on-demand-verification.yml @@ -36,7 +36,7 @@ on: jobs: verify_on_demand: - runs-on: ubuntu-24.04 + runs-on: [self-hosted, rss-ubuntu-2404] steps: - name: Checkout opencl-clang sources for action files availabilty diff --git a/.github/workflows/on-push-verification-in-tree.yml b/.github/workflows/on-push-verification-in-tree.yml index fc4ee4142..4e34097bd 100644 --- a/.github/workflows/on-push-verification-in-tree.yml +++ b/.github/workflows/on-push-verification-in-tree.yml @@ -27,11 +27,21 @@ on: jobs: + check-cpu: + runs-on: [self-hosted, rss-ubuntu-2404] + steps: + - name: Print CPU Core and Thread Count + run: | + echo "=== Total Logical CPU Cores/Threads ===" + nproc + echo "=== CPU Hardware Details ===" + lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)' + verify_default_branch: name: Linux # ref_name for 'on: push' # base_ref for 'on: pull_request' - runs-on: ubuntu-24.04 + runs-on: [self-hosted, rss-ubuntu-2404] steps: - name: Checkout opencl-clang sources for action files diff --git a/.github/workflows/on-push-verification-out-of-tree.yml b/.github/workflows/on-push-verification-out-of-tree.yml index f334453ee..b466bbc6b 100644 --- a/.github/workflows/on-push-verification-out-of-tree.yml +++ b/.github/workflows/on-push-verification-out-of-tree.yml @@ -31,7 +31,7 @@ jobs: name: linux # ref_name for 'on: push' # base_ref for 'on: pull_request' - runs-on: ubuntu-24.04 + runs-on: [self-hosted, rss-ubuntu-2404] steps: - name: Install llvm and its dependencies diff --git a/.github/workflows/scheduled-verification.yml b/.github/workflows/scheduled-verification.yml index ddb00fb00..ae97ebb1d 100644 --- a/.github/workflows/scheduled-verification.yml +++ b/.github/workflows/scheduled-verification.yml @@ -17,7 +17,7 @@ jobs: verify-default-branches: name: Verify `main` branch - runs-on: ubuntu-24.04 + runs-on: [self-hosted, rss-ubuntu-2404] steps: - name: Checkout opencl-clang sources for action files availabilty @@ -35,7 +35,7 @@ jobs: strategy: matrix: llvm_version: [ 14, 15, 16, 17, 18, 19, 20, 21, 22 ] - runs-on: ubuntu-24.04 + runs-on: [self-hosted, rss-ubuntu-2404] steps: - name: Checkout opencl-clang sources for action files availabilty From f974873ab1887a4e212e859958e40f6724f45910 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Sat, 30 May 2026 06:18:57 +0200 Subject: [PATCH 2/7] remove self-hosted --- .github/workflows/codeql.yml | 2 +- .github/workflows/on-demand-verification.yml | 2 +- .github/workflows/on-push-verification-in-tree.yml | 4 ++-- .github/workflows/on-push-verification-out-of-tree.yml | 2 +- .github/workflows/scheduled-verification.yml | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 96c959dde..d3ea493cc 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,7 +17,7 @@ jobs: analyze: name: Analyze - runs-on: [self-hosted, rss-ubuntu-2404] + runs-on: rss-ubuntu-2404 permissions: # required for all workflows diff --git a/.github/workflows/on-demand-verification.yml b/.github/workflows/on-demand-verification.yml index b024eba6a..227d8e0e8 100644 --- a/.github/workflows/on-demand-verification.yml +++ b/.github/workflows/on-demand-verification.yml @@ -36,7 +36,7 @@ on: jobs: verify_on_demand: - runs-on: [self-hosted, rss-ubuntu-2404] + runs-on: rss-ubuntu-2404 steps: - name: Checkout opencl-clang sources for action files availabilty diff --git a/.github/workflows/on-push-verification-in-tree.yml b/.github/workflows/on-push-verification-in-tree.yml index 4e34097bd..05ae296ed 100644 --- a/.github/workflows/on-push-verification-in-tree.yml +++ b/.github/workflows/on-push-verification-in-tree.yml @@ -28,7 +28,7 @@ on: jobs: check-cpu: - runs-on: [self-hosted, rss-ubuntu-2404] + runs-on: rss-ubuntu-2404 steps: - name: Print CPU Core and Thread Count run: | @@ -41,7 +41,7 @@ jobs: name: Linux # ref_name for 'on: push' # base_ref for 'on: pull_request' - runs-on: [self-hosted, rss-ubuntu-2404] + runs-on: rss-ubuntu-2404 steps: - name: Checkout opencl-clang sources for action files diff --git a/.github/workflows/on-push-verification-out-of-tree.yml b/.github/workflows/on-push-verification-out-of-tree.yml index b466bbc6b..c5f1375b4 100644 --- a/.github/workflows/on-push-verification-out-of-tree.yml +++ b/.github/workflows/on-push-verification-out-of-tree.yml @@ -31,7 +31,7 @@ jobs: name: linux # ref_name for 'on: push' # base_ref for 'on: pull_request' - runs-on: [self-hosted, rss-ubuntu-2404] + runs-on: rss-ubuntu-2404 steps: - name: Install llvm and its dependencies diff --git a/.github/workflows/scheduled-verification.yml b/.github/workflows/scheduled-verification.yml index ae97ebb1d..a94bea4d1 100644 --- a/.github/workflows/scheduled-verification.yml +++ b/.github/workflows/scheduled-verification.yml @@ -17,7 +17,7 @@ jobs: verify-default-branches: name: Verify `main` branch - runs-on: [self-hosted, rss-ubuntu-2404] + runs-on: rss-ubuntu-2404 steps: - name: Checkout opencl-clang sources for action files availabilty @@ -35,7 +35,7 @@ jobs: strategy: matrix: llvm_version: [ 14, 15, 16, 17, 18, 19, 20, 21, 22 ] - runs-on: [self-hosted, rss-ubuntu-2404] + runs-on: rss-ubuntu-2404 steps: - name: Checkout opencl-clang sources for action files availabilty From 33ddef4228e36e47464320a7b0cf626957a23412 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Sat, 30 May 2026 06:37:02 +0200 Subject: [PATCH 3/7] install cmake build-essential ninja-build --- .github/actions/build-opencl-clang/action.yml | 8 ++++++-- .github/workflows/on-push-verification-in-tree.yml | 10 ---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/actions/build-opencl-clang/action.yml b/.github/actions/build-opencl-clang/action.yml index 1a855bd7c..bd279fa60 100644 --- a/.github/actions/build-opencl-clang/action.yml +++ b/.github/actions/build-opencl-clang/action.yml @@ -28,6 +28,10 @@ runs: git config --global user.name "Action Bot" shell: bash + - name: Install dependencies + shell: bash + run: sudo apt-get update -y && sudo apt-get install -y cmake build-essential ninja-build + - name: Checkout LLVM uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: @@ -59,10 +63,10 @@ runs: -DLLVM_EXTERNAL_OPENCL_CLANG_SOURCE_DIR=${{ github.workspace }}/llvm-project/opencl-clang \ -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ -DLLVM_TARGETS_TO_BUILD="X86" \ - -G "Unix Makefiles" + -G Ninja - name: Build shell: bash run: | cd build - make opencl-clang -j8 + ninja opencl-clang diff --git a/.github/workflows/on-push-verification-in-tree.yml b/.github/workflows/on-push-verification-in-tree.yml index 05ae296ed..b3f53ebce 100644 --- a/.github/workflows/on-push-verification-in-tree.yml +++ b/.github/workflows/on-push-verification-in-tree.yml @@ -27,16 +27,6 @@ on: jobs: - check-cpu: - runs-on: rss-ubuntu-2404 - steps: - - name: Print CPU Core and Thread Count - run: | - echo "=== Total Logical CPU Cores/Threads ===" - nproc - echo "=== CPU Hardware Details ===" - lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)' - verify_default_branch: name: Linux # ref_name for 'on: push' From baaef9dfc8c7d85b182c6492303cda2196c89918 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Sat, 30 May 2026 06:41:06 +0200 Subject: [PATCH 4/7] install curl --- .github/workflows/codeql.yml | 5 ++++- .github/workflows/on-push-verification-out-of-tree.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d3ea493cc..b4fb2e28b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -35,9 +35,12 @@ jobs: steps: + - name: Install build dependencies + run: sudo apt-get update -y && sudo apt-get install -y cmake build-essential ninja-build curl + - name: Install llvm and its dependencies run: | - wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/llvm.gpg > /dev/null + curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/llvm.gpg > /dev/null echo "deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble main" | sudo tee /etc/apt/sources.list.d/llvm.list sudo apt-get update sudo apt-get -yq --no-install-suggests --no-install-recommends install \ diff --git a/.github/workflows/on-push-verification-out-of-tree.yml b/.github/workflows/on-push-verification-out-of-tree.yml index c5f1375b4..3f9c97ca0 100644 --- a/.github/workflows/on-push-verification-out-of-tree.yml +++ b/.github/workflows/on-push-verification-out-of-tree.yml @@ -34,9 +34,12 @@ jobs: runs-on: rss-ubuntu-2404 steps: + - name: Install build dependencies + run: sudo apt-get update -y && sudo apt-get install -y cmake build-essential ninja-build curl + - name: Install llvm and its dependencies run: | - wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/llvm.gpg > /dev/null + curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/llvm.gpg > /dev/null echo "deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble main" | sudo tee /etc/apt/sources.list.d/llvm.list sudo apt-get update sudo apt-get -yq --no-install-suggests --no-install-recommends install \ From 8e6fb046b5ef21d6a35d39238a80357417340de8 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Sat, 30 May 2026 06:47:20 +0200 Subject: [PATCH 5/7] use ninja for out-of-tree build --- .github/workflows/codeql.yml | 12 +++++++----- .../workflows/on-push-verification-out-of-tree.yml | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b4fb2e28b..06eb81610 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -77,9 +77,10 @@ jobs: ${{ github.workspace }}/SPIRV-LLVM-Translator \ -DLLVM_INCLUDE_TESTS=OFF \ -DCMAKE_INSTALL_PREFIX="$builddir"/install \ - -DCMAKE_BUILD_TYPE=Release - cmake --build "$builddir" -j $(nproc) - cmake --install "$builddir" + -DCMAKE_BUILD_TYPE=Release \ + -GNinja + ninja -C "$builddir" + ninja -C "$builddir" install echo "spirv_translator_install_dir=${builddir}/install" >> $GITHUB_ENV - name: Initialize CodeQL @@ -95,8 +96,9 @@ jobs: -DPREFERRED_LLVM_VERSION="${{ env.LLVM_VERSION }}.${{ env.LLVM_VERSION_MINOR }}" \ -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \ -DSPIRV_TRANSLATOR_DIR=${{ env.spirv_translator_install_dir }} \ - -DCMAKE_BUILD_TYPE=Release - cmake --build . -j $(nproc) + -DCMAKE_BUILD_TYPE=Release \ + -GNinja + ninja -C build - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1 diff --git a/.github/workflows/on-push-verification-out-of-tree.yml b/.github/workflows/on-push-verification-out-of-tree.yml index 3f9c97ca0..4ce7dd6cc 100644 --- a/.github/workflows/on-push-verification-out-of-tree.yml +++ b/.github/workflows/on-push-verification-out-of-tree.yml @@ -71,9 +71,10 @@ jobs: ${{ github.workspace }}/SPIRV-LLVM-Translator \ -DLLVM_INCLUDE_TESTS=OFF \ -DCMAKE_INSTALL_PREFIX="$builddir"/install \ - -DCMAKE_BUILD_TYPE=Release - cmake --build "$builddir" -j $(nproc) - cmake --install "$builddir" + -DCMAKE_BUILD_TYPE=Release \ + -GNinja + ninja -C "$builddir" + ninja -C "$builddir" install echo "spirv_translator_install_dir=${builddir}/install" >> $GITHUB_ENV - name: Checkout opencl-clang sources @@ -89,5 +90,6 @@ jobs: -DPREFERRED_LLVM_VERSION="${{ env.LLVM_VERSION }}.${{ env.LLVM_VERSION_MINOR }}" \ -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \ -DSPIRV_TRANSLATOR_DIR=${{ env.spirv_translator_install_dir }} \ - -DCMAKE_BUILD_TYPE=Release - cmake --build . -j $(nproc) + -DCMAKE_BUILD_TYPE=Release \ + -GNinja + ninja -C build From f3776e65089465ac977c8dd9e2051383b42373c9 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Sat, 30 May 2026 06:57:50 +0200 Subject: [PATCH 6/7] -j224 --- .github/actions/build-opencl-clang/action.yml | 2 +- .github/workflows/codeql.yml | 4 ++-- .github/workflows/on-push-verification-out-of-tree.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/build-opencl-clang/action.yml b/.github/actions/build-opencl-clang/action.yml index bd279fa60..6fe727812 100644 --- a/.github/actions/build-opencl-clang/action.yml +++ b/.github/actions/build-opencl-clang/action.yml @@ -69,4 +69,4 @@ runs: shell: bash run: | cd build - ninja opencl-clang + ninja opencl-clang -j$(nproc) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 06eb81610..fbc0f5fa5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -79,7 +79,7 @@ jobs: -DCMAKE_INSTALL_PREFIX="$builddir"/install \ -DCMAKE_BUILD_TYPE=Release \ -GNinja - ninja -C "$builddir" + ninja -C "$builddir" -j$(nproc) ninja -C "$builddir" install echo "spirv_translator_install_dir=${builddir}/install" >> $GITHUB_ENV @@ -98,7 +98,7 @@ jobs: -DSPIRV_TRANSLATOR_DIR=${{ env.spirv_translator_install_dir }} \ -DCMAKE_BUILD_TYPE=Release \ -GNinja - ninja -C build + ninja -C build -j$(nproc) - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1 diff --git a/.github/workflows/on-push-verification-out-of-tree.yml b/.github/workflows/on-push-verification-out-of-tree.yml index 4ce7dd6cc..0627badc1 100644 --- a/.github/workflows/on-push-verification-out-of-tree.yml +++ b/.github/workflows/on-push-verification-out-of-tree.yml @@ -73,7 +73,7 @@ jobs: -DCMAKE_INSTALL_PREFIX="$builddir"/install \ -DCMAKE_BUILD_TYPE=Release \ -GNinja - ninja -C "$builddir" + ninja -C "$builddir" -j$(nproc) ninja -C "$builddir" install echo "spirv_translator_install_dir=${builddir}/install" >> $GITHUB_ENV @@ -92,4 +92,4 @@ jobs: -DSPIRV_TRANSLATOR_DIR=${{ env.spirv_translator_install_dir }} \ -DCMAKE_BUILD_TYPE=Release \ -GNinja - ninja -C build + ninja -C build -j$(nproc) From 1f11d897827f3878e63a0845531a97add0d67528 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Sat, 30 May 2026 07:35:39 +0200 Subject: [PATCH 7/7] builddir --- .github/actions/build-opencl-clang/action.yml | 9 +++++---- .github/workflows/codeql.yml | 7 ++++--- .github/workflows/on-push-verification-out-of-tree.yml | 7 ++++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/actions/build-opencl-clang/action.yml b/.github/actions/build-opencl-clang/action.yml index 6fe727812..2594c090e 100644 --- a/.github/actions/build-opencl-clang/action.yml +++ b/.github/actions/build-opencl-clang/action.yml @@ -55,8 +55,9 @@ runs: - name: Configure shell: bash run: | - mkdir build && cd build - cmake ${{ github.workspace }}/llvm-project/llvm \ + builddir=${{ github.workspace }}/build + cmake -B "$builddir" \ + ${{ github.workspace }}/llvm-project/llvm \ -DLLVM_ENABLE_PROJECTS="clang" \ -DLLVM_EXTERNAL_PROJECTS="llvm-spirv;opencl-clang" \ -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=${{ github.workspace }}/llvm-project/SPIRV-LLVM-Translator \ @@ -68,5 +69,5 @@ runs: - name: Build shell: bash run: | - cd build - ninja opencl-clang -j$(nproc) + builddir=${{ github.workspace }}/build + ninja -C "$builddir" opencl-clang -j$(nproc) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fbc0f5fa5..f50ac6738 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -91,14 +91,15 @@ jobs: - name: Build opencl-clang run: | - mkdir build && cd build - cmake ${{ github.workspace }} \ + builddir=${{ github.workspace }}/build + cmake -B "$builddir" \ + ${{ github.workspace }} \ -DPREFERRED_LLVM_VERSION="${{ env.LLVM_VERSION }}.${{ env.LLVM_VERSION_MINOR }}" \ -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \ -DSPIRV_TRANSLATOR_DIR=${{ env.spirv_translator_install_dir }} \ -DCMAKE_BUILD_TYPE=Release \ -GNinja - ninja -C build -j$(nproc) + ninja -C "$builddir" -j$(nproc) - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1 diff --git a/.github/workflows/on-push-verification-out-of-tree.yml b/.github/workflows/on-push-verification-out-of-tree.yml index 0627badc1..3ee7bf755 100644 --- a/.github/workflows/on-push-verification-out-of-tree.yml +++ b/.github/workflows/on-push-verification-out-of-tree.yml @@ -85,11 +85,12 @@ jobs: - name: Build opencl-clang run: | - mkdir build && cd build - cmake ${{ github.workspace }}/opencl-clang \ + builddir=${{ github.workspace }}/build + cmake -B "$builddir" \ + ${{ github.workspace }}/opencl-clang \ -DPREFERRED_LLVM_VERSION="${{ env.LLVM_VERSION }}.${{ env.LLVM_VERSION_MINOR }}" \ -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \ -DSPIRV_TRANSLATOR_DIR=${{ env.spirv_translator_install_dir }} \ -DCMAKE_BUILD_TYPE=Release \ -GNinja - ninja -C build -j$(nproc) + ninja -C "$builddir" -j$(nproc)