-
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (80 loc) · 2.71 KB
/
Copy pathci.yml
File metadata and controls
98 lines (80 loc) · 2.71 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
# API parity against circuitpython-stubs: pure CPython, no compiler needed.
parity:
name: API Parity (CPython)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout beta stdlib
uses: actions/checkout@v4
with:
repository: PyMCU/PyMCU
path: PyMCU
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies (incl. circuitpython-stubs)
run: |
uv venv .venv
uv pip install --python .venv --group dev pytest -e PyMCU/lib -e .
- name: Run parity suite
run: .venv/bin/python -m pytest tests/parity -v --tb=short
# Build the beta source chain before publication and keep the existing
# corpus expectations and flash size gate in tests/corpus/sizes.json.
corpus:
name: Corpus (compiled programs)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout beta compiler, stdlib and SDK
uses: actions/checkout@v4
with:
repository: PyMCU/PyMCU
path: PyMCU
- name: Checkout AVR backend
uses: actions/checkout@v4
with:
repository: PyMCU/pymcu-avr
path: pymcu-avr
- name: Set up .NET 10
uses: actions/setup-dotnet@v4
with:
global-json-file: PyMCU/global.json
- name: Build compiler and AVR backend
run: |
dotnet publish PyMCU/src/compiler/PyMCU.csproj -c Release -o PyMCU/build/bin --nologo
dotnet publish pymcu-avr/src/csharp/cli/PyMCU.Backend.AVR.Cli.csproj -c Release -o pymcu-avr/build/bin --nologo
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install beta source packages and AVR toolchain
run: |
uv venv .venv
uv pip install --python .venv --no-sources pytest -e PyMCU/lib -e PyMCU/extensions/pymcu-sdk -e PyMCU -e pymcu-avr -e .
- name: Run corpus suite
env:
PYMCU_BIN: ${{ github.workspace }}/.venv/bin/pymcu
PYMCU_BACKEND_BINARY: avr=${{ github.workspace }}/pymcu-avr/build/bin/pymcuc-avr
run: .venv/bin/python -m pytest tests/corpus tests/test_corpus_driver.py -v --tb=short