-
-
Notifications
You must be signed in to change notification settings - Fork 203
chore(ci): introduce console SDK build checks #1597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
553fa53
ci: use GitHub App token for console compat checks
JoshuaMoelans c25efa7
add --ref main
JoshuaMoelans b314658
ci: skip console compat check for fork PRs
JoshuaMoelans a8be7fd
Merge remote-tracking branch 'origin/master' into joshua/chore/consol…
JoshuaMoelans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Triggers build-compatibility checks in console repos (PlayStation, Xbox, Switch) | ||
| # whenever a PR is updated, 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: | ||
| - "release/**" | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| trigger-console-builds: | ||
| if: github.event.pull_request.head.repo.fork == false || github.event_name == 'push' # secrets unavailable for fork 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@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 | ||
| 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" ]]; then | ||
| echo "mode=FULL_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 }} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.