feat(core): add c3 plus #59
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: C3 Coverage | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| # Only run coverage on Noble | |
| coverage: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| container: | |
| image: ghcr.io/dairlab/docker-dair/noble-dair-base:v1.42 | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| options: --cpus 4 | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Install required dependencies | |
| run: apt update && apt install -y lcov | |
| - name: Restore coverage cache | |
| id: c3-cov-cache-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.cache/bazel | |
| key: c3-bazel-cov-cache-${{ hashFiles('**/BUILD.bazel') }} | |
| restore-keys: | | |
| c3-bazel-cov-cache- | |
| - name: Generate Coverage | |
| id: generate-coverage | |
| run: bazel coverage | |
| --combined_report=lcov | |
| --local_resources=ram=24000 | |
| --local_resources=cpu=4 | |
| --jobs=4 | |
| //... | |
| - name: Report code coverage | |
| uses: zgosalvez/[email protected] | |
| with: | |
| coverage-files: bazel-out/_coverage/_coverage_report.dat | |
| minimum-coverage: 90 | |
| artifact-name: noble-code-coverage-report | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| update-comment: true | |
| - name: Save coverage cache | |
| id: c3-cov-cache-save | |
| if: always() && !cancelled() && steps.c3-cov-cache-restore.outputs.cache-hit != 'true' && steps.generate-coverage.outcome == 'success' | |
| uses: actions/cache/save@v4 | |
| with: | |
| key: ${{ steps.c3-cov-cache-restore.outputs.cache-primary-key }} | |
| path: ~/.cache/bazel | |
| - run: echo "🍏 This job's status is ${{ job.status }}." | |
| # Deploy job [Not currently enabled] | |
| # deploy: | |
| # # Add a dependency to the build job | |
| # needs: coverage | |
| # if: ${{ github.event_name == 'push' }} | |
| # # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| # permissions: | |
| # pages: write # to deploy to Pages | |
| # id-token: write # to verify the deployment originates from an appropriate source | |
| # # Deploy to the github-pages environment | |
| # environment: | |
| # name: github-pages | |
| # url: ${{ steps.deployment.outputs.page_url }} | |
| # # Specify runner + deployment step | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Deploy to GitHub Pages | |
| # id: deployment | |
| # uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action | |
| # with: | |
| # artifact_name: noble-code-coverage-report |