Skip to content

update changelog

update changelog #4

name: Matrix and Codecov
on:
push:
branches:
- main
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
workflow_dispatch:
concurrency:
group: matrix-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
jobs:
matrix-coverage:
name: C++ tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
include:
- os: ubuntu-latest
shell: bash -l {0}
build: coverage
jobs: 4
- os: windows-latest
shell: cmd /C CALL {0}
build: fast
jobs: 4
- os: macos-latest
shell: bash -l {0}
build: fast
jobs: 2
- os: macos-15-intel
shell: bash -l {0}
build: fast
jobs: 4
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Check out libdiffpy
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up C++ tests
uses: ./.github/actions/setup-tests
- name: Build and run C++ tests
run: scons -j${{ matrix.jobs }} build=${{ matrix.build }} test
- name: Generate coverage report
if: runner.os == 'Linux'
run: >-
gcovr --gcov-executable "$CONDA_PREFIX/bin/gcov"
--root . --filter 'build/coverage-.*/diffpy/'
--xml coverage.xml
- name: Save coverage report
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml
if-no-files-found: error
- name: Upload coverage to Codecov
# Fork push builds have no upstream Codecov token; keep their artifact.
if: runner.os == 'Linux' && github.repository == 'diffpy/libdiffpy'
uses: codecov/codecov-action@v5
with:
files: coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}