https://github.com/samyarsadat/pico-build-action
GitHub Action for building Raspberry Pi Pico C/C++ code.
https://github.com/samyarsadat/pico-build-action
action ci cmake github-actions pico pico2 raspberry-pi raspberry-pi-pico
Last synced: 3 months ago
JSON representation
GitHub Action for building Raspberry Pi Pico C/C++ code.
- Host: GitHub
- URL: https://github.com/samyarsadat/pico-build-action
- Owner: samyarsadat
- License: gpl-3.0
- Created: 2024-06-13T17:49:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-30T18:51:15.000Z (3 months ago)
- Last Synced: 2025-04-11T22:11:58.317Z (3 months ago)
- Topics: action, ci, cmake, github-actions, pico, pico2, raspberry-pi, raspberry-pi-pico
- Language: Shell
- Homepage:
- Size: 364 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Pico Build Action


----
This is a GitHub Action for building Raspberry Pi Pico 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"` |
| `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: readsteps:
- 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-2025 Samyar Sadat Akhavi.