mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Add API Compatibility Checks (#1603)
* Add GitHub Action job to check for API compatibility Runs critical path DLLs through `apicompat` tool against currently-live stg build to see what is broken. * Revert CS changes for GH Action positive test-case
This commit is contained in:
parent
767cc49ecb
commit
3c7900ea13
1 changed files with 42 additions and 1 deletions
43
.github/workflows/main.yml
vendored
43
.github/workflows/main.yml
vendored
|
|
@ -42,7 +42,48 @@ jobs:
|
|||
with:
|
||||
name: dalamud-artifact
|
||||
path: bin\Release
|
||||
|
||||
|
||||
check_api_compat:
|
||||
name: "Check API Compatibility"
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
needs: build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: "Install .NET SDK"
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7
|
||||
- name: "Install ApiCompat"
|
||||
run: |
|
||||
dotnet tool install -g Microsoft.DotNet.ApiCompat.Tool
|
||||
- name: "Download Proposed Artifacts"
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: dalamud-artifact
|
||||
path: .\right
|
||||
- name: "Download Live (Stg) Artifacts"
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip
|
||||
Expand-Archive -Force latest.zip "left"
|
||||
- name: "Verify Compatibility"
|
||||
run: |
|
||||
$FILES_TO_VALIDATE = "Dalamud.dll","FFXIVClientStructs.dll","Lumina.dll","Lumina.Excel.dll"
|
||||
|
||||
$retcode = 0
|
||||
|
||||
foreach ($file in $FILES_TO_VALIDATE) {
|
||||
$testout = ""
|
||||
Write-Output "::group::=== API COMPATIBILITY CHECK: ${file} ==="
|
||||
apicompat -l "left\${file}" -r "right\${file}" | Tee-Object -Variable testout
|
||||
Write-Output "::endgroup::"
|
||||
if ($testout -ne "APICompat ran successfully without finding any breaking changes.") {
|
||||
Write-Output "::error::${file} did not pass. Please review it for problems."
|
||||
$retcode = 1
|
||||
}
|
||||
}
|
||||
|
||||
exit $retcode
|
||||
|
||||
deploy_stg:
|
||||
name: Deploy dalamud-distrib staging
|
||||
if: ${{ github.repository_owner == 'goatcorp' && github.event_name == 'push' }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue