Fix new amap workflow (#2151)
* Fix amap workflow * get_env.py * Fix amap_analyse.yml
This commit is contained in:
14
.github/workflows/amap_analyse.yml
vendored
14
.github/workflows/amap_analyse.yml
vendored
@@ -24,6 +24,16 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 'Get commit details'
|
||||
run: |
|
||||
export COMMIT_HASH=${{ github.event.client_payload.commit_hash }}
|
||||
export COMMIT_MSG=${{ github.event.client_payload.commit_msg }}
|
||||
export BRANCH_NAME=${{ github.event.client_payload.branch_name }}
|
||||
if [[ ${{ github.event.client_payload.event_type }} == "pr" ]]; then
|
||||
export PULL_ID=${{ github.event.client_payload.pull_id }}
|
||||
export PULL_NAME=${{ github.event.client_payload.pull_name }}
|
||||
fi
|
||||
|
||||
- name: 'Make artifacts directory'
|
||||
run: |
|
||||
rm -rf artifacts
|
||||
@@ -43,7 +53,7 @@ jobs:
|
||||
- name: 'Make .map file analyze'
|
||||
run: |
|
||||
cd artifacts/
|
||||
/Applications/amap/Contents/MacOS/amap -f "flipper-z-f7-firmware-${SUFFIX}.elf.map"
|
||||
/Applications/amap/Contents/MacOS/amap -f flipper-z-f7-firmware-${{ github.event.client_payload.suffix }}.elf.map
|
||||
|
||||
- name: 'Upload report to DB'
|
||||
run: |
|
||||
@@ -67,5 +77,5 @@ jobs:
|
||||
${{ secrets.AMAP_MARIADB_HOST }} \
|
||||
${{ secrets.AMAP_MARIADB_PORT }} \
|
||||
${{ secrets.AMAP_MARIADB_DATABASE }} \
|
||||
artifacts/flipper-z-f7-firmware-$SUFFIX.elf.map.all
|
||||
artifacts/flipper-z-f7-firmware-${{ github.event.client_payload.suffix }}.elf.map.all
|
||||
|
||||
|
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -99,12 +99,22 @@ jobs:
|
||||
rm ./deploy_key;
|
||||
|
||||
- name: 'Trigger map file analyser'
|
||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||
if: ${{ (github.event_name != 'pull_request')
|
||||
&& !github.event.pull_request.head.repo.fork }}
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
event-type: make_map_analyse
|
||||
client-payload: '{"branch_name": "${{steps.names.outputs.branch_name}}"}'
|
||||
client-payload: '{"branch_name": "${{steps.names.outputs.branch_name}}", "commit_hash": "${{steps.names.outputs.commit_hash}}", "commit_msg": "${{steps.names.outputs.commit_msg}}", "event_type": "push"}'
|
||||
|
||||
- name: 'Trigger map file analyser'
|
||||
if: ${{ (github.event_name == 'pull_request')
|
||||
&& !github.event.pull_request.head.repo.fork }}
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
event-type: make_map_analyse
|
||||
client-payload: '{"branch_name": "${{steps.names.outputs.branch_name}}", "commit_hash": "${{steps.names.outputs.commit_hash}}", "commit_msg": "${{steps.names.outputs.commit_msg}}", "pull_id": "${{steps.names.outputs.pull_id}}", "pull_name": "${{steps.names.outputs.pull_name}}", "event_type": "pr"}'
|
||||
|
||||
- name: 'Trigger update server reindex'
|
||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||
|
Reference in New Issue
Block a user