Skip to content

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

License

Notifications You must be signed in to change notification settings

samyarsadat/Pico-Build-Action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.