mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-19 07:57:49 -04:00
97 lines
3.4 KiB
YAML
97 lines
3.4 KiB
YAML
name: ABI Compatibility
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["ABI Compatibility Build"]
|
|
types: [completed]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
abi-diff:
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
name: ABI - Difference
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Download abi-head
|
|
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
|
with:
|
|
name: abi-head
|
|
path: abi-head
|
|
run-id: ${{ github.event.workflow_run.id }}
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Download abi-base
|
|
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
|
with:
|
|
name: abi-base
|
|
path: abi-base
|
|
run-id: ${{ github.event.workflow_run.id }}
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Setup ApiCompat
|
|
run: |
|
|
dotnet tool install --global Microsoft.DotNet.ApiCompat.Tool
|
|
|
|
- name: Run ApiCompat
|
|
id: diff
|
|
run: |
|
|
{
|
|
echo 'body<<EOF'
|
|
for file in Jellyfin.Data.dll MediaBrowser.Common.dll MediaBrowser.Controller.dll MediaBrowser.Model.dll Emby.Naming.dll Jellyfin.Extensions.dll Jellyfin.MediaEncoding.Keyframes.dll Jellyfin.Database.Implementations.dll; do
|
|
COMPAT_OUTPUT="$( { apicompat --left ./abi-base/${file} --right ./abi-head/${file}; } 2>&1 || true )"
|
|
if [ "APICompat ran successfully without finding any breaking changes." != "${COMPAT_OUTPUT}" ]; then
|
|
printf "\n${file}\n${COMPAT_OUTPUT}\n"
|
|
fi
|
|
done
|
|
echo EOF
|
|
} >> $GITHUB_OUTPUT
|
|
|
|
- name: Find difference comment
|
|
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
|
|
id: find-comment
|
|
with:
|
|
issue-number: ${{ github.event.workflow_run.pull_requests[0].number }}
|
|
direction: last
|
|
body-includes: abi-diff-workflow-comment
|
|
|
|
- name: Reply or edit difference comment (changed)
|
|
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
|
|
if: ${{ steps.diff.outputs.body != '' }}
|
|
with:
|
|
issue-number: ${{ github.event.workflow_run.pull_requests[0].number }}
|
|
comment-id: ${{ steps.find-comment.outputs.comment-id }}
|
|
edit-mode: replace
|
|
token: ${{ secrets.JF_BOT_TOKEN }}
|
|
body: |
|
|
<!--abi-diff-workflow-comment-->
|
|
<details>
|
|
<summary>ABI Difference</summary>
|
|
|
|
```
|
|
${{ steps.diff.outputs.body }}
|
|
```
|
|
|
|
</details>
|
|
|
|
- name: Reply or edit difference comment (unchanged)
|
|
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
|
|
if: ${{ steps.diff.outputs.body == '' && steps.find-comment.outputs.comment-id != '' }}
|
|
with:
|
|
issue-number: ${{ github.event.workflow_run.pull_requests[0].number }}
|
|
comment-id: ${{ steps.find-comment.outputs.comment-id }}
|
|
edit-mode: replace
|
|
token: ${{ secrets.JF_BOT_TOKEN }}
|
|
body: |
|
|
<!--abi-diff-workflow-comment-->
|
|
<details>
|
|
<summary>ABI Difference</summary>
|
|
|
|
No changes to the ABI found. See history of this comment for previous changes.
|
|
|
|
</details>
|