Skip to content

Commit

Permalink
add workflow and tests for xxhash
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Marklund <[email protected]>
  • Loading branch information
trollkarlen committed Jan 22, 2025
1 parent 1b73613 commit a5fc247
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ubuntu-default-with-xxhash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ubuntu default build with xxhash

on:
push:
branches:
- main
- devel
pull_request:

jobs:
build:
name: Test on ${{ matrix.os }} with xxhash
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]

steps:
- name: checkout
uses: actions/checkout@v4
- name: install packages
run: sudo apt install build-essential nettle-dev libxxhash-dev
- name: bootstrap
run: ./bootstrap.sh
- name: configure
run: ./configure --with-xxhash --enable-warnings CXXFLAGS=-std=c++17
- name: make
run: make
- name: make check
run: WITH_XXHASH=1 make check
- name: WITH_XXHASH=1 make distcheck
run: make distcheck CXXFLAGS=-std=c++17
- name: store the logs as an artifact
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: log-artifacts-${{ matrix.os }}
path: '**/*.log'

9 changes: 5 additions & 4 deletions testcases/checksum_options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
set -e
. "$(dirname "$0")/common_funcs.sh"



allchecksumtypes="md5 sha1 sha256 sha512"

if [ "$WITH_XXHASH" = "1" ]; then
allchecksumtypes="md5 sha1 sha256 sha512 xxh128"
else
allchecksumtypes="md5 sha1 sha256 sha512"
fi

for checksumtype in $allchecksumtypes; do
reset_teststate
Expand Down
8 changes: 7 additions & 1 deletion testcases/checksum_speedtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
set -e
. "$(dirname "$0")/common_funcs.sh"

if [ "$WITH_XXHASH" = "1" ]; then
allchecksumtypes="md5 sha1 sha256 sha512 xxh128"
else
allchecksumtypes="md5 sha1 sha256 sha512"
fi

reset_teststate


Expand All @@ -21,7 +27,7 @@ if [ ! -e speedtest/largefile1 ] ; then
fi


for checksumtype in md5 sha1 sha256; do
for checksumtype in $allchecksumtypes; do
dbgecho "trying checksum $checksumtype"
time $rdfind -removeidentinode false -checksum $checksumtype speedtest/largefile1 speedtest/largefile2 > rdfind.out
done
Expand Down

0 comments on commit a5fc247

Please sign in to comment.