Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/samyarsadat/pico-build-action

GitHub Action for building Raspberry Pi Pico (RP2040) C/C++ code.
https://github.com/samyarsadat/pico-build-action

action ci cmake github-actions pico raspberry-pi raspberry-pi-pico

Last synced: 3 months ago
JSON representation

GitHub Action for building Raspberry Pi Pico (RP2040) C/C++ code.

Awesome Lists containing this project

README

        

Pico Build Action

![banner](.github/images/logo_dark.png#gh-dark-mode-only)
![banner](.github/images/logo_light.png#gh-light-mode-only)



|

|



----
This is a GitHub Action for building Raspberry Pi Pico (RP2040) C/C++ code.

This is a Docker container action.


## Inputs
| Name | Description | Required | Default |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------- |
| `source_dir` | _Source code directory. The `CMakeLists.txt` file should be here._ | Yes | `"src"` |
| `output_dir` | _Output directory for build artifacts. This path is relative to the source directory._ | No | `"build"` |
| `output_ext` | _A space-separated list of output binary file extensions. There must be a '*' before each extension._ | No | `"*.uf2 *.elf *.elf.map"` |
| `board_name` | _Name of the RP2040 board. Please refer to the Pico SDK documentation for a list of supported boards._ | No | `"pico"` |
| `cmake_args` | _Additional arguments to pass to CMake._ | No | `""` |
| `output_ignored_dirs` | _A space-separated list of directories to ignore when copying binary build artifacts. `CMakeFiles`, `pico-sdk`, `pioasm`, and `elf2uf2` are ignored regardless._ | No | `""` |
| `cmake_config_only` | _Only configure CMake and generate build files. Do not build the project._ | No | `"false"` |
| `makefiles_generator` | _CMake generator to use for generating build files._ | No | `"Unix Makefiles"` |

## Outputs
| Name | Description |
| ----------------- | ------------------------------------------------------------- |
| `output_dir` | _Relative path to output directory for build artifacts._ |

## Example usage
```YAML
jobs:
test_build:
name: Build example blink program
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build Blink Example
id: build
uses: samyarsadat/Pico-Build-Action@v1
with:
source_dir: "test_program"
cmake_args: "-DCMAKE_BUILD_TYPE=Debug"

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: workspace_artifacts
path: ${{steps.build.outputs.output_dir}}
```


## Contact
You can contact me via e-mail.

E-mail: [email protected]



If you think that you have found a bug or issue please report it here.


## Contributing
Please take a look at CONTRIBUTING.md for contributing.


## Credits
| Role | Name |
|----------------|------------------------------------------------------------------|
| Lead Developer | Samyar Sadat Akhavi |



Copyright © 2024 Samyar Sadat Akhavi.