From 5fdc47b1a94dbf2ad19b3a807736ddde5173e3db Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Wed, 1 Mar 2023 18:14:45 +0000 Subject: [PATCH] [CI] Prepare release branch for LLVM 16 (#1861) --- .github/workflows/check-code-style.yml | 2 +- .github/workflows/check-in-tree-build.yml | 8 +- .github/workflows/check-out-of-tree-build.yml | 2 +- .travis.yml | 163 ------------------ README.md | 4 +- 5 files changed, 8 insertions(+), 171 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/check-code-style.yml b/.github/workflows/check-code-style.yml index bb2d33183a..9190522c2f 100644 --- a/.github/workflows/check-code-style.yml +++ b/.github/workflows/check-code-style.yml @@ -64,7 +64,7 @@ jobs: # 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 + echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-16 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 }} \ diff --git a/.github/workflows/check-in-tree-build.yml b/.github/workflows/check-in-tree-build.yml index 961eed69d2..1e3105b2a6 100644 --- a/.github/workflows/check-in-tree-build.yml +++ b/.github/workflows/check-in-tree-build.yml @@ -51,7 +51,7 @@ jobs: 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/focal/ llvm-toolchain-focal main" | sudo tee -a /etc/apt/sources.list + echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" | sudo tee -a /etc/apt/sources.list echo "deb https://packages.lunarg.com/vulkan focal main" | sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get -yq --no-install-suggests --no-install-recommends install \ @@ -64,7 +64,7 @@ jobs: uses: actions/checkout@v2 with: repository: llvm/llvm-project - ref: main + ref: release/16.x path: llvm-project - name: Checkout the translator sources uses: actions/checkout@v2 @@ -119,7 +119,7 @@ jobs: uses: actions/checkout@v2 with: repository: llvm/llvm-project - ref: main + ref: release/16.x path: llvm-project - name: Checkout the translator sources uses: actions/checkout@v2 @@ -171,7 +171,7 @@ jobs: uses: actions/checkout@v2 with: repository: llvm/llvm-project - ref: main + ref: release/16.x path: llvm-project - name: Checkout the translator sources uses: actions/checkout@v2 diff --git a/.github/workflows/check-out-of-tree-build.yml b/.github/workflows/check-out-of-tree-build.yml index b7c3009b6d..6ce4931ac4 100644 --- a/.github/workflows/check-out-of-tree-build.yml +++ b/.github/workflows/check-out-of-tree-build.yml @@ -44,7 +44,7 @@ jobs: 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/focal/ llvm-toolchain-focal main" | sudo tee -a /etc/apt/sources.list + echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" | sudo tee -a /etc/apt/sources.list echo "deb https://packages.lunarg.com/vulkan focal main" | sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get -yq --no-install-suggests --no-install-recommends install \ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8e8dec00f9..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,163 +0,0 @@ -language: cpp - -os: - - linux - -# Use Ubuntu 18.04 LTS (Bionic) as the Linux testing environment. -dist: bionic - -git: - depth: 1 - -branches: - only: - - /llvm_release_\d+$/ -# From https://docs.travis-ci.com/user/customizing-the-build/#safelisting-or-blocklisting-branches -# "Note that safelisting also prevents tagged commits from being built. -# If you consistently tag your builds in the format v1.3 you can safelist them -# all with regular expressions, for example /^v\d+\.\d+(\.\d+)?(-\S*)?$/." - - /^v\d+\.\d+(\.\d+)?(-\S*)?$/ - -before_install: - - | - if [ $TRAVIS_OS_NAME == "linux" ]; then - 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 - - curl -L "https://apt.kitware.com/keys/kitware-archive-latest.asc" | sudo apt-key add - - echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list - echo "deb https://packages.lunarg.com/vulkan bionic main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list - echo "deb https://apt.kitware.com/ubuntu/ bionic main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list - sudo apt-get update - sudo apt-get -yq --no-install-suggests --no-install-recommends install \ - llvm-${LLVM_VERSION}-dev \ - libomp-${LLVM_VERSION}-dev \ - clang-${LLVM_VERSION} \ - spirv-tools \ - cmake - fi - -compiler: - - gcc - -env: - global: - - MAKEFLAGS="-j2" - - LLVM_VERSION=16 - matrix: - - BUILD_TYPE=Release BUILD_EXTERNAL=1 SHARED_LIBS=ON MAKE_TARGETS="" MAKE_TEST_TARGET="test" - - BUILD_TYPE=Debug BUILD_EXTERNAL=1 SHARED_LIBS=ON MAKE_TARGETS="" MAKE_TEST_TARGET="test" - - BUILD_TYPE=Release BUILD_EXTERNAL=0 SHARED_LIBS=ON MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv" - - BUILD_TYPE=Debug BUILD_EXTERNAL=0 SHARED_LIBS=ON MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv" - - BUILD_TYPE=Release BUILD_EXTERNAL=1 SHARED_LIBS=OFF MAKE_TARGETS="" MAKE_TEST_TARGET="test" - - BUILD_TYPE=Debug BUILD_EXTERNAL=1 SHARED_LIBS=OFF MAKE_TARGETS="" MAKE_TEST_TARGET="test" - - BUILD_TYPE=Release BUILD_EXTERNAL=0 SHARED_LIBS=OFF MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv" - - BUILD_TYPE=Debug BUILD_EXTERNAL=0 SHARED_LIBS=OFF MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv" - -matrix: - include: - - os: osx - env: BUILD_TYPE=Release BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv" - osx_image: xcode13 - - - os: osx - env: BUILD_TYPE=Debug BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv" - osx_image: xcode13 - - - compiler: clang - env: BUILD_TYPE=Release BUILD_EXTERNAL=1 SHARED_LIBS=OFF MAKE_TARGETS="" MAKE_TEST_TARGET="test" - - - compiler: clang - env: BUILD_TYPE=Debug BUILD_EXTERNAL=1 SHARED_LIBS=ON MAKE_TARGETS="" MAKE_TEST_TARGET="test" - - - compiler: clang - env: BUILD_TYPE=Release BUILD_EXTERNAL=0 SHARED_LIBS=ON MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv" - allow_failures: - - os: osx - fast_finish: true - -script: - - | - if [ $BUILD_EXTERNAL == "0" ]; then - mkdir llvm-spirv - mv * llvm-spirv - git clone https://github.com/llvm/llvm-project --depth 1 - git -C llvm-project log --oneline -1 - mv llvm-spirv llvm-project/llvm-spirv - fi - - | - if [ $TRAVIS_OS_NAME == "osx" ]; then - wget -r --accept="*.tgz" --no-directories https://storage.googleapis.com/spirv-tools/badges/build_link_macos_clang_release.html - tar -xf install.tgz - sed -i '' -e 's|^prefix=\(.*\)|prefix='$PWD'/install|g' install/lib/pkgconfig/SPIRV-Tools.pc - export PKG_CONFIG_PATH=$PWD/install/lib/pkgconfig - fi - - mkdir build && cd build - - PATH=/usr/bin:$PATH - - | - if [ $BUILD_EXTERNAL == "1" ]; then - cmake .. \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DBUILD_SHARED_LIBS=${SHARED_LIBS} \ - -DLLVM_BUILD_TOOLS=ON \ - -DLLVM_EXTERNAL_LIT="/usr/lib/llvm-${LLVM_VERSION}/build/utils/lit/lit.py" \ - -DLLVM_INCLUDE_TESTS=ON \ - -DCMAKE_INSTALL_PREFIX=../install/ \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -G "Unix Makefiles" - else - BUILDDIR=$(pwd) - cmake ../llvm-project/llvm/ \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DBUILD_SHARED_LIBS=${SHARED_LIBS} \ - -DLLVM_BUILD_TOOLS=ON \ - -DLLVM_BUILD_TESTS=ON \ - -DLLVM_INCLUDE_TESTS=ON \ - -DSPIRV_SKIP_CLANG_BUILD=ON \ - -DSPIRV_SKIP_DEBUG_INFO_TESTS=ON \ - -DLLVM_LIT_ARGS="-sv --no-progress-bar" \ - -DLLVM_EXTERNAL_PROJECTS="llvm-spirv" \ - -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=${BUILDDIR}/../llvm-project/llvm-spirv \ - -DLLVM_ENABLE_PROJECTS="llvm-spirv" \ - -G "Unix Makefiles" - ln -s /usr/lib/llvm-${LLVM_VERSION}/bin/clang bin/ - fi - - - make $MAKE_TARGETS && make $MAKE_TEST_TARGET && if [ $BUILD_EXTERNAL == "1" ]; then make install; fi - -before_deploy: - # Travis CI relies on the tag name to push to the correct release. - # Tag the current master top of the tree as "dev-build". - # We must be very careful with "git push -f" and allow it ONLY - # for the "dev-build" tag! - - if [[ "${TRAVIS_BRANCH}" == "master" && -z "${TRAVIS_TAG}" ]]; then - export TRAVIS_TAG=dev-build; - git config --global user.name "Travis CI"; - git config --global user.email "builds@travis-ci.org"; - git tag -f ${TRAVIS_TAG}; - git push -f https://${repo_token}@github.com/${TRAVIS_REPO_SLUG} --tags; - fi - # Create tarball for deployment - - echo ${TRAVIS_COMMIT} > ../install/version.txt; - - export TARBALL=SPIRV-LLVM-Translator-${TRAVIS_TAG}-${TRAVIS_OS_NAME}-${BUILD_TYPE}.zip; - - cd ../install && find . -print | zip -@ ${TARBALL}; - -deploy: - - provider: releases - api_key: ${repo_token} - on: - tags: true - condition: ${BUILD_EXTERNAL} == 1 && ${SHARED_LIBS} == ON && ${repo_token} - file: ${TARBALL} - skip_cleanup: true - overwrite: false - - provider: releases - api_key: ${repo_token} - on: - tags: false - branch: master - condition: ${BUILD_EXTERNAL} == 1 && ${SHARED_LIBS} == ON && ${repo_token} - file: ${TARBALL} - name: Latest development build $(date -u +'%F %R %Z') - skip_cleanup: true - overwrite: true - prerelease: true diff --git a/README.md b/README.md index 3fadfd5f40..e38acd09a3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # LLVM/SPIR-V Bi-Directional Translator -[![Out-of-tree build & tests](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/workflows/Out-of-tree%20build%20&%20tests/badge.svg?branch=main&event=schedule)](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/actions?query=workflow%3A%22Out-of-tree+build+%26+tests%22+event%3Aschedule) -[![In-tree build & tests](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/workflows/In-tree%20build%20&%20tests/badge.svg?branch=main&event=schedule)](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/actions?query=workflow%3A%22In-tree+build+%26+tests%22+event%3Aschedule) +[![Out-of-tree build & tests](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/workflows/Out-of-tree%20build%20&%20tests/badge.svg?branch=llvm_release_160&event=schedule)](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/actions?query=workflow%3A%22Out-of-tree+build+%26+tests%22+event%3Aschedule) +[![In-tree build & tests](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/workflows/In-tree%20build%20&%20tests/badge.svg?branch=llvm_release_160&event=schedule)](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/actions?query=workflow%3A%22In-tree+build+%26+tests%22+event%3Aschedule) This repository contains source code for the LLVM/SPIR-V Bi-Directional Translator, a library and tool for translation between LLVM IR and [SPIR-V](https://www.khronos.org/registry/spir-v/).