diff options
author | Donovan Baarda <abo@minkirri.apana.org.au> | 2023-02-01 13:31:00 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 13:31:00 +1100 |
commit | 8f8de976fa0946a7a47d01a9dc518f68bc9f2b02 (patch) | |
tree | 62c3b30315484157e535c98939af190262a13e61 | |
parent | 390c804d0b4d4ff3f556c47eb91012a7f49da492 (diff) | |
download | librsync-8f8de976fa0946a7a47d01a9dc518f68bc9f2b02.tar.gz |
Update github actions and fix `iwyu` build target. (#243)
* Update github actions checkout and upload-artifact to v3.
The old v2 versions of these github actions now produce errors warning you
need to update them.
* Fix lint.yml remove install of old libclang-common-9-dev package.
The iwyu package dependencies have been fixed, and this old package doesn't
exist any more.
* Run `make iwyu-fix` to fix includes for `tests/rabinkarp_perf.c`.
* Change the `iwyu` build target to use clang output format.
This format is much more compact and easier to read.
* Make `iwyu` build target trim noisy "note:" output and ignore fileutil.c.
* Update NEWS.md for all #243 changes.
-rw-r--r-- | .github/workflows/check.yml | 8 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 6 | ||||
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | NEWS.md | 7 | ||||
-rw-r--r-- | tests/rabinkarp_perf.c | 1 |
5 files changed, 15 insertions, 10 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e3cab18..cefa6ec 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -37,7 +37,7 @@ jobs: build: Debug steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Dependencies # Unfortunately available Marketplace Actions for this are in a mess, so we do it manually. @@ -67,7 +67,7 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{matrix.build}} --output-on-failure - + - name: Build install # Build your program with the given configuration. run: cmake --install 'build' --config ${{matrix.build}} --prefix 'install' @@ -77,14 +77,14 @@ jobs: run: cmake --build '${{github.workspace}}/build' --target doc - name: Upload build - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build results ${{matrix.os}} ${{matrix.build}} ${{matrix.options}} path: ${{github.workspace}}/build if-no-files-found: error - name: Upload install - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: install results ${{matrix.os}} ${{matrix.build}} ${{matrix.options}} path: ${{github.workspace}}/install diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf6eeef..ca3e5c7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,15 +7,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Dependencies # Unfortunately available Marketplace Actions for this are in a mess, so we do it manually. - # Also iwyu is missing a dependency on libclang-common-0-dev, See; - # https://bugs.launchpad.net/ubuntu/+source/iwyu/+bug/1769334 run: | sudo apt-get update -y - sudo apt-get install -y libpopt-dev libb2-dev clang-tidy libclang-common-9-dev iwyu + sudo apt-get install -y libpopt-dev libb2-dev clang-tidy iwyu - name: Configure CMake run: cmake . diff --git a/CMakeLists.txt b/CMakeLists.txt index f5943db..531f8ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,9 +260,10 @@ add_custom_target(clang-tidy ) # iwyu target to check includes for correctness. +# Note we ignore noisy "note:" output and exclude fileutil.c output. add_custom_target(iwyu COMMENT "Check #includes for correctness using iwyu_tool." - COMMAND iwyu_tool -p ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ! iwyu_tool -p ${CMAKE_CURRENT_BINARY_DIR} -o clang | egrep -v "fileutil.c:|note:" VERBATIM ) @@ -4,6 +4,13 @@ NOT RELEASED YET + * Update github actions and fix `iwyu` build target. Update `checkout` and + `upload-artifact` to v3. Update `lint.yml` installed packages for fixed + iwyu deps. Fix `iwyu` build target to ignore `fileutil.c` and use neater + clang output with noisy "note:" output removed. Run `make iwyu-fix` to fix + includes for `tests/rabinkarp_perf.c`. (dbaarda + https://github.com/librsync/librsync/pull/243) + * Make delta directly process the input stream if it has enough data. Delta operations will only accumulate data into the internal scoop buffer if the input buffer is too small, otherwise it will process the input directly. diff --git a/tests/rabinkarp_perf.c b/tests/rabinkarp_perf.c index f3b52fd..69f8b0f 100644 --- a/tests/rabinkarp_perf.c +++ b/tests/rabinkarp_perf.c @@ -20,7 +20,6 @@ */ #include <stdio.h> -#include <stdint.h> #include <inttypes.h> #include "rabinkarp.h" |