Implemented a filehasher MVP #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Trunk | |
on: | |
push: | |
branches: ["trunk"] | |
pull_request: | |
branches: ["trunk"] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
cmake_build_type: [Asan, MSan, Release] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup LLVM toolchain | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: "16.0" | |
- name: Configure | |
working-directory: ${{github.workspace}} | |
run: | | |
export CXX="/usr/bin/clang++" | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} .. | |
- name: Build | |
working-directory: ${{github.workspace}} | |
run: | | |
cd build | |
make filehash | |
make filehash-test | |
- name: Unit Test | |
working-directory: ${{github.workspace}} | |
run: | | |
cd build | |
./filehash-test | |
- name: Check formatting | |
working-directory: ${{github.workspace}} | |
run: | | |
find src test \( -name "*.hpp" -o -name "*.cpp" \) > build/sources.txt | |
clang-format \ | |
--Werror \ | |
--dry-run \ | |
--style=file \ | |
--files=build/sources.txt | |
- name: Check codestyle | |
working-directory: ${{github.workspace}} | |
run: | | |
clang-tidy \ | |
-p ./build/compile_commands.json \ | |
src/*.cpp test/*.cpp | |
- name: Test Samples | |
working-directory: ${{github.workspace}} | |
run: | | |
sh ./script/test/random.sh | |
sh ./script/test/validate.sh |