about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2023-04-14 14:03:45 +0200
committerMichael Vetter <jubalh@iodoru.org>2023-04-14 21:43:31 +0200
commit663c773bffa7af6df232bb6908903425a97bc200 (patch)
treefb709a3ee13921c23ca2297b120df4a870fe2356
parent9bce23e075e4ec4ad7c888688226c7136d5f9257 (diff)
downloadprofani-tty-663c773bffa7af6df232bb6908903425a97bc200.tar.gz
Switch to clang-format check action
Instead of running clang-format outselves on the old Ubuntu version.
This let's us easily configure which version of clang-format we want to
execute.

Used action:
https://github.com/marketplace/actions/clang-format-check

Properly fix:
https://github.com/profanity-im/profanity/pull/1774
-rw-r--r--.github/workflows/main.yml23
1 files changed, 6 insertions, 17 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6a9e439f..89a46e9e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -36,24 +36,13 @@ jobs:
         run: ./ci-build.sh
 
   code-style:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     name: Check coding style
     continue-on-error: true
     steps:
       - uses: actions/checkout@v2
-      - name: install dependencies
-        run: |
-          sudo apt update
-          sudo apt install -y --no-install-recommends autoconf autoconf-archive automake expect gcc git libcmocka-dev libcurl3-dev libgcrypt-dev libglib2.0-dev libgpgme11-dev libgtk2.0-dev libmicrohttpd-dev libncursesw5-dev libnotify-dev libotr5-dev libreadline-dev libsignal-protocol-c-dev libssl-dev libtool libxss-dev make pkg-config python3-dev python-dev-is-python3 libsqlite3-dev
-      - name: Install libstrophe
-        run: |
-          git clone https://github.com/strophe/libstrophe ../libstrophe
-          cd ../libstrophe && ./bootstrap.sh && ./configure && make -j$(nproc) && sudo make install
-      - name: Configure
-        run: |
-          ./bootstrap.sh
-          ./configure
-      - name: Check style
-        run: |
-          make format
-          git diff --exit-code
+      - name: Run clang-format
+        uses: jidicula/clang-format-action@v4.11.0
+        with:
+          clang-format-version: '16'
+          check-path: 'src'