Skip to content

get-all-frozen

get-all-frozen #910

########################################################################################################################################
# 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 }}"