Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 41 additions & 33 deletions .github/workflows/ci-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ on:
- 'docs/**'
- 'media/**'
- '**.md'
pull_request:
branches:
- main
- feature/**
paths-ignore:
- 'docs/**'
- 'media/**'
- '**.md'

env:
LLVM_VERSION: "llvmorg-22.1.6"
Expand Down Expand Up @@ -43,9 +51,9 @@ jobs:
- name: Setup CCache
uses: hendrikmuhs/ccache-action@v1

# - name: Setup Valgrind
# if: github.event_name == 'pull_request'
# run: sudo apt-get install valgrind
- name: Setup Valgrind
if: github.event_name == 'pull_request'
run: sudo apt-get install valgrind

- name: Setup Gcovr
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
run: ./setup-libs.sh

- name: Build test target
# if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request'
env:
LLVM_DIR: ${{ github.workspace }}/llvm/build/lib/cmake/llvm
run: |
Expand All @@ -100,45 +108,45 @@ jobs:
..
cmake --build . --target spicetest

# - name: Build Test target
# if: github.event_name == 'pull_request'
# env:
# LLVM_DIR: ${{ github.workspace }}/llvm/build/lib/cmake/llvm
# run: |
# mkdir ./build
# cd ./build
# cmake -GNinja \
# -DCMAKE_BUILD_TYPE=Debug \
# -DCMAKE_C_COMPILER_LAUNCHER=ccache \
# -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
# -DSPICE_BUILT_BY="ghactions" \
# -DSPICE_PROF_COMPILE=ON \
# -DSPICE_RUN_COVERAGE=ON \
# -Wattributes \
# ..
# cmake --build . --target spicetest
- name: Build Test target
if: github.event_name == 'pull_request'
env:
LLVM_DIR: ${{ github.workspace }}/llvm/build/lib/cmake/llvm
run: |
mkdir ./build
cd ./build
cmake -GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DSPICE_BUILT_BY="ghactions" \
-DSPICE_PROF_COMPILE=ON \
-DSPICE_RUN_COVERAGE=ON \
-Wattributes \
..
cmake --build . --target spicetest

- name: Run Test target
# if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request'
working-directory: build/test
env:
LLVM_LIB_DIR: /${{ github.workspace }}/llvm/build/lib
LLVM_LIB_DIR: ${{ github.workspace }}/llvm/build/lib
LLVM_INCLUDE_DIR: ${{ github.workspace }}/llvm/llvm/include
LLVM_BUILD_INCLUDE_DIR: ${{ github.workspace }}/llvm/build/include
SPICE_STD_DIR: ${{ github.workspace }}/std
SPICE_BOOTSTRAP_DIR: ${{ github.workspace }}/src-bootstrap
run: ./spicetest --is-github-actions

# - name: Run Test target with Valgrind
# if: github.event_name == 'pull_request'
# working-directory: build/test
# env:
# LLVM_LIB_DIR: ${{ github.workspace }}/llvm/build/lib
# LLVM_INCLUDE_DIR: ${{ github.workspace }}/llvm/llvm/include
# LLVM_BUILD_INCLUDE_DIR: ${{ github.workspace }}/llvm/build/include
# SPICE_STD_DIR: ${{ github.workspace }}/spice/std
# SPICE_BOOTSTRAP_DIR: ${{ github.workspace }}/spice/src-bootstrap
# run: valgrind -q --leak-check=full ./spicetest --is-github-actions --leak-detection
- name: Run Test target with Valgrind
if: github.event_name == 'pull_request'
working-directory: build/test
env:
LLVM_LIB_DIR: ${{ github.workspace }}/llvm/build/lib
LLVM_INCLUDE_DIR: ${{ github.workspace }}/llvm/llvm/include
LLVM_BUILD_INCLUDE_DIR: ${{ github.workspace }}/llvm/build/include
SPICE_STD_DIR: ${{ github.workspace }}/std
SPICE_BOOTSTRAP_DIR: ${{ github.workspace }}/src-bootstrap
run: valgrind -q --leak-check=full ./spicetest --is-github-actions --leak-detection

- name: Generate coverage report
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down
Loading