diff options
author | Ammar Faizi <ammarfaizi2@gnuweeb.org> | 2022-06-02 08:10:21 +0700 |
---|---|---|
committer | Ammar Faizi <ammarfaizi2@gnuweeb.org> | 2022-06-02 08:10:21 +0700 |
commit | bc4fba1717c8efc38c67c36a7ef04c35e5f41efc (patch) | |
tree | 5de4f0c5f01c786de9f8c7919c6b049d48236f40 | |
parent | a12f209d0133b71648da3f0d7d71997b35f75359 (diff) | |
download | liburing-bc4fba1717c8efc38c67c36a7ef04c35e5f41efc.tar.gz |
.github: Use clang latest version
By default, when we install clang from the default `Ubuntu apt` on the
GitHub bot, we get clang-11, which is kinda old.
clang-15 has better static analysis than the previous versions, for
example, the fix in these commits were only found by clang-15:
7e3f7d6030fb6ce0872b876147d29fe230e7b2ba ("test/35fa71a030ca: Fix -Wunused-but-set-variable warning from clang-15")
045b8c5b183859fbc481ec7ab6b818442cc57ab0 ("test/submit-reuse: Fix -Wunused-but-set-variable warning from clang-15")
Let's install the latest clang version to get better issue coverage.
By default, the Ubuntu apt doesn't provide it. We have to pull from
the LLVM repo. The detail is available at: https://apt.llvm.org
Link: https://github.com/axboe/liburing/pull/567
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
-rw-r--r-- | .github/workflows/build.yml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 39f4314..37a2969 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,8 +57,15 @@ jobs: - name: Install Compilers run: | - sudo apt-get update -y; - sudo apt-get install -y ${{matrix.cc_pkg}} ${{matrix.cxx_pkg}}; + if [[ "${{matrix.cc_pkg}}" == "clang" ]]; then \ + wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh; \ + sudo bash /tmp/llvm.sh 15; \ + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 400; \ + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 400; \ + else \ + sudo apt-get update -y; \ + sudo apt-get install -y ${{matrix.cc_pkg}} ${{matrix.cxx_pkg}}; \ + fi; - name: Display compiler versions run: | |