This repository has been archived on 2025-12-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Eyck Jentzsch 37855f6b17
Some checks failed
SCC Test/pipeline/head There was a failure building this commit
adds github action
2025-12-09 08:42:34 +01:00

58 lines
1.4 KiB
YAML

name: CI Unit Tests
on:
push:
paths:
- '**.cpp'
- '**.h'
- '**CMakeLists.txt'
- '.github/workflows/**'
- 'conanfile.py'
pull_request:
paths:
- '**.cpp'
- '**.h'
- '**CMakeLists.txt'
- '.github/workflows/**'
- 'conanfile.py'
jobs:
unit-tests:
name: unit-tests (C++20)
runs-on: ubuntu-latest
steps:
- name: Checkout SystemC-Components-Test
uses: actions/checkout@v6
with:
submodules: true
- name: Checkout SystemC-Components
uses: actions/checkout@v6
with:
repository: Minres/SystemC-Components
path: scc
submodules: true
- name: Cache Conan
uses: actions/cache@v4
with:
path: ~/.conan2
key: conan-${{ runner.os }}-unit-cpp20-${{ hashFiles('conanfile.py') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y g++ python3-pip cmake ninja-build
pip3 install conan --break-system-packages
cmake --version
- name: Configure
run: >
cmake --preset Debug -B build
-DBUILD_TESTING=ON
-DCMAKE_CXX_STANDARD=20
- name: Build
run: cmake --build build -j
- name: Run unit tests
run: ctest --output-on-failure
working-directory: build