Skip to content

CI: Try run tests on Unix with user C modules #405

CI: Try run tests on Unix with user C modules

CI: Try run tests on Unix with user C modules #405

Workflow file for this run

name: Build modules
on: [push, pull_request]
jobs:
test:
permissions:
contents: write
runs-on: ubuntu-24.04
env:
MPY_DIR: ./micropython
MICROPYTHON_BIN: ./micropython/ports/unix/build-nomodules/micropython
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install OS dependencies
run: sudo add-apt-repository universe
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
repository: jonnor/micropython
path: micropython
ref: v1.25preview-linking
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Setup MicroPython X86
working-directory: micropython
run: |
source tools/ci.sh && ci_unix_32bit_setup && ci_unix_standard_build
cp -r ./ports/unix/build-standard/ ./ports/unix/build-nomodules/
- name: Build custom firmware with user modules, and tests. Unix/x64
run: make check_unix V=1
- name: Build .mpy modules and run tests Unix/x64
run: make check ARCH=x64 V=1
- name: Setup MicroPython ARM
working-directory: micropython
run: source tools/ci.sh && ci_rp2_setup
- name: Build module armv6m
run: echo make dist ARCH=armv6m V=1
- name: Build module armv7m
run: make dist ARCH=armv7m V=1
- name: Build module armv7emsp
run: make dist ARCH=armv7emsp V=1
- name: Setup MicroPython ESP32
working-directory: micropython
run: source tools/ci.sh && ci_esp32_idf_setup
- name: Build module xtensawin
run: source micropython/esp-idf/export.sh && pip install -r requirements.txt && make dist ARCH=xtensawin V=1
- name: Archive dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- name: Prepare release
run: make release
- name: Archive release artifacts
uses: actions/upload-artifact@v4
with:
name: release
path: emlearn-micropython-*.zip
- name: Deploy to Github Pages
if: "github.ref_name == 'master' || github.ref_type == 'tag'"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
keep_files: true
destination_dir: builds/${{ github.ref_name }}
docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install -yqq libsndfile1 libsndfile1-dev doxygen
- name: Install Python dependencies
run: |
python -m pip install -U 'pip<20'
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements.dev.txt ]; then pip install -r requirements.dev.txt; fi
- name: Build documentation using Sphinx
working-directory: ./docs
env:
PYTHONPATH: ../:../build/lib.linux-x86_64-cpython-310
READTHEDOCS: 'True'
run: |
make html