Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 10 additions & 5 deletions .github/actions/build-opencl-clang/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
24 changes: 15 additions & 9 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
analyze:
name: Analyze

runs-on: ubuntu-24.04
runs-on: rss-ubuntu-2404

permissions:
# required for all workflows
Expand All @@ -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 \
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-demand-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-push-verification-in-tree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/on-push-verification-out-of-tree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand All @@ -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)
4 changes: 2 additions & 2 deletions .github/workflows/scheduled-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading