patch: factor out a common inform_hunks_failed function #252
This file contains 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: Build and test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install | |
run: pip install pathspec | |
- name: format | |
run: ./scripts/clang_format.py --no-write | |
coverage: | |
needs: [lint] | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'shannonbooth' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install gcovr | |
run: sudo apt-get update -qy | |
&& sudo apt-get install gcovr -qy | |
- name: configure | |
run: cmake -DBUILD_TESTING=on -DPATCH_ENABLE_COVERAGE=yes -S . -B build | |
- name: compile | |
run: cmake --build build -j2 | |
- name: test | |
run: ctest --test-dir build --output-on-failure -j2 | |
- name: coverage | |
run: cmake --build build --target coverage | |
- name: submit to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./build/coverage.xml | |
build: | |
needs: [lint] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: configure | |
run: cmake -DBUILD_TESTING=on -S . -B build | |
- name: compile | |
run: cmake --build build -j2 | |
- name: test | |
run: ctest --test-dir build --output-on-failure -C Debug -j2 |