added a script to get the latest regression results #23
Workflow file for this run
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: Build and Test | |
on: | |
pull_request: | |
push: | |
paths: | |
- "**.c" | |
- "**.h" | |
- "**.cpp" | |
- "**.hpp" | |
- "**/CMakeLists.txt" | |
- "**.cmake" | |
- ".github/workflows/test.yml" | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install cmake and ninja | |
uses: lukka/[email protected] | |
- name: checkout project | |
uses: actions/checkout@v3 | |
- name: restore build directory cache | |
id: cache-build-dir | |
uses: actions/cache@v3 | |
env: | |
cache-name: btrblocks-build-dir | |
with: | |
path: build | |
key: ${{ env.cache-name }}-${{ hashFiles('cmake/*.cmake') }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('test/DatasetGenerator.cpp') }} | |
- name: create build dir and initialize | |
if: ${{ steps.cache-build-dir.outputs.cache-hit != 'true' }} | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. | |
- name: build and run dataset generator | |
if: ${{ steps.cache-build-dir.outputs.cache-hit != 'true' }} | |
run: | | |
cd build | |
make -j8 test_dataset_generator | |
./test_dataset_generator | |
test: | |
needs: setup | |
strategy: | |
matrix: | |
build-configs: | |
- cmake-flags: '-DCMAKE_BUILD_TYPE=Debug -DWITH_LOGGING=ON -DENABLE_FOR_SCHEME=ON' | |
- cmake-flags: '-DCMAKE_BUILD_TYPE=Debug -DWITH_LOGGING=OFF -DENABLE_FOR_SCHEME=OFF' | |
- cmake-flags: '-DCMAKE_BUILD_TYPE=Release -WITH_LOGGING=OFF -DENABLE_FOR_SCHEME=OFF' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout project | |
uses: actions/checkout@v3 | |
- name: restore build directory cache | |
id: cache-build-dir | |
uses: actions/cache@v3 | |
env: | |
cache-name: btrblocks-build-dir | |
with: | |
path: build | |
key: ${{ env.cache-name }}-${{ hashFiles('cmake/*.cmake') }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('test/DatasetGenerator.cpp') }} | |
- name: set compiler flags | |
run: | | |
cd build | |
cmake ${{ matrix.build-configs.cmake-flags }} .. | |
- name: build btrblocks | |
run: | | |
cd build | |
make -j2 btrblocks | |
- name: build tester | |
run: | | |
cd build | |
make -j2 tester | |
- name: run tester | |
run: | | |
cd build | |
./tester |