Skip to content

Remove coverage error #56

Remove coverage error

Remove coverage error #56

name: CMake Build Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
env:
VCPKG_COMMIT_ID: 'ad25766aefb5313b6bc4e2a4b78a2946f84fbf66'
jobs:
coverage:
name: ${{ matrix.os }}-${{ github.workflow }}-converage
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
cmake_preset: ninja
- os: macos-latest
cmake_preset: ninja
steps:
- uses: actions/checkout@v4
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y cmake lcov
- name: Install dependencies on Mac
if: matrix.os == 'macos-latest'
run: |
brew install lcov autoconf automake libtool
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.29.0" # <--= optional, use most recent 3.25.x version
ninjaVersion: "^1.12.0" # <--= optional, use most recent 1.x version
- name: Dump the content of $RUNNER_TEMP
run: find $RUNNER_TEMP
shell: bash
- name: Dump the content of $RUNNER_WORKSPACE
run: find $RUNNER_WORKSPACE
shell: bash
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
vcpkgJsonGlob: 'vcpkg.json'
- name: Prints output of run-vcpkg's action
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}'"
- name: Configure CMake
run: |
vcpkg add port protobuf
cmake --preset ${{ matrix.cmake_preset }} -DCOVERAGE=ON -DZQ_WITH_PROTO=ON
- name: Build
run: |
cmake --build --preset ${{ matrix.cmake_preset }}
- name: Test
run: |
cmake --build --preset ${{ matrix.cmake_preset }} --target test
- name: Coverage
run: |
cmake --build --preset ${{ matrix.cmake_preset }} --target coverage
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ matrix.os }}
path: build/ninja/coverage/