C++20 compatible polyfill for <expected>
#147
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
| name: licence | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/licence.yml' | |
| - 'include/**' | |
| - 'tests/**' | |
| - 'CMakeLists.txt' | |
| - 'cmake/**' | |
| - '.fossa.yml' | |
| - 'LICENSE.md' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/licence.yml' | |
| - 'include/**' | |
| - 'tests/**' | |
| - 'CMakeLists.txt' | |
| - 'cmake/**' | |
| - '.fossa.yml' | |
| - 'LICENSE.md' | |
| workflow_dispatch: | |
| inputs: | |
| run_licence_check: | |
| description: "Run FOSSA licence check" | |
| required: true | |
| default: true | |
| type: boolean | |
| jobs: | |
| licence-check: | |
| if: ${{ github.event_name == 'push' || inputs.run_licence_check }} | |
| runs-on: | |
| group: runners-arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: fossas/fossa-action@v1 | |
| with: | |
| api-key: ${{ secrets.FOSSA_API_KEY }} | |
| licence-unchanged: | |
| if: ${{ github.event_name == 'pull_request' }} | |
| runs-on: | |
| group: runners-arm64 | |
| env: | |
| LICENCE_FILE: LICENSE.md | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: . | |
| fetch-depth: 0 | |
| - name: Compare licence file | |
| id: assert | |
| run: | |
| git diff --exit-code origin/${{ github.base_ref }} -- ${LICENCE_FILE} | |
| - name: What happened? | |
| if: failure() && steps.assert.outcome == 'failure' | |
| run: | |
| echo "Your pull request appear to have attempted to modify ${LICENCE_FILE}" | |
| echo "If you want your name added to ${LICENCE_FILE}, please ask project maintainers." | |
| exit 1 |