fix: define SENTRY_SIGNAL_SAFE_LOG no-op fallback for non-Unix/Window… #275
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
| # Triggers build-compatibility checks in console repos (PlayStation, Xbox, Switch) | |
| # whenever a PR is updated, unit tests on master pushes, or full tests on | |
| # release branches. | |
| # | |
| # This workflow does NOT wait for results. Each console repo posts a commit | |
| # status back to this repo's SHA when it finishes (success/failure). | |
| # Those show up as (non-required) checks on the PR. | |
| name: Console Compatibility | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "*.md" | |
| push: | |
| branches: | |
| - master | |
| - "release/**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| trigger-console-builds: | |
| if: github.actor != 'dependabot[bot]' && (github.event.pull_request.head.repo.fork == false || github.event_name == 'push') # secrets unavailable for fork/dependabot PRs | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - repo: getsentry/sentry-playstation | |
| context: console/playstation | |
| - repo: getsentry/sentry-xbox | |
| context: console/xbox | |
| - repo: getsentry/sentry-switch | |
| context: console/switch | |
| steps: | |
| - name: Get auth token | |
| id: token | |
| uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 | |
| with: | |
| app-id: ${{ vars.CONSOLE_CI_APP_ID }} | |
| private-key: ${{ secrets.CONSOLE_CI_PRIVATE_KEY }} | |
| owner: getsentry | |
| repositories: sentry-native,sentry-playstation,sentry-xbox,sentry-switch | |
| # Immediately show "pending" checks on the PR. | |
| - name: Set pending status | |
| env: | |
| GH_TOKEN: ${{ steps.token.outputs.token }} | |
| run: | | |
| gh api repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha || github.sha }} \ | |
| -f state=pending \ | |
| -f context="${{ matrix.context }}" \ | |
| -f description="Waiting for build to start..." | |
| - name: Determine mode | |
| id: mode | |
| run: | | |
| if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/heads/release/* ]]; then | |
| echo "mode=FULL_TEST" >> "$GITHUB_OUTPUT" | |
| elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/master" ]]; then | |
| echo "mode=UNIT_TEST" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "mode=BUILD_ONLY" >> "$GITHUB_OUTPUT" | |
| fi | |
| # gh workflow run sends a workflow_dispatch event to the console repo. | |
| # native-compat-check.yml must exist on the default branch (main) of | |
| # the console repo for this to work. | |
| - name: Trigger console build | |
| env: | |
| GH_TOKEN: ${{ steps.token.outputs.token }} | |
| run: | | |
| gh workflow run native-compat-check.yml \ | |
| --repo ${{ matrix.repo }} \ | |
| --ref main \ | |
| -f native_ref=${{ github.event.pull_request.head.sha || github.sha }} \ | |
| -f callback_repo=${{ github.repository }} \ | |
| -f callback_sha=${{ github.event.pull_request.head.sha || github.sha }} \ | |
| -f callback_context="${{ matrix.context }}" \ | |
| -f mode=${{ steps.mode.outputs.mode }} \ | |
| -f pr_number=${{ github.event.pull_request.number || github.ref_name }} |