Skip to content

Commit

Permalink
Merge pull request #326 from cgwalters/clang-format
Browse files Browse the repository at this point in the history
Replace custom clang-format bits with stock meson targets
  • Loading branch information
cgwalters committed Sep 3, 2024
2 parents 4ea8032 + 6fb712f commit 47042e8
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 40 deletions.
File renamed without changes.
4 changes: 4 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*bitrotate*
*hash*
*xalloc-oversized*
*erofs_fs*
2 changes: 2 additions & 0 deletions .clang-format-include
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libcomposefs/**/*
tools/**/*
39 changes: 26 additions & 13 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ permissions:
actions: read

jobs:
clang-format:
# To pick up a newer clang
runs-on: ubuntu-24.04
name: "clang-format"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: sudo ./hacking/installdeps.sh
- name: Configure
run: meson setup build --prefix=/usr
- name: clang-format
run: ninja -C build clang-format-check
# This build doesn't enable ASAN, which e.g. makes it easier to use with Rust
build:
runs-on: ubuntu-latest
name: "Build with ASAN"
Expand All @@ -31,6 +45,12 @@ jobs:
with:
name: composefs.tar
path: composefs.tar
- name: Upload log
uses: actions/upload-artifact@v4
if: always()
with:
name: testlog-asan.txt
path: build/meson-logs/testlog.txt
# This build doesn't enable ASAN, which e.g. makes it easier to use with Rust
build-noasan:
runs-on: ubuntu-latest
Expand All @@ -51,6 +71,12 @@ jobs:
with:
name: composefs-noasan.tar
path: composefs.tar
- name: Upload log
uses: actions/upload-artifact@v4
if: always()
with:
name: testlog-noasan.txt
path: build/meson-logs/testlog.txt
build-baseline:
runs-on: ubuntu-latest
name: "Build on Ubuntu Focal"
Expand Down Expand Up @@ -148,19 +174,6 @@ jobs:
run: cargo test
- name: Rust (all features)
run: cargo test -F v1_0_4
clang-format:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y make clang-format
- name: check formatting
run: |
sudo docker build -t clang-format hacking/clang-format
sudo docker run --rm -w /src -v ${PWD}:/src clang-format
distcheck:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 0 additions & 8 deletions hacking/clang-format/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions hacking/clang-format/Makefile

This file was deleted.

12 changes: 0 additions & 12 deletions hacking/clang-format/run-tests.sh

This file was deleted.

0 comments on commit 47042e8

Please sign in to comment.