-
Notifications
You must be signed in to change notification settings - Fork 22
99 lines (83 loc) · 2.83 KB
/
createstubs.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
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
name: Create MCU stubs
on:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"
push:
# branches:
# - main
paths:
- .github/workflows/createstubs.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
########################################################################################################################################
list-versions-cs:
# 'Get a matrix for the latest versions of micropython'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/get-mpversions
id: dynamic
outputs:
versions: ${{ steps.dynamic.outputs.versions }}
########################################################################################################################################
createstubs:
needs: list-versions-cs
runs-on: [self-hosted, mpremote, X64]
env:
ARCH: X64
# ARCH: ARM64
strategy:
max-parallel: 1 # only one version at a time
fail-fast: false # keep on trying each version even if one fails
matrix: ${{ fromJSON(needs.list-versions-cs.outputs.versions) }}
steps:
- name: Checkout stubs repo
uses: actions/checkout@v4
- name: Set up Python (most platforms)
if: ${{ env.ARCH != 'ARM64' }}
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up Python (Linux-ARM64)
if: ${{ env.ARCH == 'ARM64' }}
uses: deadsnakes/action@v2.1.1
with:
python-version: "3.11"
- name: Install dependencies
run: |
pipx install poetry
pip install -U -r requirements.txt
- name: Patch mpremote/mip.py
continue-on-error: true
run: |
MODULE_LOCATION=$(pip show -f mpremote | grep Location | cut -d' ' -f2)
patch --forward $MODULE_LOCATION/mpremote/mip.py ./mpremote_mip.patch || true
- name: Get ${{ matrix.version }} firmwares for flashing
run: |
mpflash download --version ${{ matrix.version }}
- name: Update firmware to ${{ matrix.version }} on all connected boards
run: |
mpflash flash --version ${{ matrix.version }}
- name: clone Repos
run: |
stubber clone
- name: Get/update docstubs
run: |
stubber switch ${{ matrix.version }}
stubber get-docstubs
- name: Run board stubber
run: |
stubber get-mcu-stubs
- name: commit
continue-on-error: true
uses: ./.github/actions/commit
with:
message: "Update boardstubs for ${{ matrix.version }}"
- name: Build App
if: always()
run: echo "Done."