Skip to content

CI: Fix linting.

CI: Fix linting. #21

Workflow file for this run

name: MicroPython
on:
push:
pull_request:
release:
types: [created]
jobs:
build:
name: MicroPython ${{ matrix.name }}
runs-on: ubuntu-24.04
continue-on-error: true
strategy:
matrix:
include:
- name: pico_w_galactic
- name: pico_w_cosmic
- name: pico_w_stellar
- name: pico2_w_galactic
env:
# MicroPython version will be contained in github.event.release.tag_name for releases
RELEASE_FILE: ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython
CI_PROJECT_ROOT: ${{ github.workspace }}/src-${{ github.sha }}
CI_BUILD_ROOT: ${{ github.workspace }}
steps:
- name: Compiler Cache Fixup
run: |
mkdir -p /home/runner/.ccache
- name: "CCache: Restore saved cache"
uses: actions/cache@v4
with:
path: /home/runner/.ccache
key: ccache-micropython-${{ matrix.name }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-micropython-${{ matrix.name }}-${{ github.ref }}
ccache-micropython-${{ matrix.name }}-
- name: "Checkout Project"
uses: actions/checkout@v4
with:
submodules: true
path: ${{ env.CI_PROJECT_ROOT }}
- name: "Install Arm GNU Toolchain (arm-none-eabi-gcc)"
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '13.3.Rel1'
- name: "Prepare tools & dependencies"
shell: bash
run: |
source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug
mkdir -p $CI_BUILD_ROOT
ci_apt_install_build_deps
ci_prepare_all
- name: "MicroPython: Configure"
shell: bash
run: |
source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug
micropython_version
ci_cmake_configure ${{ matrix.name }}
- name: "MicroPython: Build"
shell: bash
run: |
source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug
python3 -m venv "$CI_BUILD_ROOT/.dir2uf2"
source "$CI_BUILD_ROOT/.dir2uf2/bin/activate"
ci_cmake_build ${{ matrix.name }}
mv "$CI_BUILD_ROOT/${{ matrix.name }}.uf2" "$CI_BUILD_ROOT/$RELEASE_FILE.uf2"
mv "$CI_BUILD_ROOT/${{ matrix.name }}-with-filesystem.uf2" "$CI_BUILD_ROOT/$RELEASE_FILE-with-filesystem.uf2"
- name: "Artifacts: Upload .uf2"
uses: actions/upload-artifact@v4
with:
name: ${{ env.RELEASE_FILE }}.uf2
path: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}.uf2
- name: "Artifacts: Upload .uf2 (With Filesystem)"
uses: actions/upload-artifact@v4
with:
name: ${{ env.RELEASE_FILE }}-with-filesystem.uf2
path: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}-with-filesystem.uf2
- name: "Release: Upload .uf2"
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}.uf2
- name: "Release: Upload .uf2 (With Filesystem)"
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}-with-filesystem.uf2