Skip to content

ci: uniformize onto centralized CI (project-model SublibraryCI + cleanup) #10

ci: uniformize onto centralized CI (project-model SublibraryCI + cleanup)

ci: uniformize onto centralized CI (project-model SublibraryCI + cleanup) #10

Workflow file for this run

name: Sublibrary CI
on:
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
push:
branches:
- master
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
list-sublibraries:
runs-on: ubuntu-latest
outputs:
projects: ${{ steps.list.outputs.projects }}
steps:
- uses: actions/checkout@v6
- name: "List lib/* sublibraries"
id: list
run: |
# jq is preinstalled on GitHub-hosted runners; -R reads each path as a
# JSON string, -s slurps them into a compact array (-> [] when empty).
projects=$(for d in lib/*/; do d="${d%/}"; [ -f "$d/Project.toml" ] && echo "$d"; done \
| jq -R . | jq -sc .)
echo "Sublibraries: $projects"
echo "projects=$projects" >> "$GITHUB_OUTPUT"
test:
needs: list-sublibraries
strategy:
fail-fast: false
matrix:
project: ${{ fromJson(needs.list-sublibraries.outputs.projects) }}
name: "Sublibrary - ${{ matrix.project }}"
uses: "SciML/.github/.github/workflows/tests.yml@v1"
with:
project: "${{ matrix.project }}"
# collect the sublibrary's own source coverage (its tests are the only thing
# that exercises it); point processcoverage at the sublibrary, not repo root.
coverage-directories: "${{ matrix.project }}/src,${{ matrix.project }}/ext"
secrets: "inherit"