Skip to content

ci: fix path to unit test execution in GitHub Actions workflow #2

ci: fix path to unit test execution in GitHub Actions workflow

ci: fix path to unit test execution in GitHub Actions workflow #2

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: Cache apt packages
uses: actions/cache@v3
with:
path: /var/cache/apt
key: ${{ runner.os }}-apt-${{ hashFiles('apt-packages.txt') }}
restore-keys: |
${{ runner.os }}-apt-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake
- name: Cache CMake
uses: actions/cache@v3
with:
path: ~/.cmake
key: ${{ runner.os }}-cmake-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cmake-
- name: Configure and Build
run: |
mkdir -p build
cd build
cmake ..
make
- name: Run Unit Tests
run: |
cd build
./test/runTests