Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianpugh/install-micropython
Github Action to install micropython.
https://github.com/brianpugh/install-micropython
action ci micropython mpy-cross
Last synced: 8 days ago
JSON representation
Github Action to install micropython.
- Host: GitHub
- URL: https://github.com/brianpugh/install-micropython
- Owner: BrianPugh
- License: apache-2.0
- Created: 2023-06-02T00:32:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-02T12:49:17.000Z (13 days ago)
- Last Synced: 2024-11-07T08:03:25.786Z (8 days ago)
- Topics: action, ci, micropython, mpy-cross
- Language: JavaScript
- Homepage:
- Size: 600 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# install-micropython
[![Basic validation](https://github.com/BrianPugh/install-micropython/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/BrianPugh/install-micropython/actions/workflows/test.yaml)
This action provides the following functionality for GitHub Actions users:
* Builds and installs the following executables:
* `micropython` - The micropython runtime. Can be used to run unit tests in conjunction with libraries such as micropython's [`unittest`](https://github.com/micropython/micropython-lib/tree/master/python-stdlib/unittest).
* `mpy-cross` - The micropython cross-compiler. Used to cross-compile precompiled bytecode for specific microcontroller architectures.
* Provides a clone of the micropython repository and sets the environment variable `MPY_DIR` to it's path.
* Can be used as for artifact building, like [using native machine code in mpy files](https://docs.micropython.org/en/latest/develop/natmod.html#natmod).
* Builds are automatically cached, speeding up subsequent runs.## Basic Usage
Simply add the following step to your workflow:```yaml
steps:
- name: Install MicroPython
uses: BrianPugh/install-micropython@v2
```## Configuration
The `install-micropython` action can be configured by setting values under the `with:` key.
For example:```yaml
steps:
- uses: BrianPugh/install-micropython@v2
with:
reference: v1.20.0
```Input configuration arguments are described as follows.
#### repository
The micropython git url to clone from. Defaults to the official micropython repository.```yaml
with:
repository: https://github.com/micropython/micropython
```#### reference
A git reference (tag, commit, or branch) of the micropython repository to use.```yaml
with:
reference: v1.20.0
```#### cflags
When compiling micropython binaries, this value gets passed along to environment variable `CFLAGS_EXTRA`.
This can be used to enable/disable certain micropython features.```yaml
with:
cflags: '-DMICROPY_PY_RE_MATCH_GROUPS=1'
```