vgf-adapter-model-explorer 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vgf_adapter_model_explorer-0.5.0/.github/CODEOWNERS +1 -0
- vgf_adapter_model_explorer-0.5.0/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
- vgf_adapter_model_explorer-0.5.0/.github/ISSUE_TEMPLATE/config.yml +2 -0
- vgf_adapter_model_explorer-0.5.0/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
- vgf_adapter_model_explorer-0.5.0/.github/actions/build-wheel/action.yml +89 -0
- vgf_adapter_model_explorer-0.5.0/.github/dependabot.yml +9 -0
- vgf_adapter_model_explorer-0.5.0/.github/workflows/blackduck-full-scan.yml +45 -0
- vgf_adapter_model_explorer-0.5.0/.github/workflows/ci.yml +292 -0
- vgf_adapter_model_explorer-0.5.0/.github/workflows/codex-pr-review.yml +16 -0
- vgf_adapter_model_explorer-0.5.0/.github/workflows/manual-validation.yml +165 -0
- vgf_adapter_model_explorer-0.5.0/.github/workflows/pr-description-change.yml +26 -0
- vgf_adapter_model_explorer-0.5.0/.github/workflows/pr-internal-checks.yml +19 -0
- vgf_adapter_model_explorer-0.5.0/.github/workflows/pr.yml +25 -0
- vgf_adapter_model_explorer-0.5.0/.github/workflows/trigger-release.yml +82 -0
- vgf_adapter_model_explorer-0.5.0/.gitignore +39 -0
- vgf_adapter_model_explorer-0.5.0/.qlty/qlty.toml +70 -0
- vgf_adapter_model_explorer-0.5.0/CMakeLists.txt +71 -0
- vgf_adapter_model_explorer-0.5.0/LICENSE +202 -0
- vgf_adapter_model_explorer-0.5.0/PKG-INFO +81 -0
- vgf_adapter_model_explorer-0.5.0/README.md +59 -0
- vgf_adapter_model_explorer-0.5.0/SECURITY.md +73 -0
- vgf_adapter_model_explorer-0.5.0/cliff.toml +55 -0
- vgf_adapter_model_explorer-0.5.0/pyproject.toml +154 -0
- vgf_adapter_model_explorer-0.5.0/screenshots/vgf-adapter-readme-screenshot.png +0 -0
- vgf_adapter_model_explorer-0.5.0/scripts/add-sbom-disclaimer.py +88 -0
- vgf_adapter_model_explorer-0.5.0/scripts/download-adapter-sboms.py +302 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/__init__.py +2 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/builder/__init__.py +2 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/builder/builder.py +794 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/main.py +74 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/parser/__init__.py +2 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/parser/parser.py +347 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/parser/types.py +440 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/__init__.py +2 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/fixtures/mobilenet_v2/expected.json +38255 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/fixtures/mobilenet_v2/input.vgf +0 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/fixtures/vww4/expected.json +34957 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/fixtures/vww4/input.vgf +0 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/test_e2e.py +43 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/test_main.py +42 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/test_model_explorer_cli.py +98 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/test_vgf_builder.py +1211 -0
- vgf_adapter_model_explorer-0.5.0/src/vgf_adapter_model_explorer/tests/test_vgf_parser.py +863 -0
- vgf_adapter_model_explorer-0.5.0/tools/stage_vgfpy_for_tests.py +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @arm/arm-model-explorer
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report issue (excl. security; see SECURITY.md)
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Bug Description
|
|
10
|
+
<!-- Provide a clear and concise description of the bug -->
|
|
11
|
+
|
|
12
|
+
## Steps to Reproduce
|
|
13
|
+
1.
|
|
14
|
+
2.
|
|
15
|
+
3.
|
|
16
|
+
<!-- Add more steps as needed -->
|
|
17
|
+
|
|
18
|
+
## Expected Behavior
|
|
19
|
+
<!-- Describe what you expected to happen -->
|
|
20
|
+
|
|
21
|
+
## Actual Behavior
|
|
22
|
+
<!-- Describe what actually happened -->
|
|
23
|
+
|
|
24
|
+
## Screenshots
|
|
25
|
+
<!-- If applicable, add screenshots to help explain your problem -->
|
|
26
|
+
|
|
27
|
+
## Environment
|
|
28
|
+
<!-- Add any other relevant environment details -->
|
|
29
|
+
- Model Explorer Version: [e.g., 1.2.3]
|
|
30
|
+
- Adapter Version: [e.g., 1.2.3]
|
|
31
|
+
- OS: [e.g., Windows 10, macOS 12.0]
|
|
32
|
+
|
|
33
|
+
## Additional Context
|
|
34
|
+
<!-- Add any other context about the problem here -->
|
|
35
|
+
|
|
36
|
+
## Possible Solution (Optional)
|
|
37
|
+
<!-- If you have suggestions on how to fix the bug, add them here -->
|
|
38
|
+
|
|
39
|
+
## Logs/Error Messages
|
|
40
|
+
<!-- Include any relevant log entries or error messages -->
|
|
41
|
+
|
|
42
|
+
- [ ] I have searched for existing bug reports
|
|
43
|
+
- [ ] I have included all relevant information
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest a new feature or enhancement
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Feature Description
|
|
10
|
+
<!-- Provide a clear and concise description of the feature you'd like to see implemented -->
|
|
11
|
+
|
|
12
|
+
## Problem Statement
|
|
13
|
+
<!-- Describe the problem this feature would solve or the need it addresses -->
|
|
14
|
+
|
|
15
|
+
## Proposed Solution
|
|
16
|
+
<!-- Describe how you envision this feature working -->
|
|
17
|
+
|
|
18
|
+
## Alternative Solutions
|
|
19
|
+
<!-- Describe any alternative solutions or features you've considered -->
|
|
20
|
+
|
|
21
|
+
## Additional Context
|
|
22
|
+
<!-- Add any other context, screenshots, or examples about the feature request here -->
|
|
23
|
+
|
|
24
|
+
- [ ] I have searched for existing feature requests
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Build wheel (composite)
|
|
2
|
+
description: Builds wheels for VGF Adapter for Model Explorer
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
required: true
|
|
7
|
+
internal-dev-version:
|
|
8
|
+
required: false
|
|
9
|
+
default: "false"
|
|
10
|
+
artifact-name:
|
|
11
|
+
required: false
|
|
12
|
+
default: dist
|
|
13
|
+
build-sdist:
|
|
14
|
+
required: false
|
|
15
|
+
default: "false"
|
|
16
|
+
|
|
17
|
+
runs:
|
|
18
|
+
using: "composite"
|
|
19
|
+
steps:
|
|
20
|
+
- name: Set up Python environment
|
|
21
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ inputs.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Ensure pip is available
|
|
26
|
+
shell: bash
|
|
27
|
+
run: |
|
|
28
|
+
python -m ensurepip --upgrade || {
|
|
29
|
+
curl -sS https://bootstrap.pypa.io/get-pip.py -o "$RUNNER_TEMP/get-pip.py"
|
|
30
|
+
python "$RUNNER_TEMP/get-pip.py"
|
|
31
|
+
}
|
|
32
|
+
python -m pip install --upgrade pip
|
|
33
|
+
|
|
34
|
+
- name: Set internal development version
|
|
35
|
+
if: inputs.internal-dev-version == 'true'
|
|
36
|
+
shell: bash
|
|
37
|
+
run: |
|
|
38
|
+
BASE_VERSION=$(sed -n 's/^version = "\(.*\)"$/\1/p' pyproject.toml | head -n 1)
|
|
39
|
+
SHORT_SHA="${GITHUB_SHA::7}"
|
|
40
|
+
DEV_VERSION="${BASE_VERSION}.dev${GITHUB_RUN_NUMBER}+${SHORT_SHA}"
|
|
41
|
+
echo "Building internal development version ${DEV_VERSION} from ${GITHUB_SHA}"
|
|
42
|
+
sed -i "s/^version = \".*\"$/version = \"${DEV_VERSION}\"/" pyproject.toml
|
|
43
|
+
|
|
44
|
+
- name: Prepare wheel build metadata
|
|
45
|
+
shell: bash
|
|
46
|
+
env:
|
|
47
|
+
PYTHON_VERSION: ${{ inputs.python-version }}
|
|
48
|
+
run: |
|
|
49
|
+
case "$PYTHON_VERSION" in
|
|
50
|
+
"3.10") echo "CIBW_BUILD=cp310-*" >> "$GITHUB_ENV" ;;
|
|
51
|
+
"3.11") echo "CIBW_BUILD=cp311-*" >> "$GITHUB_ENV" ;;
|
|
52
|
+
"3.12") echo "CIBW_BUILD=cp312-*" >> "$GITHUB_ENV" ;;
|
|
53
|
+
"3.13") echo "CIBW_BUILD=cp313-*" >> "$GITHUB_ENV" ;;
|
|
54
|
+
*) echo "Unsupported Python version: $PYTHON_VERSION" >&2; exit 1 ;;
|
|
55
|
+
esac
|
|
56
|
+
|
|
57
|
+
- name: Build plugin package
|
|
58
|
+
shell: bash
|
|
59
|
+
env:
|
|
60
|
+
CIBW_ARCHS: auto64
|
|
61
|
+
CIBW_BEFORE_BUILD_LINUX: "python -m pip install cmake ninja pybind11==3.0.1 scikit-build-core==0.11.6"
|
|
62
|
+
CIBW_BEFORE_BUILD_MACOS: "python -m pip install cmake ninja pybind11==3.0.1 scikit-build-core==0.11.6"
|
|
63
|
+
CIBW_BEFORE_BUILD_WINDOWS: "python -m pip install cmake ninja pybind11==3.0.1 scikit-build-core==0.11.6"
|
|
64
|
+
CIBW_BUILD_VERBOSITY: 1
|
|
65
|
+
CIBW_ENVIRONMENT: PIP_INDEX_URL=${{ env.PIP_INDEX_URL || 'https://pypi.org/simple' }}
|
|
66
|
+
CIBW_ENVIRONMENT_MACOS: PIP_INDEX_URL=${{ env.PIP_INDEX_URL || 'https://pypi.org/simple' }} MACOSX_DEPLOYMENT_TARGET=11.0
|
|
67
|
+
CIBW_ENVIRONMENT_WINDOWS: PIP_INDEX_URL=${{ env.PIP_INDEX_URL || 'https://pypi.org/simple' }}
|
|
68
|
+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
|
|
69
|
+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
|
|
70
|
+
CIBW_SKIP: "*-musllinux_*"
|
|
71
|
+
run: |
|
|
72
|
+
python -m pip install cibuildwheel==2.23.3
|
|
73
|
+
python -m cibuildwheel --output-dir wheelhouse
|
|
74
|
+
|
|
75
|
+
mkdir -p dist
|
|
76
|
+
mv wheelhouse/*.whl dist/
|
|
77
|
+
|
|
78
|
+
- name: Build source distribution
|
|
79
|
+
if: inputs.build-sdist == 'true' && runner.os == 'Linux' && runner.arch == 'X64'
|
|
80
|
+
shell: bash
|
|
81
|
+
run: |
|
|
82
|
+
python -m pip install build
|
|
83
|
+
python -m build --sdist
|
|
84
|
+
|
|
85
|
+
- name: Upload plugin package artifact
|
|
86
|
+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
|
87
|
+
with:
|
|
88
|
+
name: ${{ inputs.artifact-name }}
|
|
89
|
+
path: dist
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Black Duck Full Scan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
project-version:
|
|
7
|
+
description: "Black Duck project version name, for example 0.4.1 or pr-29-<sha>."
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
project-name:
|
|
11
|
+
description: "Black Duck project name. Leave empty to use the repository name."
|
|
12
|
+
required: false
|
|
13
|
+
default: ""
|
|
14
|
+
type: string
|
|
15
|
+
source-path:
|
|
16
|
+
description: "Path to scan."
|
|
17
|
+
required: false
|
|
18
|
+
default: "."
|
|
19
|
+
type: string
|
|
20
|
+
python-dependencies:
|
|
21
|
+
description: "Install requirement*.txt files into a venv and pass it to Detect."
|
|
22
|
+
required: true
|
|
23
|
+
default: false
|
|
24
|
+
type: boolean
|
|
25
|
+
snippet-matching:
|
|
26
|
+
description: "Enable Black Duck snippet matching."
|
|
27
|
+
required: true
|
|
28
|
+
default: false
|
|
29
|
+
type: boolean
|
|
30
|
+
|
|
31
|
+
permissions:
|
|
32
|
+
contents: read
|
|
33
|
+
|
|
34
|
+
jobs:
|
|
35
|
+
blackduck:
|
|
36
|
+
if: ${{ github.event.repository.private }}
|
|
37
|
+
uses: Arm-Debug/github-workflow-wizardry/.github/workflows/blackduck-full-scan.yml@main
|
|
38
|
+
with:
|
|
39
|
+
project-name: ${{ inputs['project-name'] }}
|
|
40
|
+
project-version: ${{ inputs['project-version'] }}
|
|
41
|
+
source-path: ${{ inputs['source-path'] }}
|
|
42
|
+
python-dependencies: ${{ inputs['python-dependencies'] }}
|
|
43
|
+
snippet-matching: ${{ inputs['snippet-matching'] }}
|
|
44
|
+
secrets:
|
|
45
|
+
BLACKDUCK_API_TOKEN: ${{ secrets.BLACKDUCK_API_TOKEN }}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
name: VGF Adapter for Model Explorer CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
tags:
|
|
7
|
+
- "v*.*.*"
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: ["main"]
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: "0 3 */6 * *"
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
DEFAULT_PY_VERSION: "3.10"
|
|
16
|
+
ME_REPO_ACCESS_APP_ID: ${{ secrets.ME_REPO_ACCESS_APP_ID }}
|
|
17
|
+
ME_REPO_ACCESS_PRIVATE_KEY: ${{ secrets.ME_REPO_ACCESS_PRIVATE_KEY }}
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
tests:
|
|
24
|
+
name: Run tests
|
|
25
|
+
strategy:
|
|
26
|
+
fail-fast: false
|
|
27
|
+
matrix:
|
|
28
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
29
|
+
runner: ${{ fromJSON(vars.TEST_RUNNERS) }}
|
|
30
|
+
runs-on: ${{ matrix.runner }}
|
|
31
|
+
env:
|
|
32
|
+
HATCH_DATA_DIR: ${{ github.workspace }}/.hatch-data-py${{ matrix.python-version }}
|
|
33
|
+
HATCH_CACHE_DIR: ${{ github.workspace }}/.hatch-cache-py${{ matrix.python-version }}
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python-version }}
|
|
38
|
+
|
|
39
|
+
- name: Checkout plugin repo
|
|
40
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
41
|
+
with:
|
|
42
|
+
persist-credentials: false
|
|
43
|
+
|
|
44
|
+
- name: Install Hatch
|
|
45
|
+
env:
|
|
46
|
+
PIP_INDEX_URL: ${{ secrets.INTERNAL_PYPI_AUTH_INDEX_URL || 'https://pypi.org/simple' }}
|
|
47
|
+
run: |
|
|
48
|
+
python -m pip install hatch==1.14.1 virtualenv==20.26.6
|
|
49
|
+
|
|
50
|
+
- name: Lint and Format Check
|
|
51
|
+
run: |
|
|
52
|
+
hatch run ci:lint
|
|
53
|
+
hatch run ci:format-check
|
|
54
|
+
|
|
55
|
+
- name: Type Check
|
|
56
|
+
run: |
|
|
57
|
+
hatch run ci:type-check
|
|
58
|
+
|
|
59
|
+
- name: Run Tests
|
|
60
|
+
shell: bash
|
|
61
|
+
env:
|
|
62
|
+
PIP_INDEX_URL: ${{ secrets.INTERNAL_PYPI_AUTH_INDEX_URL || 'https://pypi.org/simple' }}
|
|
63
|
+
MATRIX_RUNNER: ${{ matrix.runner }}
|
|
64
|
+
LINUX_RUNNER: ${{ vars.LINUX_RUNNER }}
|
|
65
|
+
MATRIX_PYTHON_VERSION: ${{ matrix.python-version }}
|
|
66
|
+
DEFAULT_PY_VERSION: ${{ env.DEFAULT_PY_VERSION }}
|
|
67
|
+
run: |
|
|
68
|
+
PYTEST_CVG_FLAGS=""
|
|
69
|
+
if [[ "$MATRIX_RUNNER" == "$LINUX_RUNNER" && \
|
|
70
|
+
"$MATRIX_PYTHON_VERSION" == "$DEFAULT_PY_VERSION" ]]; then
|
|
71
|
+
PYTEST_CVG_FLAGS="-v --cov=vgf_adapter_model_explorer --cov-report=lcov:reports/lcov.info"
|
|
72
|
+
fi
|
|
73
|
+
hatch run ci:test -- ${PYTEST_CVG_FLAGS}
|
|
74
|
+
|
|
75
|
+
- name: Upload coverage to Qlty
|
|
76
|
+
if: matrix.runner == vars.LINUX_RUNNER && matrix.python-version == env.DEFAULT_PY_VERSION
|
|
77
|
+
uses: qltysh/qlty-action/coverage@9e8e09dfc3d82a968f4034f5265eaf3c142881f7 # v2.0.0
|
|
78
|
+
with:
|
|
79
|
+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
|
|
80
|
+
files: reports/lcov.info
|
|
81
|
+
|
|
82
|
+
build:
|
|
83
|
+
name: Build Package
|
|
84
|
+
needs: [tests]
|
|
85
|
+
strategy:
|
|
86
|
+
fail-fast: false
|
|
87
|
+
matrix:
|
|
88
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
89
|
+
runner: ${{ fromJSON(vars.TEST_RUNNERS) }}
|
|
90
|
+
runs-on: ${{ matrix.runner }}
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
93
|
+
with:
|
|
94
|
+
persist-credentials: false
|
|
95
|
+
|
|
96
|
+
- uses: ./.github/actions/build-wheel
|
|
97
|
+
env:
|
|
98
|
+
PIP_INDEX_URL: ${{ secrets.INTERNAL_PYPI_AUTH_INDEX_URL || 'https://pypi.org/simple' }}
|
|
99
|
+
with:
|
|
100
|
+
python-version: ${{ matrix.python-version }}
|
|
101
|
+
internal-dev-version: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner != 'arm' }}
|
|
102
|
+
artifact-name: dist-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}
|
|
103
|
+
build-sdist: ${{ runner.os == 'Linux' && runner.arch == 'X64' && matrix.python-version == env.DEFAULT_PY_VERSION }}
|
|
104
|
+
|
|
105
|
+
- name: Create wheel SBOM output directory
|
|
106
|
+
if: runner.os == 'Linux' && runner.arch == 'X64' && matrix.python-version == env.DEFAULT_PY_VERSION
|
|
107
|
+
run: mkdir -p sbom
|
|
108
|
+
|
|
109
|
+
- name: Generate wheel SBOM
|
|
110
|
+
if: runner.os == 'Linux' && runner.arch == 'X64' && matrix.python-version == env.DEFAULT_PY_VERSION
|
|
111
|
+
env:
|
|
112
|
+
PIP_INDEX_URL: ${{ secrets.INTERNAL_PYPI_AUTH_INDEX_URL || 'https://pypi.org/simple' }}
|
|
113
|
+
run: |
|
|
114
|
+
python -m pip install --index-url https://pypi.org/simple cyclonedx-bom==7.3.0
|
|
115
|
+
python -m venv .sbom-venv
|
|
116
|
+
.sbom-venv/bin/python -m pip install --upgrade pip
|
|
117
|
+
.sbom-venv/bin/python -m pip install dist/*.whl
|
|
118
|
+
python -m cyclonedx_py environment .sbom-venv/bin/python \
|
|
119
|
+
--output-format JSON \
|
|
120
|
+
--output-file sbom/vgf-adapter-model-explorer-wheel.cdx.json
|
|
121
|
+
|
|
122
|
+
- name: Add SBOM disclaimer
|
|
123
|
+
if: runner.os == 'Linux' && runner.arch == 'X64' && matrix.python-version == env.DEFAULT_PY_VERSION
|
|
124
|
+
run: |
|
|
125
|
+
python scripts/add-sbom-disclaimer.py \
|
|
126
|
+
sbom/vgf-adapter-model-explorer-wheel.cdx.json
|
|
127
|
+
|
|
128
|
+
- name: Download adapter SBOMs
|
|
129
|
+
if: runner.os == 'Linux' && runner.arch == 'X64' && matrix.python-version == env.DEFAULT_PY_VERSION
|
|
130
|
+
env:
|
|
131
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
132
|
+
run: |
|
|
133
|
+
python scripts/download-adapter-sboms.py \
|
|
134
|
+
--github-token "$GITHUB_TOKEN"
|
|
135
|
+
|
|
136
|
+
- name: Upload wheel SBOM artifact
|
|
137
|
+
if: runner.os == 'Linux' && runner.arch == 'X64' && matrix.python-version == env.DEFAULT_PY_VERSION
|
|
138
|
+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
|
139
|
+
with:
|
|
140
|
+
name: project-sbom
|
|
141
|
+
path: |
|
|
142
|
+
sbom/**/*.json
|
|
143
|
+
sbom/dependencies/adapter-sbom-manifest.json
|
|
144
|
+
if-no-files-found: error
|
|
145
|
+
|
|
146
|
+
release:
|
|
147
|
+
name: Release
|
|
148
|
+
if: startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'arm'
|
|
149
|
+
needs:
|
|
150
|
+
- build
|
|
151
|
+
runs-on: ubuntu-latest
|
|
152
|
+
environment:
|
|
153
|
+
name: pypi
|
|
154
|
+
url: https://pypi.org/p/vgf-adapter-model-explorer
|
|
155
|
+
permissions:
|
|
156
|
+
contents: read
|
|
157
|
+
id-token: write
|
|
158
|
+
|
|
159
|
+
steps:
|
|
160
|
+
- uses: getsentry/action-github-app-token@d4b5da6c5e37703f8c3b3e43abb5705b46e159cc #v3.0.0
|
|
161
|
+
id: get_app_token
|
|
162
|
+
with:
|
|
163
|
+
app_id: ${{ env.ME_REPO_ACCESS_APP_ID }}
|
|
164
|
+
private_key: ${{ env.ME_REPO_ACCESS_PRIVATE_KEY }}
|
|
165
|
+
|
|
166
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
167
|
+
with:
|
|
168
|
+
fetch-depth: 0
|
|
169
|
+
token: ${{ steps.get_app_token.outputs.token }}
|
|
170
|
+
persist-credentials: false
|
|
171
|
+
|
|
172
|
+
- name: Generate release notes
|
|
173
|
+
uses: orhun/git-cliff-action@d77b37db2e3f7398432d34b72a12aa3e2ba87e51 # v4.6.0
|
|
174
|
+
id: git-cliff
|
|
175
|
+
with:
|
|
176
|
+
config: cliff.toml
|
|
177
|
+
args: --latest
|
|
178
|
+
env:
|
|
179
|
+
OUTPUT: CHANGELOG.md
|
|
180
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
181
|
+
GITHUB_REPO: ${{ github.repository }}
|
|
182
|
+
|
|
183
|
+
- name: Download distribution artifacts
|
|
184
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
185
|
+
with:
|
|
186
|
+
pattern: dist-*
|
|
187
|
+
path: dist/
|
|
188
|
+
merge-multiple: true
|
|
189
|
+
|
|
190
|
+
- name: Publish distribution to PyPI
|
|
191
|
+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1.12.4
|
|
192
|
+
|
|
193
|
+
- name: Download project SBOM
|
|
194
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
195
|
+
with:
|
|
196
|
+
name: project-sbom
|
|
197
|
+
path: sbom/
|
|
198
|
+
|
|
199
|
+
- name: Publish GitHub release
|
|
200
|
+
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
|
|
201
|
+
with:
|
|
202
|
+
tag_name: ${{ github.ref_name }}
|
|
203
|
+
name: ${{ github.ref_name }}
|
|
204
|
+
body_path: CHANGELOG.md
|
|
205
|
+
files: |
|
|
206
|
+
dist/*.whl
|
|
207
|
+
dist/*.tar.gz
|
|
208
|
+
sbom/**/*.json
|
|
209
|
+
token: ${{ steps.get_app_token.outputs.token }}
|
|
210
|
+
|
|
211
|
+
release-internal:
|
|
212
|
+
name: Release to internal PyPI
|
|
213
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && github.repository_owner != 'arm'
|
|
214
|
+
needs:
|
|
215
|
+
- build
|
|
216
|
+
runs-on: ${{ vars.LINUX_RUNNER }}
|
|
217
|
+
permissions: {}
|
|
218
|
+
|
|
219
|
+
steps:
|
|
220
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
221
|
+
with:
|
|
222
|
+
python-version: ${{ env.DEFAULT_PY_VERSION }}
|
|
223
|
+
|
|
224
|
+
- name: Download distribution artifacts
|
|
225
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
226
|
+
with:
|
|
227
|
+
pattern: dist-*
|
|
228
|
+
path: dist/
|
|
229
|
+
merge-multiple: true
|
|
230
|
+
|
|
231
|
+
- name: Publish distribution to internal PyPI
|
|
232
|
+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1.12.4
|
|
233
|
+
with:
|
|
234
|
+
repository-url: ${{ vars.INTERNAL_PYPI_UPLOAD_URL }}
|
|
235
|
+
user: ${{ secrets.INTERNAL_PYPI_USERNAME }}
|
|
236
|
+
password: ${{ secrets.INTERNAL_PYPI_TOKEN }}
|
|
237
|
+
packages-dir: dist/
|
|
238
|
+
attestations: false
|
|
239
|
+
|
|
240
|
+
sync-commits-to-public-repo:
|
|
241
|
+
name: Sync commits to public repo
|
|
242
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner != 'arm'
|
|
243
|
+
needs: build
|
|
244
|
+
runs-on: ubuntu-latest
|
|
245
|
+
steps:
|
|
246
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
247
|
+
with:
|
|
248
|
+
fetch-depth: 0
|
|
249
|
+
persist-credentials: true
|
|
250
|
+
- name: Checkout target repository
|
|
251
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
252
|
+
with:
|
|
253
|
+
repository: arm/vgf-adapter-model-explorer
|
|
254
|
+
token: ${{ secrets.ARM_ORG_TOKEN }}
|
|
255
|
+
path: target-repo
|
|
256
|
+
persist-credentials: true
|
|
257
|
+
- name: Push commits to public repo
|
|
258
|
+
env:
|
|
259
|
+
SOURCE_URL: ${{ github.server_url }}/${{ github.repository }}
|
|
260
|
+
run: |
|
|
261
|
+
cd target-repo
|
|
262
|
+
git remote add source "$SOURCE_URL"
|
|
263
|
+
git fetch source main
|
|
264
|
+
git checkout main
|
|
265
|
+
git merge source/main
|
|
266
|
+
git push origin main
|
|
267
|
+
|
|
268
|
+
sync-release-tags-to-public-repo:
|
|
269
|
+
name: Sync release tags to public repo
|
|
270
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.repository_owner != 'arm'
|
|
271
|
+
runs-on: ubuntu-latest
|
|
272
|
+
steps:
|
|
273
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
274
|
+
with:
|
|
275
|
+
fetch-depth: 0
|
|
276
|
+
persist-credentials: true
|
|
277
|
+
- name: Checkout target repository
|
|
278
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
279
|
+
with:
|
|
280
|
+
repository: arm/vgf-adapter-model-explorer
|
|
281
|
+
token: ${{ secrets.ARM_ORG_TOKEN }}
|
|
282
|
+
path: target-repo
|
|
283
|
+
persist-credentials: true
|
|
284
|
+
- name: Push tags to public repo
|
|
285
|
+
env:
|
|
286
|
+
REF_NAME: ${{ github.ref_name }}
|
|
287
|
+
SOURCE_URL: ${{ github.server_url }}/${{ github.repository }}
|
|
288
|
+
run: |
|
|
289
|
+
cd target-repo
|
|
290
|
+
git remote add source "$SOURCE_URL"
|
|
291
|
+
git fetch source --tags
|
|
292
|
+
git push origin "refs/tags/$REF_NAME"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Codex PR Review
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened, edited]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
codex-review:
|
|
9
|
+
if: >-
|
|
10
|
+
${{ github.repository_owner != 'arm' &&
|
|
11
|
+
(github.event.action != 'edited' || github.event.changes.base != null) }}
|
|
12
|
+
uses: Arm-Debug/github-workflow-wizardry/.github/workflows/codex-pr-review.yaml@53cefff20e3f7fd5079e41a258ef812c9fcf3a45
|
|
13
|
+
with:
|
|
14
|
+
codex_proxy_url: ${{ vars.CODEX_PROXY_URL }}
|
|
15
|
+
secrets:
|
|
16
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|