Skip to content

update

update #90

Workflow file for this run

name: integrate
on:
push:
branches:
- main
paths:
- "src/**"
- "include/**"
- ".github/**"
- "BUILD"
- "WORKSPACE"
- ".bazelrc"
- ".bazelversion"
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
matrix:
name: "GCC"
runs-on: ubuntu-24.04
strategy:
matrix:
GCC: [9, 10, 11, 12]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
env:
cache-name: bazel-${{ matrix.GCC }}
with:
path: bazel-disk
key: ${{ github.workflow }}-${{ env.cache-name }}-${{ runner.os }}-${{github.sha}}
restore-keys: ${{ github.workflow }}-${{ env.cache-name }}-${{ runner.os }}-
save-always: true
- uses: bazel-contrib/[email protected]
with:
bazelisk-cache: true
disk-cache: false
repository-cache: false
- name: run build
env:
CC: gcc-${{ matrix.GCC }}
CXX: g++-${{ matrix.GCC }}
run: |
bazel test --disk_cache=bazel-disk //...
coverage:
name: code coverage
runs-on: ubuntu-24.04
needs: [matrix]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
env:
cache-name: bazel-coverage
with:
path: bazel-disk
key: ${{ github.workflow }}-${{ env.cache-name }}-${{ runner.os }}-${{github.sha}}
restore-keys: ${{ github.workflow }}-${{ env.cache-name }}-${{ runner.os }}-
save-always: true
- uses: bazel-contrib/[email protected]
with:
bazelisk-cache: true
disk-cache: false
repository-cache: true
- run: sudo apt update
- run: sudo apt install yasm
- run: sudo apt install nasm
- name: run build
env:
CC: gcc-12
CXX: g++-12
run: |
bazelisk coverage --disk_cache=bazel-disk --instrument_test_targets --combined_report=lcov //...
genhtml --output coverage "./bazel-out/_coverage/_coverage_report.dat"
- name: Deploy 🚀
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./coverage
publish_branch: coverage
user_name: "liubang"
user_email: "[email protected]"