From 97f15430b265570aed01bd61a256b726a3027915 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 8 Oct 2024 02:24:56 +0300 Subject: [PATCH] Disable GH Actions for now. --- .github/workflows/check-code-style.yml | 196 ++++----- .github/workflows/check-in-tree-build.yml | 406 +++++++++--------- .github/workflows/check-out-of-tree-build.yml | 182 ++++---- .github/workflows/patch-release.yaml | 168 ++++---- 4 files changed, 476 insertions(+), 476 deletions(-) diff --git a/.github/workflows/check-code-style.yml b/.github/workflows/check-code-style.yml index c97d109ab..69edd490f 100644 --- a/.github/workflows/check-code-style.yml +++ b/.github/workflows/check-code-style.yml @@ -6,111 +6,111 @@ # [context-and-expression-syntax]: https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions # [workflow-commands]: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions -name: Check code style +# name: Check code style -on: - pull_request: - branches: - - main - - llvm_release_* - paths-ignore: # no need to check formatting for: - - 'docs/**' # documentation - - 'test/**' # tests - - '**.md' # README - - '**.txt' # CMakeLists.txt - - '**/check-**-build.yml' # Other workflows +# on: +# pull_request: +# branches: +# - main +# - llvm_release_* +# paths-ignore: # no need to check formatting for: +# - 'docs/**' # documentation +# - 'test/**' # tests +# - '**.md' # README +# - '**.txt' # CMakeLists.txt +# - '**/check-**-build.yml' # Other workflows -env: - # We need compile command database in order to perform clang-tidy check. So, - # in order to perform configure step we need to setup llvm-dev package. This - # env variable used to specify desired version of it - LLVM_VERSION: 20 +# env: +# # We need compile command database in order to perform clang-tidy check. So, +# # in order to perform configure step we need to setup llvm-dev package. This +# # env variable used to specify desired version of it +# LLVM_VERSION: 20 -jobs: - clang-format-and-tidy: - name: clang-format & clang-tidy - runs-on: ubuntu-20.04 - steps: - - name: Checkout sources - uses: actions/checkout@v4 - with: - # In order to gather diff from PR we need to fetch not only the latest - # commit. Depth of 2 is enough, because GitHub Actions supply us with - # merge commit as {{ github.sha }}, i.e. the second commit is a merge - # base between target branch and PR - fetch-depth: 2 +# jobs: +# clang-format-and-tidy: +# name: clang-format & clang-tidy +# runs-on: ubuntu-20.04 +# steps: +# - name: Checkout sources +# uses: actions/checkout@v4 +# with: +# # In order to gather diff from PR we need to fetch not only the latest +# # commit. Depth of 2 is enough, because GitHub Actions supply us with +# # merge commit as {{ github.sha }}, i.e. the second commit is a merge +# # base between target branch and PR +# fetch-depth: 2 - - name: Gather list of changes - id: gather-list-of-changes - run: | - git diff -U0 --no-color ${{ github.sha }}^ -- include lib \ - ':(exclude)include/LLVMSPIRVExtensions.inc' \ - ':(exclude)lib/SPIRV/libSPIRV/SPIRVErrorEnum.h' \ - ':(exclude)lib/SPIRV/libSPIRV/SPIRVOpCodeEnum.h' \ - ':(exclude)lib/SPIRV/libSPIRV/SPIRVOpCodeEnumInternal.h' \ - > diff-to-inspect.txt - if [ -s diff-to-inspect.txt ]; then - # Here we set an output of our step, which is used later to either - # perform or skip further steps, i.e. there is no sense to install - # clang-format if PR hasn't changed .cpp files at all - # See [workflow-commands] for reference - echo '::set-output name=HAS_CHANGES::true' - fi +# - name: Gather list of changes +# id: gather-list-of-changes +# run: | +# git diff -U0 --no-color ${{ github.sha }}^ -- include lib \ +# ':(exclude)include/LLVMSPIRVExtensions.inc' \ +# ':(exclude)lib/SPIRV/libSPIRV/SPIRVErrorEnum.h' \ +# ':(exclude)lib/SPIRV/libSPIRV/SPIRVOpCodeEnum.h' \ +# ':(exclude)lib/SPIRV/libSPIRV/SPIRVOpCodeEnumInternal.h' \ +# > diff-to-inspect.txt +# if [ -s diff-to-inspect.txt ]; then +# # Here we set an output of our step, which is used later to either +# # perform or skip further steps, i.e. there is no sense to install +# # clang-format if PR hasn't changed .cpp files at all +# # See [workflow-commands] for reference +# echo '::set-output name=HAS_CHANGES::true' +# fi - - name: Install dependencies - if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }} - run: | - # clang-tidy requires compile command database in order to be properly - # launched, so, we need to setup llvm package to perform cmake - # configuration step to generate that database - curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - - echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal main" | sudo tee -a /etc/apt/sources.list - sudo apt-get update - sudo apt-get install -yqq \ - clang-format-${{ env.LLVM_VERSION }} clang-tidy-${{ env.LLVM_VERSION }} \ - clang-tools-${{ env.LLVM_VERSION }} llvm-${{ env.LLVM_VERSION }}-dev \ - libomp-${{ env.LLVM_VERSION }}-dev libllvmlibc-${{ env.LLVM_VERSION }}-dev \ - mlir-${{ env.LLVM_VERSION }}-tools libpolly-${{ env.LLVM_VERSION }}-dev \ +# - name: Install dependencies +# if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }} +# run: | +# # clang-tidy requires compile command database in order to be properly +# # launched, so, we need to setup llvm package to perform cmake +# # configuration step to generate that database +# curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - +# echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal main" | sudo tee -a /etc/apt/sources.list +# sudo apt-get update +# sudo apt-get install -yqq \ +# clang-format-${{ env.LLVM_VERSION }} clang-tidy-${{ env.LLVM_VERSION }} \ +# clang-tools-${{ env.LLVM_VERSION }} llvm-${{ env.LLVM_VERSION }}-dev \ +# libomp-${{ env.LLVM_VERSION }}-dev libllvmlibc-${{ env.LLVM_VERSION }}-dev \ +# mlir-${{ env.LLVM_VERSION }}-tools libpolly-${{ env.LLVM_VERSION }}-dev \ - - name: Generate compile command database - if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }} - run: | - mkdir build && cd build - cmake -DCMAKE_CXX_COMPILER=clang++-${{ env.LLVM_VERSION }} \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ${{ github.workspace }} +# - name: Generate compile command database +# if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }} +# run: | +# mkdir build && cd build +# cmake -DCMAKE_CXX_COMPILER=clang++-${{ env.LLVM_VERSION }} \ +# -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ${{ github.workspace }} - - name: Run clang-format - if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }} - id: run-clang-format - run: | - cat diff-to-inspect.txt | /usr/share/clang/clang-format-${{ env.LLVM_VERSION }}/clang-format-diff.py \ - -p1 -binary clang-format-${{ env.LLVM_VERSION }} +# - name: Run clang-format +# if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }} +# id: run-clang-format +# run: | +# cat diff-to-inspect.txt | /usr/share/clang/clang-format-${{ env.LLVM_VERSION }}/clang-format-diff.py \ +# -p1 -binary clang-format-${{ env.LLVM_VERSION }} - - name: Run clang-tidy - # By some reason, GitHub Actions automatically include "success()" - # expression into an "if" statement if it doesn't contain any of job - # status check functions. This is why this and following steps has - # "always()" and "failure()" in "if" conditions. - # See "Job status check functions" in [context-and-expression-syntax] - if: ${{ always() && steps.gather-list-of-changes.outputs.HAS_CHANGES }} - id: run-clang-tidy - run: | - cat diff-to-inspect.txt | /usr/lib/llvm-${{ env.LLVM_VERSION }}/share/clang/clang-tidy-diff.py \ - -p1 -clang-tidy-binary clang-tidy-${{ env.LLVM_VERSION }} -quiet \ - -path ${{ github.workspace}}/build +# - name: Run clang-tidy +# # By some reason, GitHub Actions automatically include "success()" +# # expression into an "if" statement if it doesn't contain any of job +# # status check functions. This is why this and following steps has +# # "always()" and "failure()" in "if" conditions. +# # See "Job status check functions" in [context-and-expression-syntax] +# if: ${{ always() && steps.gather-list-of-changes.outputs.HAS_CHANGES }} +# id: run-clang-tidy +# run: | +# cat diff-to-inspect.txt | /usr/lib/llvm-${{ env.LLVM_VERSION }}/share/clang/clang-tidy-diff.py \ +# -p1 -clang-tidy-binary clang-tidy-${{ env.LLVM_VERSION }} -quiet \ +# -path ${{ github.workspace}}/build - - name: Upload patch with clang-format fixes - uses: actions/upload-artifact@v4 - if: ${{ failure() && steps.run-clang-format.outcome == 'failure' }} - with: - name: clang-format.patch - path: clang-format.patch - if-no-files-found: ignore +# - name: Upload patch with clang-format fixes +# uses: actions/upload-artifact@v4 +# if: ${{ failure() && steps.run-clang-format.outcome == 'failure' }} +# with: +# name: clang-format.patch +# path: clang-format.patch +# if-no-files-found: ignore - - name: Upload clang-tidy log - uses: actions/upload-artifact@v4 - if: ${{ failure() && steps.run-clang-tidy.outcome == 'failure' }} - with: - name: clang-tidy.log - path: clang-tidy.log - if-no-files-found: ignore +# - name: Upload clang-tidy log +# uses: actions/upload-artifact@v4 +# if: ${{ failure() && steps.run-clang-tidy.outcome == 'failure' }} +# with: +# name: clang-tidy.log +# path: clang-tidy.log +# if-no-files-found: ignore diff --git a/.github/workflows/check-in-tree-build.yml b/.github/workflows/check-in-tree-build.yml index 9eace466c..be33b472e 100644 --- a/.github/workflows/check-in-tree-build.yml +++ b/.github/workflows/check-in-tree-build.yml @@ -1,208 +1,208 @@ -# This workflow is intended to check that in-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: In-tree build & tests +# # This workflow is intended to check that in-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: In-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-out-of-tree-build.yml' # check-out-of-tree-build 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-out-of-tree-build.yml' # check-out-of-tree-build workflow - schedule: - # Ideally, we might want to simplify our regular nightly build as we - # probably don't need every configuration to be built every day: most of - # them are only necessary in pre-commits to avoid breakages - - cron: 0 0 * * * +# 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-out-of-tree-build.yml' # check-out-of-tree-build 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-out-of-tree-build.yml' # check-out-of-tree-build workflow +# schedule: +# # Ideally, we might want to simplify our regular nightly build as we +# # probably don't need every configuration to be built every day: most of +# # them are only necessary in pre-commits to avoid breakages +# - cron: 0 0 * * * -env: - LLVM_VERSION: 20 +# env: +# LLVM_VERSION: 20 -jobs: - build_and_test_linux: - name: Linux - strategy: - matrix: - build_type: [Release, Debug] - shared_libs: [NoSharedLibs] - include: - - build_type: Release - shared_libs: EnableSharedLibs - fail-fast: false - runs-on: ubuntu-22.04 - steps: - - name: Install dependencies - run: | - curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - - curl -L "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo apt-key add - - echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main" | sudo tee -a /etc/apt/sources.list - echo "deb https://packages.lunarg.com/vulkan jammy 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 }} \ - spirv-tools - # 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: Checkout LLVM sources - uses: actions/checkout@v4 - with: - repository: llvm/llvm-project - ref: main - path: llvm-project - - name: Checkout the translator sources - uses: actions/checkout@v4 - with: - path: llvm-project/llvm/projects/SPIRV-LLVM-Translator - - name: Get tag for SPIR-V Headers - id: spirv-headers-tag - run: | - echo "spirv_headers_tag=$(cat llvm-project/llvm/projects/SPIRV-LLVM-Translator/spirv-headers-tag.conf)" >> $GITHUB_ENV - - name: Checkout SPIR-V Headers - uses: actions/checkout@v4 - with: - repository: KhronosGroup/SPIRV-Headers - ref: ${{ env.spirv_headers_tag }} - path: llvm-project/llvm/projects/SPIRV-Headers - - name: Configure - run: | - mkdir build && cd build - # ON/OFF specifically weren't used as a values for shared_libs matrix - # field to improve usability of PR page: instead of (Release, ON) a - # job will be displayed as (Release, EnableSharedLibs) - SHARED_LIBS=OFF - if [[ "${{ matrix.shared_libs }}" == "EnableSharedLibs" ]]; then - SHARED_LIBS=ON - fi - cmake ${{ github.workspace }}/llvm-project/llvm \ - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DBUILD_SHARED_LIBS=${SHARED_LIBS} \ - -DLLVM_TARGETS_TO_BUILD="X86" \ - -DSPIRV_SKIP_CLANG_BUILD=ON \ - -DSPIRV_SKIP_DEBUG_INFO_TESTS=ON \ - -DLLVM_LIT_ARGS="-sv --no-progress-bar" \ - -G "Unix Makefiles" - - name: Build - run: | - cd build - make llvm-spirv -j2 - - name: Build tests & test - run: | - cd build - make check-llvm-spirv -j2 +# jobs: +# build_and_test_linux: +# name: Linux +# strategy: +# matrix: +# build_type: [Release, Debug] +# shared_libs: [NoSharedLibs] +# include: +# - build_type: Release +# shared_libs: EnableSharedLibs +# fail-fast: false +# runs-on: ubuntu-22.04 +# steps: +# - name: Install dependencies +# run: | +# curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - +# curl -L "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo apt-key add - +# echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main" | sudo tee -a /etc/apt/sources.list +# echo "deb https://packages.lunarg.com/vulkan jammy 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 }} \ +# spirv-tools +# # 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: Checkout LLVM sources +# uses: actions/checkout@v4 +# with: +# repository: llvm/llvm-project +# ref: main +# path: llvm-project +# - name: Checkout the translator sources +# uses: actions/checkout@v4 +# with: +# path: llvm-project/llvm/projects/SPIRV-LLVM-Translator +# - name: Get tag for SPIR-V Headers +# id: spirv-headers-tag +# run: | +# echo "spirv_headers_tag=$(cat llvm-project/llvm/projects/SPIRV-LLVM-Translator/spirv-headers-tag.conf)" >> $GITHUB_ENV +# - name: Checkout SPIR-V Headers +# uses: actions/checkout@v4 +# with: +# repository: KhronosGroup/SPIRV-Headers +# ref: ${{ env.spirv_headers_tag }} +# path: llvm-project/llvm/projects/SPIRV-Headers +# - name: Configure +# run: | +# mkdir build && cd build +# # ON/OFF specifically weren't used as a values for shared_libs matrix +# # field to improve usability of PR page: instead of (Release, ON) a +# # job will be displayed as (Release, EnableSharedLibs) +# SHARED_LIBS=OFF +# if [[ "${{ matrix.shared_libs }}" == "EnableSharedLibs" ]]; then +# SHARED_LIBS=ON +# fi +# cmake ${{ github.workspace }}/llvm-project/llvm \ +# -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ +# -DBUILD_SHARED_LIBS=${SHARED_LIBS} \ +# -DLLVM_TARGETS_TO_BUILD="X86" \ +# -DSPIRV_SKIP_CLANG_BUILD=ON \ +# -DSPIRV_SKIP_DEBUG_INFO_TESTS=ON \ +# -DLLVM_LIT_ARGS="-sv --no-progress-bar" \ +# -G "Unix Makefiles" +# - name: Build +# run: | +# cd build +# make llvm-spirv -j2 +# - name: Build tests & test +# run: | +# cd build +# make check-llvm-spirv -j2 - build_windows: - name: Windows - strategy: - matrix: - build_type: [Release] - fail-fast: false - runs-on: windows-latest - steps: - - name: Checkout LLVM sources - uses: actions/checkout@v4 - with: - repository: llvm/llvm-project - ref: main - path: llvm-project - - name: Checkout the translator sources - uses: actions/checkout@v4 - with: - path: llvm-project\\llvm\\projects\\SPIRV-LLVM-Translator - - name: Get tag for SPIR-V Headers - id: spirv-headers-tag - run: | - echo "spirv_headers_tag=$(type llvm-project\\llvm\\projects\\SPIRV-LLVM-Translator\\spirv-headers-tag.conf)" >> $GITHUB_ENV - - name: Checkout SPIR-V Headers - uses: actions/checkout@v4 - with: - repository: KhronosGroup/SPIRV-Headers - ref: ${{ env.spirv_headers_tag }} - path: llvm-project\\llvm\\projects\\SPIRV-Headers - - name: Configure - shell: bash - run: | - mkdir build && cd build - cmake ..\\llvm-project\\llvm \ - -Thost=x64 \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_TARGETS_TO_BUILD="X86" \ - -DSPIRV_SKIP_CLANG_BUILD=ON \ - -DSPIRV_SKIP_DEBUG_INFO_TESTS=ON \ - -DLLVM_LIT_ARGS="-sv --no-progress-bar" - - name: Build - shell: bash - run: | - cd build - cmake --build . --config ${{ matrix.build_type }} --target llvm-spirv -j2 - # FIXME: Testing is disabled at the moment as it requires clang to be present - # - name: Build tests & test - # shell: bash - # run: | - # cd build - # cmake --build . --config Release --target check-llvm-spirv -j2 +# build_windows: +# name: Windows +# strategy: +# matrix: +# build_type: [Release] +# fail-fast: false +# runs-on: windows-latest +# steps: +# - name: Checkout LLVM sources +# uses: actions/checkout@v4 +# with: +# repository: llvm/llvm-project +# ref: main +# path: llvm-project +# - name: Checkout the translator sources +# uses: actions/checkout@v4 +# with: +# path: llvm-project\\llvm\\projects\\SPIRV-LLVM-Translator +# - name: Get tag for SPIR-V Headers +# id: spirv-headers-tag +# run: | +# echo "spirv_headers_tag=$(type llvm-project\\llvm\\projects\\SPIRV-LLVM-Translator\\spirv-headers-tag.conf)" >> $GITHUB_ENV +# - name: Checkout SPIR-V Headers +# uses: actions/checkout@v4 +# with: +# repository: KhronosGroup/SPIRV-Headers +# ref: ${{ env.spirv_headers_tag }} +# path: llvm-project\\llvm\\projects\\SPIRV-Headers +# - name: Configure +# shell: bash +# run: | +# mkdir build && cd build +# cmake ..\\llvm-project\\llvm \ +# -Thost=x64 \ +# -DCMAKE_BUILD_TYPE=Release \ +# -DLLVM_TARGETS_TO_BUILD="X86" \ +# -DSPIRV_SKIP_CLANG_BUILD=ON \ +# -DSPIRV_SKIP_DEBUG_INFO_TESTS=ON \ +# -DLLVM_LIT_ARGS="-sv --no-progress-bar" +# - name: Build +# shell: bash +# run: | +# cd build +# cmake --build . --config ${{ matrix.build_type }} --target llvm-spirv -j2 +# # FIXME: Testing is disabled at the moment as it requires clang to be present +# # - name: Build tests & test +# # shell: bash +# # run: | +# # cd build +# # cmake --build . --config Release --target check-llvm-spirv -j2 - build_and_test_macosx: - name: macOS - strategy: - matrix: - build_type: [Release] - fail-fast: false - runs-on: macos-latest - continue-on-error: true - steps: - - name: Checkout LLVM sources - uses: actions/checkout@v4 - with: - repository: llvm/llvm-project - ref: main - path: llvm-project - - name: Checkout the translator sources - uses: actions/checkout@v4 - with: - path: llvm-project/llvm/projects/SPIRV-LLVM-Translator - - name: Get tag for SPIR-V Headers - id: spirv-headers-tag - run: | - echo "spirv_headers_tag=$(cat llvm-project/llvm/projects/SPIRV-LLVM-Translator/spirv-headers-tag.conf)" >> $GITHUB_ENV - - name: Checkout SPIR-V Headers - uses: actions/checkout@v4 - with: - repository: KhronosGroup/SPIRV-Headers - ref: ${{ env.spirv_headers_tag }} - path: llvm-project/llvm/projects/SPIRV-Headers - - name: Configure - run: | - mkdir build && cd build - cmake ${{ github.workspace }}/llvm-project/llvm \ - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DLLVM_TARGETS_TO_BUILD="X86" \ - -DSPIRV_SKIP_CLANG_BUILD=ON \ - -DSPIRV_SKIP_DEBUG_INFO_TESTS=ON \ - -DLLVM_LIT_ARGS="-sv --no-progress-bar" \ - -G "Unix Makefiles" - - name: Build - run: | - cd build - make llvm-spirv -j2 - # FIXME: Testing is disabled at the moment as it requires clang to be present - # - name: Build tests & test - # run: | - # cd build - # make check-llvm-spirv -j2 +# build_and_test_macosx: +# name: macOS +# strategy: +# matrix: +# build_type: [Release] +# fail-fast: false +# runs-on: macos-latest +# continue-on-error: true +# steps: +# - name: Checkout LLVM sources +# uses: actions/checkout@v4 +# with: +# repository: llvm/llvm-project +# ref: main +# path: llvm-project +# - name: Checkout the translator sources +# uses: actions/checkout@v4 +# with: +# path: llvm-project/llvm/projects/SPIRV-LLVM-Translator +# - name: Get tag for SPIR-V Headers +# id: spirv-headers-tag +# run: | +# echo "spirv_headers_tag=$(cat llvm-project/llvm/projects/SPIRV-LLVM-Translator/spirv-headers-tag.conf)" >> $GITHUB_ENV +# - name: Checkout SPIR-V Headers +# uses: actions/checkout@v4 +# with: +# repository: KhronosGroup/SPIRV-Headers +# ref: ${{ env.spirv_headers_tag }} +# path: llvm-project/llvm/projects/SPIRV-Headers +# - name: Configure +# run: | +# mkdir build && cd build +# cmake ${{ github.workspace }}/llvm-project/llvm \ +# -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ +# -DLLVM_TARGETS_TO_BUILD="X86" \ +# -DSPIRV_SKIP_CLANG_BUILD=ON \ +# -DSPIRV_SKIP_DEBUG_INFO_TESTS=ON \ +# -DLLVM_LIT_ARGS="-sv --no-progress-bar" \ +# -G "Unix Makefiles" +# - name: Build +# run: | +# cd build +# make llvm-spirv -j2 +# # FIXME: Testing is disabled at the moment as it requires clang to be present +# # - name: Build tests & test +# # run: | +# # cd build +# # make check-llvm-spirv -j2 diff --git a/.github/workflows/check-out-of-tree-build.yml b/.github/workflows/check-out-of-tree-build.yml index f0106b422..45cbdeb3d 100644 --- a/.github/workflows/check-out-of-tree-build.yml +++ b/.github/workflows/check-out-of-tree-build.yml @@ -1,94 +1,94 @@ -# 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 +# # 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 - 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 - schedule: - - cron: 0 0 * * * +# 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 +# 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 +# schedule: +# - cron: 0 0 * * * -env: - LLVM_VERSION: 20 +# env: +# LLVM_VERSION: 20 -jobs: - build_and_test: - name: Linux - strategy: - matrix: - build_type: [Release, Debug] - fail-fast: false - runs-on: ubuntu-22.04 - steps: - - name: Install dependencies - run: | - curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - - curl -L "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo apt-key add - - echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main" | sudo tee -a /etc/apt/sources.list - echo "deb https://packages.lunarg.com/vulkan jammy 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 \ - spirv-tools - # 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: Checkout the translator sources - uses: actions/checkout@v4 - 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@v4 - 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 }}/build/utils/lit/lit.py" \ - -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${{ github.workspace }}/SPIRV-Headers \ - -G "Unix Makefiles" - - name: Build - run: | - cd build - make llvm-spirv -j2 - - name: Build tests & test - run: | - cd build - make check-llvm-spirv -j2 +# jobs: +# build_and_test: +# name: Linux +# strategy: +# matrix: +# build_type: [Release, Debug] +# fail-fast: false +# runs-on: ubuntu-22.04 +# steps: +# - name: Install dependencies +# run: | +# curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - +# curl -L "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo apt-key add - +# echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main" | sudo tee -a /etc/apt/sources.list +# echo "deb https://packages.lunarg.com/vulkan jammy 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 \ +# spirv-tools +# # 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: Checkout the translator sources +# uses: actions/checkout@v4 +# 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@v4 +# 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 }}/build/utils/lit/lit.py" \ +# -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${{ github.workspace }}/SPIRV-Headers \ +# -G "Unix Makefiles" +# - name: Build +# run: | +# cd build +# make llvm-spirv -j2 +# - name: Build tests & test +# run: | +# cd build +# make check-llvm-spirv -j2 diff --git a/.github/workflows/patch-release.yaml b/.github/workflows/patch-release.yaml index 3cc96f74a..650d74e10 100644 --- a/.github/workflows/patch-release.yaml +++ b/.github/workflows/patch-release.yaml @@ -1,88 +1,88 @@ -name: Automated release +# name: Automated release -on: - workflow_dispatch: - schedule: - # First day of every month - - cron: '0 0 1 * *' +# on: +# workflow_dispatch: +# schedule: +# # First day of every month +# - cron: '0 0 1 * *' -jobs: - setup: - runs-on: ubuntu-latest - outputs: - latest_branch: ${{steps.latest_branch.outputs.latest_branch}} - branches_json: ${{steps.release_branches.outputs.branches_json}} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Get latest llvm_release branch - id: latest_branch - run: | - git branch -r \ - | grep 'llvm_release_' \ - | sed -E 's/.*\/llvm_release_([0-9]+)/\1/' \ - | sort -n -r \ - | head -1 \ - | xargs printf "latest_branch=llvm_release_%s" \ - >> $GITHUB_OUTPUT - - name: Get branch list - id: release_branches - run: | - git branch -r \ - | grep "origin/llvm_release_" \ - | sed -E 's/\ *origin\/([^\ ]*)/\"\1\"/' \ - | paste -sd',' \ - | xargs -0 -d"\n" printf 'branches_json={"branch":[%s]}' \ - >> $GITHUB_OUTPUT - release: - runs-on: ubuntu-latest - needs: setup - strategy: - matrix: ${{fromJson(needs.setup.outputs.branches_json)}} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 0 - - name: Get commits info - id: versions - run: | - export LATEST_VERSION=\ - "$(git describe --tags --abbrev=0 --match 'v*')" - export LLVM_VERSION=$(echo $LATEST_VERSION \ - | sed -E 's/(v[0-9]+\.[0-9]+)\.([0-9]+).*/\1/') - export PATCH=$(echo $LATEST_VERSION \ - | sed -E 's/(v[0-9]+\.[0-9]+)\.([0-9]+).*/\2/') +# jobs: +# setup: +# runs-on: ubuntu-latest +# outputs: +# latest_branch: ${{steps.latest_branch.outputs.latest_branch}} +# branches_json: ${{steps.release_branches.outputs.branches_json}} +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name: Get latest llvm_release branch +# id: latest_branch +# run: | +# git branch -r \ +# | grep 'llvm_release_' \ +# | sed -E 's/.*\/llvm_release_([0-9]+)/\1/' \ +# | sort -n -r \ +# | head -1 \ +# | xargs printf "latest_branch=llvm_release_%s" \ +# >> $GITHUB_OUTPUT +# - name: Get branch list +# id: release_branches +# run: | +# git branch -r \ +# | grep "origin/llvm_release_" \ +# | sed -E 's/\ *origin\/([^\ ]*)/\"\1\"/' \ +# | paste -sd',' \ +# | xargs -0 -d"\n" printf 'branches_json={"branch":[%s]}' \ +# >> $GITHUB_OUTPUT +# release: +# runs-on: ubuntu-latest +# needs: setup +# strategy: +# matrix: ${{fromJson(needs.setup.outputs.branches_json)}} +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# ref: ${{ matrix.branch }} +# fetch-depth: 0 +# - name: Get commits info +# id: versions +# run: | +# export LATEST_VERSION=\ +# "$(git describe --tags --abbrev=0 --match 'v*')" +# export LLVM_VERSION=$(echo $LATEST_VERSION \ +# | sed -E 's/(v[0-9]+\.[0-9]+)\.([0-9]+).*/\1/') +# export PATCH=$(echo $LATEST_VERSION \ +# | sed -E 's/(v[0-9]+\.[0-9]+)\.([0-9]+).*/\2/') - echo "llvm_version=$LLVM_VERSION" >> $GITHUB_OUTPUT - echo "patch=$PATCH" >> $GITHUB_OUTPUT - echo "latest_version=${LATEST_VERSION}" >> $GITHUB_OUTPUT - echo "release_version=${LLVM_VERSION}.$((${PATCH}+1))" \ - >> $GITHUB_OUTPUT +# echo "llvm_version=$LLVM_VERSION" >> $GITHUB_OUTPUT +# echo "patch=$PATCH" >> $GITHUB_OUTPUT +# echo "latest_version=${LATEST_VERSION}" >> $GITHUB_OUTPUT +# echo "release_version=${LLVM_VERSION}.$((${PATCH}+1))" \ +# >> $GITHUB_OUTPUT - git rev-list ${LATEST_VERSION}..HEAD --count \ - | xargs printf "commits_since_last_release=%d\n" >> $GITHUB_OUTPUT - git rev-parse HEAD | xargs printf "last_commit=%s\n" >> $GITHUB_OUTPUT - - name: Release - uses: softprops/action-gh-release@v2 - if: ${{ steps.versions.outputs.commits_since_last_release != 0 }} - with: - # Setting tag to have format: - # %latest llvm version%.%latest patch + 1% - tag_name: ${{ steps.versions.outputs.release_version }} - # We have to set this so tag is set on the branch we are releasing - target_commitish: ${{ steps.versions.outputs.last_commit }} - # We don't want to mark patch releases latest unless it is latest - # major version - make_latest: >- - ${{ needs.setup.outputs.latest_branch == matrix.branch }} - name: > - SPIR-V LLVM translator based on LLVM - ${{ steps.versions.outputs.llvm_version }} - body: "Full Changelog: ${{ github.server_url }}/\ - ${{ github.repository }}/compare/\ - ${{ steps.versions.outputs.latest_version }}...\ - ${{ steps.versions.outputs.release_version }}" +# git rev-list ${LATEST_VERSION}..HEAD --count \ +# | xargs printf "commits_since_last_release=%d\n" >> $GITHUB_OUTPUT +# git rev-parse HEAD | xargs printf "last_commit=%s\n" >> $GITHUB_OUTPUT +# - name: Release +# uses: softprops/action-gh-release@v2 +# if: ${{ steps.versions.outputs.commits_since_last_release != 0 }} +# with: +# # Setting tag to have format: +# # %latest llvm version%.%latest patch + 1% +# tag_name: ${{ steps.versions.outputs.release_version }} +# # We have to set this so tag is set on the branch we are releasing +# target_commitish: ${{ steps.versions.outputs.last_commit }} +# # We don't want to mark patch releases latest unless it is latest +# # major version +# make_latest: >- +# ${{ needs.setup.outputs.latest_branch == matrix.branch }} +# name: > +# SPIR-V LLVM translator based on LLVM +# ${{ steps.versions.outputs.llvm_version }} +# body: "Full Changelog: ${{ github.server_url }}/\ +# ${{ github.repository }}/compare/\ +# ${{ steps.versions.outputs.latest_version }}...\ +# ${{ steps.versions.outputs.release_version }}"