Skip to content

Commit

Permalink
[WIP] test workflow_run
Browse files Browse the repository at this point in the history
  • Loading branch information
WonyoungChoi committed Sep 30, 2021
1 parent 96b712b commit 4e97b24
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/check-symbol_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Check Symbols

on:
workflow_run:
workflows: ["Build"]
types:
- requested
- completed

jobs:
pending:
if: |
github.event.action == 'requested' &&
github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: WonyoungChoi/workflow-run-status-action@dev
with:
context: ${{ github.workflow }}
state: 'pending'
description: 'Waiting for build finish'

check:
if: |
github.event.action == 'completed' &&
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: flutter-tizen/tizen_allowlist
token: ${{ secrets.TIZENAPI_TOKEN }}
path: tizen_allowlist

- name: download artifacts
uses: TizenAPI/tizenfx-build-actions/download-workflow-artifacts@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
name: tizen-arm-release
path: artifacts

- name: check symbols
env:
ALLOWLIST: tizen_allowlist/4.0.0_native_whitelist_wearable_v12.txt
run: |
python ci/docker/tizen/tools/check-symbol.py --allowlist=$ALLOWLIST \
artifacts/libflutter_engine.so \
artifacts/libflutter_tizen_wearable.so
- name: commit success status
if: ${{ success() }}
uses: WonyoungChoi/workflow-run-status-action@dev
with:
context: ${{ github.workflow }}
state: 'success'
description: 'All symbols are valid'

- name: commit failure status
if: ${{ failure() }}
uses: WonyoungChoi/workflow-run-status-action@dev
with:
context: ${{ github.workflow }}
state: 'failure'
description: 'Failed in checking symbols'
target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}',
1 change: 1 addition & 0 deletions ci/docker/tizen/tools/check-symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def check_symbol(sofile, allowlist):
continue
if symbol.name in allowlist:
continue
print(symbol.name)
not_allowed.append(symbol)

if not_allowed:
Expand Down

0 comments on commit 4e97b24

Please sign in to comment.