box2d_wasm #10365
Workflow file for this run
This file contains 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: <Web> Interface check | |
#on: push | |
on: [pull_request] | |
# github.head_ref is only defined on pull_request events | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
interface_check: | |
if: | |
(! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration')) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14.19' | |
- uses: actions/checkout@v3 | |
name: Checkout Base Ref | |
with: | |
repository: ${{ github.event.pull_request.base.repo.full_name }} | |
ref: ${{ github.base_ref }} | |
path: './engine' | |
- run: | | |
"EXT_VERSION=$(node ./engine/.github/workflows/get-native-external-version.js)" >> $env:GITHUB_ENV | |
shell: pwsh | |
- uses: actions/checkout@v3 | |
name: Download external | |
with: | |
repository: cocos/cocos-engine-external | |
path: './engine/native/external' | |
ref: "${{ env.EXT_VERSION }}" | |
fetch-depth: 1 | |
- name: Build Base Declarations | |
working-directory: ./engine | |
run: | | |
npm install | |
- name: Clear npm Cache | |
run: | | |
npm cache clean --force | |
- uses: actions/checkout@v3 | |
name: Checkout Head Ref | |
with: | |
ref: 'refs/pull/${{ github.event.pull_request.number }}/merge' # Don't check out the head commit, checkout the "merge commit" instead | |
path: './engine-HEAD' | |
- run: | | |
"EXT_VERSION_HEAD=$(node ./engine-HEAD/.github/workflows/get-native-external-version.js)" >> $env:GITHUB_ENV | |
shell: pwsh | |
- uses: actions/checkout@v3 | |
name: Download external | |
with: | |
repository: cocos/cocos-engine-external | |
path: './engine-HEAD/native/external' | |
ref: "${{ env.EXT_VERSION_HEAD }}" | |
fetch-depth: 1 | |
- name: Build Head Declarations | |
working-directory: ./engine-HEAD | |
run: | | |
npm install | |
- uses: LouisBrunner/[email protected] | |
with: | |
old: ./engine/bin/.declarations/cc.d.ts | |
new: ./engine-HEAD/bin/.declarations/cc.d.ts | |
mode: addition | |
tolerance: worse | |
output: ./engine/interface-diff.txt | |
- name: optimize interface check report | |
working-directory: ./engine | |
run: | | |
cat ./interface-diff.txt | |
node ./.github/workflows/interface-check-report.js | |
- name: Upload interface-diff.txt artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: interface-diff.txt | |
path: ./engine/interface-diff.txt | |