3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-27 01:12:40 +00:00
z3/.github/workflows/coverage.yml
dependabot[bot] 7055366050
Bump actions/checkout from 7.0.0 to 7.0.1 (#10208)
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0
to 7.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v7.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>skip running unsafe pr check if input is default by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2518">actions/checkout#2518</a></li>
<li>trim only ascii whitespace for branch by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2521">actions/checkout#2521</a></li>
<li>escape values passed to --unset by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2530">actions/checkout#2530</a></li>
<li>Various dependency updates</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v7...v7.0.1">https://github.com/actions/checkout/compare/v7...v7.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/actions/checkout/compare/v7...v7.0.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=7.0.0&new-version=7.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-23 19:17:49 -07:00

102 lines
3.3 KiB
YAML

name: Code Coverage
on:
schedule:
- cron: '0 0 */2 * *'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
env:
CC: clang
CXX: clang++
BUILD_TYPE: Debug
CMAKE_GENERATOR: Ninja
COV_DETAILS_PATH: ${{github.workspace}}/cov-details
steps:
- uses: actions/checkout@v7.0.1
- name: Setup
run: |
sudo apt-get remove -y --purge man-db
sudo apt-get update -y
sudo apt-get install -y gcovr ninja-build llvm clang
## Building
- name: Configure CMake Z3
run: CFLAGS=="--coverage" CXXFLAGS="--coverage" LDFLAGS="-lgcov" cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=./install
- name: Build Z3
run: cmake --build ${{github.workspace}}/build --target install --config ${{env.BUILD_TYPE}}
- name: Build test-z3
run: cmake --build ${{github.workspace}}/build --target test-z3 --config ${{env.BUILD_TYPE}}
- name: Build examples
run: |
cmake --build ${{github.workspace}}/build --target c_example
cmake --build ${{github.workspace}}/build --target cpp_example
cmake --build ${{github.workspace}}/build --target z3_tptp5
cmake --build ${{github.workspace}}/build --target c_maxsat_example
- name: Clone z3test
run: git clone https://github.com/z3prover/z3test z3test
## Testing
- name: Run test-z3
run: |
cd ${{github.workspace}}/build
./test-z3 -a
cd -
# Disabled: ${{github.workspace}}/build/examples/c_example_build_dir/c_example
- name: Run examples
run: |
${{github.workspace}}/build/examples/cpp_example_build_dir/cpp_example
${{github.workspace}}/build/examples/tptp_build_dir/z3_tptp5 --help
${{github.workspace}}/build/examples/c_maxsat_example_build_dir/c_maxsat_example ${{github.workspace}}/examples/maxsat/ex.smt
- name: Run regressions
run: |
python z3test/scripts/test_benchmarks.py build/z3 z3test/regressions/smt2
python z3test/scripts/test_benchmarks.py build/z3 z3test/regressions/smt2-debug
python z3test/scripts/test_benchmarks.py build/z3 z3test/regressions/smt2-extra
- name: Run coverage tests
run: python z3test/scripts/test_coverage_tests.py ./install z3test/coverage/cpp
## Artifact
- name: Gather coverage
run: |
cd ${{github.workspace}}
gcovr --html coverage.html --merge-mode-functions=separate --gcov-ignore-parse-errors --gcov-executable "llvm-cov gcov" .
cd -
- name: Gather detailed coverage
run: |
cd ${{github.workspace}}
mkdir cov-details
gcovr --html-details ${{env.COV_DETAILS_PATH}}/coverage.html --merge-mode-functions=separate --gcov-ignore-parse-errors --gcov-executable "llvm-cov gcov" -r `pwd`/src --object-directory `pwd`/build
cd -
- name: Get date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v7
with:
name: coverage-${{steps.date.outputs.date}}
path: ${{github.workspace}}/coverage.html
retention-days: 4
- uses: actions/upload-artifact@v7
with:
name: coverage-details-${{steps.date.outputs.date}}
path: ${{env.COV_DETAILS_PATH}}
retention-days: 4