-
Notifications
You must be signed in to change notification settings - Fork 23
134 lines (110 loc) · 4.33 KB
/
get-all-frozen.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
########################################################################################################################################
# This will attempt to retrieve and generate stubs from all known versions of MicroPython
########################################################################################################################################
# Check out repos in this structure
# micropython-stubs
# +-- stubs
# +-- repos
# +-- micropython
# -- micropython-lib
# repro structure needed to allow automatic PR creation to work
########################################################################################################################################
name: get-all-frozen
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * *" # Run everyday at 01:00
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
########################################################################################################################################
list-versions-fr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- run: pip install pygithub packaging
- run: python .github/workflows/list_versions.py --latest
id: dynamic
outputs:
job_versions: ${{ steps.dynamic.outputs.versions }}
########################################################################################################################################
get-micropython-frozen:
# The type of runner that the job will run on
needs: list-versions-fr
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix: ${{ fromJSON(needs.list-versions-fr.outputs.job_versions) }}
max-parallel: 1
# Most scripts will be run from the stubber, set that as default
defaults:
run:
shell: bash
# working-directory: ${{github.workspace}}/micropython-stubber
steps:
- name: Checkout stubs repo
uses: actions/checkout@v3
# make Python work
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Python dependencies (stubber)
run: |
pip install --upgrade wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# checkout micropython at the correct version tag
- name: clone and switch to micropython ${{ matrix.version }}
run: |
stubber clone
stubber switch ${{ matrix.version }}
######################################
# This is where the actual work starts
######################################
- name: Get frozen modules for ${{ matrix.version }}
working-directory: ${{github.workspace}}
run: |
stubber get-frozen --black
- name: commit
uses: ./.github/actions/commit
with:
message: "Update frozen stubs for ${{ matrix.version }}"
# ########################################################################################################################################
# get-core-cpython-stubs:
# # The type of runner that the job will run on
# runs-on: ubuntu-latest
# # Most scripts will be run from the stubber, set that as default
# defaults:
# run:
# shell: bash
# # working-directory: ${{github.workspace}}/micropython-stubber
# steps:
# - name: Checkout stubs repo
# uses: actions/checkout@v3
# # make Python work
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
# cache: "pip"
# - name: Install Python dependencies (stubber)
# run: |
# pip install --upgrade wheel
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# ######################################
# # This is where the actual work starts
# ######################################
# - name: Get frozen modules for ${{ matrix.version }}
# working-directory: ${{github.workspace}}
# run: |
# stubber get-core --black
# - name: commit
# uses: ./.github/actions/commit
# with:
# message: "Update core stubs for ${{ matrix.version }}"