Skip to content
package

GitHub Action

Pico Build Action

v1.2.1 Latest version

Pico Build Action

package

Pico Build Action

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

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Pico Build Action

uses: samyarsadat/Pico-Build-Action@v1.2.1

Learn more about this action in samyarsadat/Pico-Build-Action

Choose a version

Pico Build Action

banner banner

| |




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

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: samyarsadat@gigawhat.net

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.