-
Notifications
You must be signed in to change notification settings - Fork 2.4k
67 lines (61 loc) · 2.4 KB
/
export_workflow_metrics.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Export workflow metrics
on:
workflow_run:
workflows:
- "Android ARM64 with vcpkg"
- "Android x64"
- "Cleanup caches"
- "Coverity (Ubuntu 20.04, Python 3.11)"
- "Debian 10 ARM"
- "Fedora 29 (RHEL 8.4), Python 3.9"
- "Linux (Ubuntu 20.04, Python 3.9)"
- "Linux (Ubuntu 22.04, Python 3.11)"
- "Linux (Ubuntu 24.04, Python 3.12)"
- "Linux ARM64 (Ubuntu 20.04, Python 3.11)"
- "Linux Static CC (Ubuntu 22.04, Python 3.11, Clang)"
- "Linux RISC-V with Conan (Ubuntu 22.04, Python 3.10)"
- "Linux (Ubuntu 22.04, Python 3.11, Intel DPC\\+\\+ Compiler)"
- "Linux CPU Plugin Snippets with LIBXSMM (Ubuntu 20.04)"
- "Linux Sanitizers (Ubuntu 20.04, Python 3.9)"
- "macOS (Python 3.11)"
- "macOS ARM64 (Python 3.11)"
- "Manylinux 2014"
- "Webassembly"
- "Windows (VS 2019, Python 3.11, Release)"
- "Windows (VS 2019, Python 3.11, Debug)"
- "Windows Conditional Compilation (VS 2022, Python 3.11)"
- "Rerun Workflow with Known Errors"
types:
- completed
permissions: read-all
jobs:
export-workflow-metrics:
name: Export finished workflow metrics
runs-on: aks-linux-2-cores-8gb-stats
if: ${{ github.repository_owner == 'openvinotoolkit' }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
timeout-minutes: 15
with:
sparse-checkout: '.github'
- name: Install deps
run: |
pip3 install -r .github/scripts/requirements.txt
# dependency review action has these as an exception
# yet it still complains, so install them here
pip3 install PyGithub==2.2.0 psycopg2-binary==2.9.9
- name: Send metrics to SQL database
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_ID: ${{ github.event.workflow_run.id }}
PGHOST: ${{ secrets.METRICS_DATABASE_HOST }}
PGUSER: ${{ secrets.METRICS_DATABASE_USERNAME }}
PGPASSWORD: ${{ secrets.METRICS_DATABASE_PASSWORD }}
PGDATABASE: ${{ secrets.METRICS_DATABASE_NAME }}
PGPORT: 5432
LOGLEVEL: "${{ runner.debug == '1' && 'DEBUG' || 'INFO' }}"
run: |
python3 .github/scripts/collect_github_metrics.py \
--run-id ${{ github.event.workflow_run.id }} \
--repository-name ${GITHUB_REPOSITORY}