feat: improved github workflows #16
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: Cpp Format & Test | |
| on: [push] | |
| jobs: | |
| build-cpp: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtest-dev cmake | |
| cd /usr/src/gtest | |
| sudo cmake CMakeLists.txt | |
| sudo make | |
| sudo cp lib/*.a /usr/lib | |
| sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a | |
| sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a | |
| - name: Format C++ code | |
| run: make format-cpp | |
| - name: Lint C++ code | |
| run: make lint-cpp | |
| - name: Run C++ tests | |
| run: make test-cpp:all | |
| - name: Clean | |
| run: make clean |