From 484c63be70378ef761b998e767f2d63d045c6c38 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 16 Jul 2025 03:35:48 +0200 Subject: [PATCH] Test clang-format 18.1.8 installation --- .github/workflows/test-clang-install.yml | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/test-clang-install.yml diff --git a/.github/workflows/test-clang-install.yml b/.github/workflows/test-clang-install.yml new file mode 100644 index 000000000..dd88fa0b5 --- /dev/null +++ b/.github/workflows/test-clang-install.yml @@ -0,0 +1,55 @@ +name: Test Clang Format Install + +on: + push: + branches: [test-clang-format-install] + workflow_dispatch: + +jobs: + test-ubuntu-2204: + runs-on: ubuntu-22.04 + steps: + - name: Install clang-format 18.1.8 + run: | + echo "=== System info ===" + lsb_release -a + echo "" + echo "=== Installing dependencies ===" + sudo apt-get update + sudo apt-get install -y libtinfo5 + echo "" + echo "=== Downloading clang-format 18.1.8 ===" + wget https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang%2Bllvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz + echo "" + echo "=== Extracting ===" + tar -xf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz + echo "" + echo "=== Testing clang-format ===" + ./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format --version + echo "" + echo "=== Testing formatting ===" + echo 'class Test { Test() {}; };' | ./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format + + test-ubuntu-2404: + runs-on: ubuntu-24.04 + steps: + - name: Install clang-format 18.1.8 + run: | + echo "=== System info ===" + lsb_release -a + echo "" + echo "=== Installing dependencies ===" + sudo apt-get update + sudo apt-get install -y libtinfo5 + echo "" + echo "=== Downloading clang-format 18.1.8 ===" + wget https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang%2Bllvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz + echo "" + echo "=== Extracting ===" + tar -xf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz + echo "" + echo "=== Testing clang-format ===" + ./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format --version + echo "" + echo "=== Testing formatting ===" + echo 'class Test { Test() {}; };' | ./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format \ No newline at end of file