From 9e6171ab0655e4e13bf4500c2233063ff4332cca Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 13 Jun 2022 05:23:15 +0200 Subject: [PATCH] ci: Upgrade to LLVM/Clang 14.x --- .github/workflows/main.yml | 11 +++++++++-- .github/workflows/validate.yml | 27 ++++++++++++++++++++++----- CMakeLists.txt | 4 ++-- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e747dd0..f2cca51c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -181,9 +181,14 @@ jobs: if: startsWith( matrix.runner, 'ubuntu' ) && ( matrix.generator == 'Clang' ) shell: bash run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 + sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 + sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 + sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800 + sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800 - name: 'Dependency: Packages (Linux)' if: startsWith( matrix.runner, 'macos' ) @@ -229,7 +234,9 @@ jobs: -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ -DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \ - -DPACKAGE_PREFIX="build/package" + -DPACKAGE_PREFIX="build/package" \ + -DENABLE_CLANG=FALSE \ + -DENABLE_PROFILING=FALSE - name: "Build (Windows)" if: startsWith( matrix.runner, 'windows' ) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1c3ce71e..7d11e357 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -8,7 +8,7 @@ on: tags: - '*' -concurrency: +concurrency: group: validate-${{ github.ref }} cancel-in-progress: true @@ -64,8 +64,8 @@ jobs: submodules: recursive fetch-depth: 0 - - name: "Prerequisites: Apt-Get" - if: startsWith( matrix.id, 'linux' ) + - name: "Dependency: Ninja, Qt, FFmpeg, CURL (Linux)" + if: startsWith( matrix.runner, 'ubuntu' ) shell: bash run: | sudo apt-get -qq update @@ -80,9 +80,25 @@ jobs: qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 + + - name: "Dependency: Clang (Windows)" + if: startsWith( matrix.runner, 'windows' ) + run: | + curl "-kL" "https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.4/LLVM-14.0.4-win64.exe" "-f" "--retry" "5" "-o" "llvm.exe" + 7z x -y -o"C:\Program Files\LLVM" llvm.exe "bin" "include" "lib" "libexec" "share" "Uninstall.exe" + + - name: "Dependency: Clang (Linux)" + if: startsWith( matrix.runner, 'ubuntu' ) + shell: bash + run: | + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 + sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 + sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 + sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800 + sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800 - name: "Dependencies: Cache" if: github.event_name != 'pull_request' @@ -97,7 +113,8 @@ jobs: run: | cmake -H. -B"build/temp" \ -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ - -DENABLE_CLANG=TRUE + -DENABLE_CLANG=TRUE \ + -DENABLE_PROFILING=TRUE - name: "StreamFX: clang-tidy" continue-on-error: true diff --git a/CMakeLists.txt b/CMakeLists.txt index d67eceae..e0c74041 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2213,12 +2213,12 @@ if(T_CHECK AND HAVE_CLANG) ) clang_tidy( TARGETS ${PROJECT_NAME} - VERSION 9.0.0 + VERSION 14.0.0 ) clang_format( TARGETS ${PROJECT_NAME} DEPENDENCY - VERSION 9.0.0 + VERSION 14.0.0 ) endif()