Feat improve tests #80
Workflow file for this run
This file contains hidden or 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: unit-tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install system deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake git python3 python3-pip | |
| git clone https://github.com/google/googletest.git -b v1.14.0 && cd googletest && cmake . && make && sudo make install | |
| - name: Create build directory | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake -DBUILD_TESTING=ON .. | |
| - name: Build | |
| run: | | |
| cd build | |
| cmake --build . -- -j$(nproc) | |
| - name: Run unit tests | |
| run: | | |
| cd build | |
| ctest --output-on-failure -j2 | |
| - name: Upload ctest results (Testing directory) | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ctest-results | |
| path: build/Testing |