Interface Improvements for ProjectIRDB + CallGraph #1690
Workflow file for this run
This file contains hidden or 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: Phasar CI | |
| on: | |
| push: | |
| branches: [ master, development ] | |
| pull_request: | |
| branches: [ master, development ] | |
| # TODO test in tree build? | |
| # TODO test conan build | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm] | |
| compiler: [ [clang++-19, clang-19, "clang-19 libclang-rt-19-dev clang-tools-19"] ] | |
| build: [ Debug, Release, DebugLibdeps, DebugCov ] | |
| include: | |
| - build: Debug | |
| cmake_build_type: Debug | |
| flags: -DPHASAR_ENABLE_SANITIZERS=ON | |
| - build: Release | |
| cmake_build_type: Release | |
| flags: -DPHASAR_ENABLE_DYNAMIC_LOG=OFF -DPHASAR_BUILD_DYNLIB=ON -DPHASAR_ENABLE_SANITIZERS=ON | |
| - build: DebugLibdeps | |
| cmake_build_type: Debug | |
| flags: -DPHASAR_DEBUG_LIBDEPS=ON -DBUILD_SHARED_LIBS=ON | |
| - build: DebugCov | |
| cmake_build_type: Debug | |
| flags: -DCODE_COVERAGE=ON | |
| extra_dependencies: llvm-19 # For coverage | |
| exclude: | |
| - os: ubuntu-24.04-arm | |
| build: Debug | |
| - os: ubuntu-24.04-arm | |
| build: DebugLibdeps | |
| - os: ubuntu-24.04-arm | |
| build: DebugCov | |
| continue-on-error: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: ccache # This should always come after the actions/checkout step. | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.build }} | |
| - name: Install Phasar Dependencies | |
| shell: bash | |
| run: | | |
| ./utils/InstallAptDependencies.sh --noninteractive tzdata ccache ${{ matrix.compiler[2] }} ${{ matrix.extra_dependencies }} | |
| - name: Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }} | |
| env: | |
| CXX: ${{ matrix.compiler[0] }} | |
| CC: ${{ matrix.compiler[1] }} | |
| shell: bash | |
| run: | | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -DBUILD_PHASAR_CLANG=OFF \ | |
| -DPHASAR_USE_Z3=ON \ | |
| ${{ matrix.flags }} \ | |
| -G Ninja | |
| ninja -C build | |
| - name: Run Unittests | |
| shell: bash | |
| run: | | |
| cmake --build ./build --target check-phasar-unittests | |
| - name: Install PhASAR and Build Examples | |
| if: matrix.build == 'DebugLibdeps' # Circumvent conflicting ASAn flags | |
| env: | |
| CXX: ${{ matrix.compiler[0] }} | |
| CC: ${{ matrix.compiler[1] }} | |
| shell: bash | |
| run: | | |
| cmake -DCMAKE_INSTALL_PREFIX=./INSTALL -P ./build/cmake_install.cmake | |
| PHASAR_ROOT_DIR=$(pwd) | |
| cd ./examples/how-to | |
| cmake -S . -B build -Dphasar_ROOT="$PHASAR_ROOT_DIR/INSTALL" | |
| cmake --build ./build --target run_sample_programs | |
| - name: Check test coverage and generate HTML report | |
| if: matrix.build == 'DebugCov' | |
| shell: bash | |
| run: | | |
| cmake --build ./build --target ccov-all | |
| - name: Upload coverage HTML report artifact | |
| if: matrix.build == 'DebugCov' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CoverageReport | |
| path: ./build/ccov/all-merged/ | |
| if-no-files-found: error | |
| retention-days: 7 |