Viewing is open to everyone. Downloading and starring need a GitHub sign-in.
Sign in with GitHub
community.yml
v0.1.0-build.85
Latest
Commit ede38f5
Sign in with GitHub to download. Each download is recorded with your GitHub username.
| 1 | # Checks for contributions to the community branch (spec §8). Runs on |
| 2 | # pull_request (never pull_request_target), so code from forks gets no |
| 3 | # secrets and a read-only token. Nothing here can publish. |
| 4 | name: Community checks |
| 5 | on: |
| 6 | pull_request: |
| 7 | branches: [community] |
| 8 | push: |
| 9 | branches: [community] |
| 10 | permissions: |
| 11 | contents: read |
| 12 | jobs: |
| 13 | test: |
| 14 | runs-on: ubuntu-24.04 |
| 15 | steps: |
| 16 | - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 |
| 17 | with: |
| 18 | persist-credentials: false |
| 19 | - name: Build and test |
| 20 | run: | |
| 21 | cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" |
| 22 | cmake --build build --parallel 2 |
| 23 | ctest --test-dir build --output-on-failure |
| 24 | - name: Community rules |
| 25 | if: github.event_name == 'pull_request' |
| 26 | run: | |
| 27 | git fetch --no-tags origin "${{ github.base_ref }}" |
| 28 | changed="$(git diff --name-only "origin/${{ github.base_ref }}"...HEAD)" |
| 29 | echo "$changed" |
| 30 | if echo "$changed" | grep -qx 'VERSION'; then echo "::error::community changes must not edit VERSION (see CHANGELOG-COMMUNITY.md)"; exit 1; fi |
| 31 | if echo "$changed" | grep -q '^\.github/workflows/release\.yml$'; then echo "::error::community changes must not edit the release workflow"; exit 1; fi |
| 32 | if ! echo "$changed" | grep -qx 'CHANGELOG-COMMUNITY.md'; then echo "::warning::add an entry to CHANGELOG-COMMUNITY.md"; fi |