Skip to content

Merge pull request #47 from huangminghuang/fuzz #353

Merge pull request #47 from huangminghuang/fuzz

Merge pull request #47 from huangminghuang/fuzz #353

Workflow file for this run

---
name: MacOS
on:
push:
branches:
- main
- develop
- dev/**
paths-ignore:
- '**.md'
pull_request:
branches:
- main
- develop
paths-ignore:
- '**.md'
env:
CTEST_OUTPUT_ON_FAILURE: 1
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
build_type: [Release, Debug, Coverage]
protoc: ["find"]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-${{ matrix.protoc }}-cpm-modules-${{ hashFiles('**/third-party.cmake') }}
- name: Install ninja and protobuf
shell: bash
run: brew install ninja protobuf grpc
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.workflow }}-${{ matrix.protoc }}
- name: configure
shell: bash
run: |
cmake -S . -B build -G Ninja -DHPP_PROTO_PROTOC=${{ matrix.protoc }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: build
run: cmake --build build
- name: test
working-directory: ./build
run: |
ctest --build-config ${{ matrix.build_type }} --output-on-failure
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: matrix.build_type == 'Coverage'
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true