CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
121 lines
4.7 KiB
YAML
121 lines
4.7 KiB
YAML
# This workflow is intended to check that out-of-tree build of the translator is
|
|
# healthy and all tests pass. It is used in pre-commits and nightly builds.
|
|
#
|
|
# Documentation for GitHub Actions:
|
|
# [workflow-syntax]: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
|
|
# [context-and-expression-syntax]: https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions
|
|
name: Out-of-tree build & tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- llvm_release_*
|
|
paths-ignore: # no need to check build for:
|
|
- 'docs/**' # documentation
|
|
- '**.md' # README
|
|
- '**/check-code-style.yml' # check-code-style workflow
|
|
- '**/check-in-tree-build.yml' # check-in-tree-build workflow
|
|
- '**/backport-to-branch.yml' # backport-to-branch workflow
|
|
- '**/patch-release.yaml' # patch-release workflow
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- llvm_release_*
|
|
paths-ignore: # no need to check build for:
|
|
- 'docs/**' # documentation
|
|
- '**.md' # README
|
|
- '**/check-code-style.yml' # check-code-style workflow
|
|
- '**/check-in-tree-build.yml' # check-in-tree-build workflow
|
|
- '**/backport-to-branch.yml' # backport-to-branch workflow
|
|
- '**/patch-release.yaml' # patch-release workflow
|
|
repository_dispatch:
|
|
types: [backport-complete]
|
|
branches:
|
|
- main
|
|
- llvm_release_*
|
|
paths-ignore: # no need to check formatting for:
|
|
- 'docs/**' # documentation
|
|
- '**.md' # README
|
|
- '**/check-code-style.yml' # check-code-style workflow
|
|
- '**/check-in-tree-build.yml' # check-in-tree-build workflow
|
|
- '**/backport-to-branch.yml' # backport-to-branch workflow
|
|
- '**/patch-release.yaml' # patch-release workflow
|
|
schedule:
|
|
- cron: 0 0 * * *
|
|
|
|
env:
|
|
LLVM_VERSION: 23
|
|
SPIRV_TOOLS_INSTALL: ${{ github.workspace }}/spirv-tools-install
|
|
|
|
jobs:
|
|
build_and_test:
|
|
name: Linux
|
|
strategy:
|
|
matrix:
|
|
build_type: [Release, Debug]
|
|
fail-fast: false
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
|
|
echo "deb https://apt.llvm.org/noble/ llvm-toolchain-noble main" | sudo tee -a /etc/apt/sources.list
|
|
sudo apt-get update
|
|
sudo apt-get -yq --no-install-suggests --no-install-recommends install \
|
|
clang-${{ env.LLVM_VERSION }} \
|
|
clang-tools-${{ env.LLVM_VERSION }} \
|
|
llvm-${{ env.LLVM_VERSION }}-dev \
|
|
libllvmlibc-${{ env.LLVM_VERSION }}-dev \
|
|
libomp-${{ env.LLVM_VERSION }}-dev \
|
|
llvm-${{ env.LLVM_VERSION }}-tools \
|
|
mlir-${{ env.LLVM_VERSION }}-tools \
|
|
libpolly-${{ env.LLVM_VERSION }}-dev
|
|
# Linux systems in GitHub Actions already have older versions of clang
|
|
# pre-installed. Make sure to override these with the relevant version.
|
|
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.LLVM_VERSION }} 1000
|
|
- name: Restore SPIRV-Tools cache
|
|
# The prebuild-spirv-tools workflow owns populating this cache.
|
|
# The primary key never matches (no one saves it); restore-keys
|
|
# pulls the most recent prebuild entry.
|
|
uses: actions/cache/restore@v5
|
|
with:
|
|
path: ${{ env.SPIRV_TOOLS_INSTALL }}
|
|
key: spirv-tools-main-latest
|
|
restore-keys: spirv-tools-main-
|
|
- name: Checkout the translator sources
|
|
uses: actions/checkout@v5
|
|
with:
|
|
path: SPIRV-LLVM-Translator
|
|
- name: Get tag for SPIR-V Headers
|
|
id: spirv-headers-tag
|
|
run: |
|
|
echo "spirv_headers_tag=$(cat SPIRV-LLVM-Translator/spirv-headers-tag.conf)" >> $GITHUB_ENV
|
|
- name: Checkout SPIR-V Headers
|
|
uses: actions/checkout@v5
|
|
with:
|
|
repository: KhronosGroup/SPIRV-Headers
|
|
ref: ${{ env.spirv_headers_tag }}
|
|
path: SPIRV-Headers
|
|
- name: Configure
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake ${{ github.workspace }}/SPIRV-LLVM-Translator \
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
|
-DCMAKE_CXX_FLAGS="-Werror" \
|
|
-DLLVM_INCLUDE_TESTS=ON \
|
|
-DLLVM_EXTERNAL_LIT="/usr/lib/llvm-${{ env.LLVM_VERSION }}/bin/lit" \
|
|
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${{ github.workspace }}/SPIRV-Headers \
|
|
-DCMAKE_PREFIX_PATH=${{ env.SPIRV_TOOLS_INSTALL }} \
|
|
-G "Unix Makefiles"
|
|
- name: Build
|
|
run: |
|
|
cd build
|
|
make llvm-spirv -j$(nproc)
|
|
- name: Build tests & test
|
|
run: |
|
|
cd build
|
|
make check-llvm-spirv -j$(nproc)
|
|
|