diff --git a/.github/actions/build-opencl-clang/action.yml b/.github/actions/build-opencl-clang/action.yml index 1a855bd7c..2594c090e 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: @@ -51,18 +55,19 @@ 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 \ -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 + builddir=${{ github.workspace }}/build + ninja -C "$builddir" opencl-clang -j$(nproc) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index dcda35b50..f50ac6738 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: rss-ubuntu-2404 permissions: # required for all workflows @@ -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 \ @@ -74,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" -j$(nproc) + ninja -C "$builddir" install echo "spirv_translator_install_dir=${builddir}/install" >> $GITHUB_ENV - name: Initialize CodeQL @@ -87,13 +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 - cmake --build . -j $(nproc) + -DCMAKE_BUILD_TYPE=Release \ + -GNinja + ninja -C "$builddir" -j$(nproc) - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1 diff --git a/.github/workflows/on-demand-verification.yml b/.github/workflows/on-demand-verification.yml index bd3cbf59b..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: ubuntu-24.04 + 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 fc4ee4142..b3f53ebce 100644 --- a/.github/workflows/on-push-verification-in-tree.yml +++ b/.github/workflows/on-push-verification-in-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: 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..3ee7bf755 100644 --- a/.github/workflows/on-push-verification-out-of-tree.yml +++ b/.github/workflows/on-push-verification-out-of-tree.yml @@ -31,12 +31,15 @@ jobs: name: linux # ref_name for 'on: push' # base_ref for 'on: pull_request' - runs-on: ubuntu-24.04 + 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 \ @@ -68,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" -j$(nproc) + ninja -C "$builddir" install echo "spirv_translator_install_dir=${builddir}/install" >> $GITHUB_ENV - name: Checkout opencl-clang sources @@ -81,10 +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 - cmake --build . -j $(nproc) + -DCMAKE_BUILD_TYPE=Release \ + -GNinja + ninja -C "$builddir" -j$(nproc) diff --git a/.github/workflows/scheduled-verification.yml b/.github/workflows/scheduled-verification.yml index ddb00fb00..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: ubuntu-24.04 + 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: ubuntu-24.04 + runs-on: rss-ubuntu-2404 steps: - name: Checkout opencl-clang sources for action files availabilty