updated docs for arduino library #7
This file contains hidden or 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
| # CI for qf_math — tests, strict library build, 100% line coverage on src/qf_math.c, | |
| # and sync of an annotated git tag + GitHub Release for v<QF_MATH_VERSION> when | |
| # pushing to main. | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Unit tests | |
| run: make test | |
| - name: Strict library build (-Wall -Werror) | |
| run: make lib | |
| - name: Coverage gate (100% lines in src/qf_math.c) | |
| run: make coverage-check | |
| - name: Read library version | |
| id: ver | |
| run: | | |
| v=$(awk '/^#define QF_MATH_VERSION[[:space:]]/ {gsub(/"/,"",$3); print $3; exit}' src/qf_math.h) | |
| echo "value=$v" >> "$GITHUB_OUTPUT" | |
| - name: Tag and release v${{ steps.ver.outputs.value }} (main only, if missing) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| set -euo pipefail | |
| TAG="v${{ steps.ver.outputs.value }}" | |
| git fetch --tags origin 2>/dev/null || true | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| echo "Tag $TAG already exists — skipping." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git tag -a "$TAG" -m "qf_math ${{ steps.ver.outputs.value }}" "$GITHUB_SHA" | |
| git push origin "refs/tags/$TAG" | |
| gh release create "$TAG" --title "qf_math ${{ steps.ver.outputs.value }}" \ | |
| --notes "Release ${{ steps.ver.outputs.value }} — see [README](https://github.com/${{ github.repository }}#readme) for API overview and [CHANGELOG commits](https://github.com/${{ github.repository }}/commits/$TAG)." \ | |
| --verify-tag |