Build, run tests, check formatting #3
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: test | |
run-name: Build, run tests, check formatting | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
runs-on: "ubuntu-22.04" | |
container: | |
image: verilator/verilator:v5.016 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install deps | |
run: apt-get -qqy update && apt-get -qqy --no-install-recommends install cmake build-essential git ca-certificates python3 clang-format-14 | |
- name: Build | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
cmake --build build -j"$(nproc)" | |
- name: Run tests | |
run: | | |
PATH="$PWD/build:$PWD/scripts:$PATH" | |
make -j"$(nproc)" -O -k -C tests/ --no-print-directory | |
- name: Check formatting | |
run: .ci-scripts/cpp-fmt-check source/*.cpp source/*.hpp |