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 83fe3a2 commit b441a2d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 8 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'

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



allchecksumtypes="md5 sha1 sha256 sha512"


for checksumtype in $allchecksumtypes; do
reset_teststate
dbgecho "trying checksum $checksumtype with small files"
Expand Down
4 changes: 1 addition & 3 deletions testcases/checksum_speedtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set -e

reset_teststate


if [ ! -d speedtest ] ; then
mkdir -p speedtest
fi
Expand All @@ -20,8 +19,7 @@ if [ ! -e speedtest/largefile1 ] ; then
md5sum speedtest/largefile1 speedtest/largefile2
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
5 changes: 5 additions & 0 deletions testcases/common_funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ set -e

me=$(basename $0)

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

/bin/echo -n "$me: checking for rdfind ..."
rdfind=$PWD/rdfind
Expand Down

0 comments on commit b441a2d

Please sign in to comment.