Repository navigation
67 lines (55 loc) · 1.77 KB
/
Copy pathtest-python-environment.yml
File metadata and controls
67 lines (55 loc) · 1.77 KB
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
# Copyright 2026 Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
name: Test Python environment
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
venv-cross-platform:
name: Python environment (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Create model-export environment
if: runner.os != 'Windows'
run: ./setup_venv.sh
- name: Create model-export environment
if: runner.os == 'Windows'
run: .\setup_venv.bat
- name: Check model-export environment
shell: bash
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
PY=.venv/Scripts/python.exe
else
PY=.venv/bin/python
fi
"${PY}" -c "import executorch.backends.arm.quantizer.quantization_annotator; print('arm quantizer OK')"
"${PY}" -c "import create_ai_layer; print('create_ai_layer.py OK')"
- name: Check resolved package versions
shell: bash
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
PY=.venv/Scripts/python.exe
else
PY=.venv/bin/python
fi
"${PY}" -m pip list | grep -iE "torch|executorch|vela|tosa|flatbuffers"
"${PY}" -m pip show flatbuffers | grep "Version: 24.3.25" \
|| { echo "::error::flatbuffers pin regressed"; exit 1; }