{"id":17694287,"url":"https://github.com/andyholmes/actuary","last_synced_at":"2025-07-24T07:08:55.106Z","repository":{"id":64085151,"uuid":"571366944","full_name":"andyholmes/actuary","owner":"andyholmes","description":"An opinionated test runner for C projects","archived":false,"fork":false,"pushed_at":"2025-06-23T23:42:08.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T16:17:09.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andyholmes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-28T00:45:52.000Z","updated_at":"2025-06-23T23:42:11.000Z","dependencies_parsed_at":"2023-12-18T22:53:48.551Z","dependency_job_id":"bb56dd02-e15b-4bde-b442-19d0b240483e","html_url":"https://github.com/andyholmes/actuary","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.11111111111111116","last_synced_commit":"c16858afb35dab9a96171eb5b30fc5d6d3774ed8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andyholmes/actuary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyholmes%2Factuary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyholmes%2Factuary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyholmes%2Factuary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyholmes%2Factuary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyholmes","download_url":"https://codeload.github.com/andyholmes/actuary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyholmes%2Factuary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266807195,"owners_count":23987427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-24T13:48:22.550Z","updated_at":"2025-07-24T07:08:55.085Z","avatar_url":"https://github.com/andyholmes.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Actuary\n\n**An opinionated test runner for C projects**\n\nActuary is a test runner and GitHub Action, specifically for programs written in\nC that use the `meson` build system, with an emphasis on GLib-based projects.\n\nIt's common, and wise, to run tests under various conditions (e.g. [sanitizers])\nand employ static analysis tools (e.g. [cppcheck]). Actuary is really just a\nseries of shell scripts that makes it simpler to run a set of suites, both in a\nGitHub [job matrix] and on your local workstation.\n\nActuary includes a CI image and a `toolbox` image, with all required tools\npre-installed, intended to be used as base images for a project.\n\n[sanitizers]: https://github.com/google/sanitizers\n[cppcheck]: https://cppcheck.sourceforge.io/\n[job matrix]: https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs\n\n## Complete Example\n\n```yml\nname: Actuary\n\non:\n  pull_request:\n    branches:\n      - main\n\njobs:\n  test:\n    name: Tests\n    runs-on: ubuntu-latest\n    # See \"Containers\" below\n    container:\n      image: ghcr.io/${{ github.repository }}:${{ github.base_ref }}\n\n    # Setup a job matrix (compiler x suite), with inputs for each job\n    strategy:\n      matrix:\n        compiler: [gcc, llvm]\n        suite: [test, asan, tsan, analyzer]\n        include:\n          - suite: test\n            setup-args: -Dtests=true\n            test-args: --repeat=3\n          - suite: asan\n            setup-args: -Dtests=true\n          - suite: tsan\n            setup-args: -Dtests=true\n          - suite: analyzer\n            setup-args: -Dtests=false\n      fail-fast: false\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n        with:\n          submodules: true\n\n      # Run each test suite\n      - name: Test\n        id: test\n        uses: andyholmes/actuary@main\n        with:\n          suite: ${{ matrix.suite }}\n          compiler: ${{ matrix.compiler }}\n          setup-args: ${{ matrix.setup-args }}\n          test-args: ${{ matrix.test-args }}\n          # Enable coverage generation for one suite\n          test-coverage: ${{ matrix.compiler == 'gcc' \u0026\u0026 matrix.suite == 'test' }}\n\n      # Upload test log as an artifact\n      - name: Test Report\n        if: ${{ failure() }}\n        uses: actions/upload-artifact@v3\n        with:\n          name: Tests (${{ matrix.compiler }}, ${{ matrix.suite }})\n          path: ${{ steps.test.outputs.log }}\n\n      # Upload coverage HTML as an artifact\n      - name: Coverage (html)\n        if: ${{ matrix.compiler == 'gcc' \u0026\u0026 matrix.suite == 'test' }}\n        uses: actions/upload-artifact@v3\n        with:\n          name: Tests (coverage)\n          path: ${{ steps.test.outputs.coverage-html }}\n```\n\n## Configuration\n\nActuary is really intended to be used in a job matrix, so the two driving inputs\nare `suite` and `compiler`.\n\n| Name                    | Description                                        |\n|-------------------------|----------------------------------------------------|\n| `suite`                 | Test suite (default: `test`)                       |\n| `compiler`              | Compiler (default: system)                         |\n\nThe `suite` input determines which test suite will be run. Additional suites can\nbe added to `/usr/share/actuary/suites/`.\n\nThe `compiler` input determines which compiler to use. Actuary includes two\npresets (`gcc` and `llvm`), but will fallback to the system default if not set.\n\n### test\n\nStandard `meson test` runner.\n\nThis suite, and suites based on it, respect the following inputs:\n\n| Input                   | Description                                        |\n|-------------------------|----------------------------------------------------|\n| `setup-args`            | Options for `meson setup`                          |\n| `test-args`             | Options for `meson test`                           |\n| `test-coverage`         | Enable or disable coverage generation              |\n| `lcov-include`          | Path glob of directories to include in coverage    |\n| `lcov-exclude`          | Path glob of directories to exclude from coverage  |\n\nThe `setup-args` input is passed to `meson setup`, overriding any default\narguments or options.\n\nThe `test-args` input is passed to `meson test`, overriding any default\narguments or options.\n\nThe `test-coverage` input enables coverage generation with [LCOV], and will\nresult in an LCOV `.info` file and an HTML report.\n\nThis suite, and suites based on it, generate the following outputs:\n\n| Output                  | Description                                        |\n|-------------------------|----------------------------------------------------|\n| `log`                   | Path to `testlog.txt` file (`meson test`)          |\n| `coverage`              | Path to `coverage.info` file (LCOV)                |\n| `coverage-html`         | Path to `coverage-html` directory (HTML)           |\n\n[lcov]: https://github.com/linux-test-project/lcov\n\n### asan\n\nRun tests with AddressSanitizer.\n\nThis suite is based on the [`test` suite](#test) and will respect any inputs it\naccepts.\n\n### tsan\n\nRun tests with ThreadSanitizer.\n\nThis suite is based on the [`test` suite](#test) and will respect any inputs it\naccepts.\n\n### analyzer\n\nRun the compiler's static analysis tool (e.g. LLVM scan-build).\n\nThis suite is not based on the `test` suite, but will respect the `setup-args`\ninput.\n\nThis suite generates the following outputs:\n\n| Output                  | Description                                        |\n|-------------------------|----------------------------------------------------|\n| `log`                   | Path to logfile                                    |\n\n### abidiff\n\nTest for API breakage in changes.\n\nThis suite respects the following inputs:\n\n| Input                   | Description                                        |\n|-------------------------|----------------------------------------------------|\n| `setup-args`            | Options for `meson setup`                          |\n| `abidiff-args`          | Options for `abidiff`                              |\n| `abidiff-lib`           | Shared Object (e.g. `libfoobar-1.0.so`)            |\n\nThis suite is will respect the `setup-args` input.\n\nThis suite generates the following outputs:\n\n| Output                  | Description                                        |\n|-------------------------|----------------------------------------------------|\n| `log`                   | Path to logfile                                    |\n\n### cppcheck\n\nRun cppcheck static analyzer\n\nThis suite respects the following inputs:\n\n| Input                   | Description                                        |\n|-------------------------|----------------------------------------------------|\n| `cppcheck-args`         | Options for `cppcheck`                             |\n| `cppcheck-path`         | Path to the source directory                       |\n\n## Containers\n\nActuary provides containers with pre-installed packages for the included suites\nand a companion `toolbox` image for local development.\n\n| Image Name              | Notes                                              |\n|-------------------------|----------------------------------------------------|\n| `actuary`               |                                                    |\n| `actuary-toolbox`       | Includes `gdb`                                     |\n\nMost projects will want to include additional build dependencies, which can be\ndone by adding a stage on top of Actuary's base images:\n\n```dockerfile\nFROM ghcr.io/andyholmes/actuary:latest\n\nRUN dnf install -y --enablerepo=fedora-debuginfo,updates-debuginfo \\\n        gi-docgen graphviz \\\n        glib2-devel      glib2-debuginfo \\\n        gtk4-devel       gtk4-debuginfo \\\n        libadwaita-devel libadwaita-debuginfo \u0026\u0026 \\\n    dnf clean all \u0026\u0026 rm -rf /var/cache/dnf\n```\n\nYou can copy-paste the [`cr.yml`][cr] workflow from Actuary to build and push\nthe image to your project's container registry. Then use your project's CI image\nwith Actuary:\n\n```yml\nname: Continuous Integration\non:\n  pull_request:\n\njobs:\n  actuary:\n    name: Actuary\n    runs-on: ubuntu-latest\n    container:\n      image: ghcr.io/username/project:latest\n\n    steps:\n      - name: Test\n        uses: andyholmes/actuary@main\n        with:\n          suite: test\n          setup-args: -Dtests=true\n```\n\n[cr]: https://github.com/andyholmes/actuary/blob/main/.github/workflows/cr.yml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyholmes%2Factuary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyholmes%2Factuary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyholmes%2Factuary/lists"}