Skip to content

Fix CI

Fix CI #113

name: HyperCPU CI/CD Pipeline (feature branch)
on:
push:
jobs:
testing:
runs-on: self-hosted
if: (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev') || !contains(github.event.head_commit.message, '[ci skip]')
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Pull submodules
run: |
git submodule update --init --remote --recursive
- name: Install all tools
uses: aminya/setup-cpp@v1
with:
cmake: true
cppcheck: true
- name: Install GTest Parallelizer
run: |
git -C "../gtest-parallel" pull || git clone https://github.com/google/gtest-parallel.git "../gtest-parallel"
- name: Build and test with GCC on Release profile
run: |
cmake -S. -Bbuild -DHCPU_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --target build-all-tests-github -j4
../gtest-parallel/gtest-parallel build/modular_testing --workers=4
../gtest-parallel/gtest-parallel build/integration_testing --workers=4
rm -rf build
- name: Build and test with LLVM on Release profile
run: |
cmake -S. -Bbuild -DHCPU_COMPILER=clang -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_BUILD_TYPE=Release
cmake --build build --target build-all-tests-github -j4
../gtest-parallel/gtest-parallel build/modular_testing --workers=4
../gtest-parallel/gtest-parallel build/integration_testing --workers=4
- name: Lint code
run: |
cp build/compile_commands.json .
cppcheck --project=compile_commands.json --check-level=exhaustive -idist -j4
- name: Clean up
run: |
rm -rf build