-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
executable file
·75 lines (70 loc) · 2.87 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Pico Build Action - Action Metadata.
# Copyright 2024 Samyar Sadat Akhavi
# Written by Samyar Sadat Akhavi, 2024.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https: www.gnu.org/licenses/>.
name: "Pico Build Action"
description: "Action for building Raspberry Pi Pico (RP2040) C/C++ code."
author: "Samyar Sadat Akhavi <samyarsadat@gigawhat.net>"
branding:
color: "red"
icon: "package"
inputs:
source_dir:
description: "Source code directory. The CMakeLists.txt file should be here."
required: true
default: "src"
output_dir:
description: "Output directory for build artifacts. This path is relative to the source directory."
required: false
default: "build"
output_ext:
description: "A space-separated list of output binary file extensions. Default is '*.uf2 *.elf *.elf.map'. There must be a '*' before each extension."
required: false
default: "*.uf2 *.elf *.elf.map"
board_name:
description: "Name of the RP2040 board. Default is 'pico'. Please refer to the Pico SDK documentation for a list of supported boards."
required: false
default: "pico"
cmake_args:
description: "Additional arguments to pass to CMake."
required: false
default: ""
output_ignored_dirs:
description: "A space-separated list of directories to ignore when copying binary build artifacts. CMakeFiles, pico-sdk, pioasm, and elf2uf2 are ignored regardless."
required: false
default: ""
cmake_config_only:
description: "Only configure CMake and generate build files. Do not build the project."
required: false
default: "false"
makefiles_generator:
description: "CMake generator to use for generating build files. Default is 'Unix Makefiles'."
required: false
default: "Unix Makefiles"
outputs:
output_dir:
description: "Relative path to output directory for build artifacts."
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.source_dir }}
- ${{ inputs.output_dir }}
- ${{ inputs.output_ext }}
- ${{ inputs.board_name }}
- ${{ inputs.cmake_args }}
- ${{ inputs.output_ignored_dirs }}
- ${{ inputs.cmake_config_only }}
- ${{ inputs.makefiles_generator }}