Skip to content

Commit d174f0e

Browse files
committed
Updated README, removed board_name input, and added scripts for updating major version tags.
1 parent 40c41d3 commit d174f0e

File tree

6 files changed

+32
-20
lines changed

6 files changed

+32
-20
lines changed

.github/scripts/update_major_tag.bash

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Tag creation function
2+
create_tag() {
3+
local name=$1
4+
local msg_file_path="./$name-msg.txt"
5+
6+
if [ ! -f "$msg_file_path" ]; then
7+
echo "ERROR: The tag message file $msg_file_path does not exist."
8+
exit 1
9+
fi
10+
11+
git tag -fsa $name -F $msg_file_path
12+
}
13+
14+
printf "Updating v1 version tag...\n"
15+
git push origin :refs/tags/v1
16+
create_tag v1
17+
18+
printf "\nDone, pushing new tag...\n"
19+
git push origin --tags

.github/scripts/v1-msg.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated v1 tag to latest commit.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<br><br>
1515

1616
----
17-
This is a GitHub Action for building Raspberry Pi Pico (RP2040) C/C++ code.<br>
17+
This is a GitHub Action for building Raspberry Pi Pico C/C++ code.<br>
1818
This is a Docker container action.
1919
<br><br>
2020

@@ -25,7 +25,6 @@ This is a Docker container action.
2525
| `source_dir` | _Source code directory. The `CMakeLists.txt` file should be here._ | Yes | `"src"` |
2626
| `output_dir` | _Output directory for build artifacts. This path is relative to the source directory._ | No | `"build"` |
2727
| `output_ext` | _A space-separated list of output binary file extensions. There must be a '*' before each extension._ | No | `"*.uf2 *.elf *.elf.map"` |
28-
| `board_name` | _Name of the RP2040 board. Please refer to the Pico SDK documentation for a list of supported boards._ | No | `"pico"` |
2928
| `cmake_args` | _Additional arguments to pass to CMake._ | No | `""` |
3029
| `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 | `""` |
3130
| `cmake_config_only` | _Only configure CMake and generate build files. Do not build the project._ | No | `"false"` |
@@ -88,4 +87,4 @@ Please take a look at <a href='https://github.com/samyarsadat/Pico-Build-Action/
8887
<br><br>
8988
9089
91-
Copyright © 2024 Samyar Sadat Akhavi.
90+
Copyright © 2024-2025 Samyar Sadat Akhavi.

action.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# along with this program. If not, see <https: www.gnu.org/licenses/>.
1717

1818
name: "Pico Build Action"
19-
description: "Action for building Raspberry Pi Pico (RP2040) C/C++ code."
19+
description: "Action for building Raspberry Pi Pico C/C++ code."
2020
author: "Samyar Sadat Akhavi <samyarsadat@gigawhat.net>"
2121

2222
branding:
@@ -36,10 +36,6 @@ inputs:
3636
description: "A space-separated list of output binary file extensions. Default is '*.uf2 *.elf *.elf.map'. There must be a '*' before each extension."
3737
required: false
3838
default: "*.uf2 *.elf *.elf.map"
39-
board_name:
40-
description: "Name of the RP2040 board. Default is 'pico'. Please refer to the Pico SDK documentation for a list of supported boards."
41-
required: false
42-
default: "pico"
4339
cmake_args:
4440
description: "Additional arguments to pass to CMake."
4541
required: false
@@ -68,7 +64,6 @@ runs:
6864
- ${{ inputs.source_dir }}
6965
- ${{ inputs.output_dir }}
7066
- ${{ inputs.output_ext }}
71-
- ${{ inputs.board_name }}
7267
- ${{ inputs.cmake_args }}
7368
- ${{ inputs.output_ignored_dirs }}
7469
- ${{ inputs.cmake_config_only }}

entrypoint.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ DEFAULT_IGNORED_BUILD_DIRS=("CMakeFiles" "elf2uf2" "pico-sdk" "pioasm")
2525
SOURCE_DIR="$1"
2626
OUTPUT_DIR="$2"
2727
OUTPUT_EXT="$3"
28-
BOARD_NAME="$4"
29-
CMAKE_ARGS=$5
30-
OUTPUT_IGNORED_DIRS="$6"
31-
CMAKE_CONFIG_ONLY="$7"
32-
MAKEFILES_GENERATOR="$8"
28+
CMAKE_ARGS=$4
29+
OUTPUT_IGNORED_DIRS="$5"
30+
CMAKE_CONFIG_ONLY="$6"
31+
MAKEFILES_GENERATOR="$7"
3332

3433
# Split output extensions and into array
3534
IFS=" " read -r -a BINARY_EXTENSIONS <<< "$OUTPUT_EXT"
@@ -49,10 +48,6 @@ if [ -z "$OUTPUT_DIR" ]; then
4948
exit 1
5049
fi
5150

52-
if [ -z "$BOARD_NAME" ]; then
53-
BOARD_NAME="pico"
54-
fi
55-
5651
if [ -z "$MAKEFILES_GENERATOR" ]; then
5752
MAKEFILES_GENERATOR="Ninja"
5853
fi
@@ -77,7 +72,6 @@ echo "Configuration:"
7772
echo "SOURCE_DIR=$SOURCE_DIR"
7873
echo "OUTPUT_DIR=$OUTPUT_DIR"
7974
echo "BINARY_EXTENSIONS=${BINARY_EXTENSIONS[@]}"
80-
echo "BOARD_NAME=$BOARD_NAME"
8175
echo "CMAKE_ARGS=$CMAKE_ARGS"
8276
echo "IGNORED_BUILD_DIRS=${IGNORED_BUILD_DIRS[@]}"
8377
echo "CMAKE_CONFIG_ONLY=$CMAKE_CONFIG_ONLY"
@@ -86,7 +80,7 @@ echo "MAKEFILES_GENERATOR=$MAKEFILES_GENERATOR"
8680
# Build the project
8781
echo "Generating build files..."
8882
mkdir "$OUTPUT_DIR" && cd "$OUTPUT_DIR"
89-
cmake -DPICO_BOARD="$BOARD_NAME" -S "$SOURCE_DIR" -B "$OUTPUT_DIR" -G "$MAKEFILES_GENERATOR" $CMAKE_ARGS
83+
cmake -S "$SOURCE_DIR" -B "$OUTPUT_DIR" -G "$MAKEFILES_GENERATOR" $CMAKE_ARGS
9084

9185
if [ "$CMAKE_CONFIG_ONLY" = "false" ]; then
9286
echo "Building project..."

test_program/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ project(Blink VERSION 0.1.0 LANGUAGES C CXX ASM)
2727
set(CMAKE_C_STANDARD 11)
2828
set(CMAKE_CXX_STANDARD 17)
2929

30+
# Set Pico Board and Pico Platform
31+
set(PICO_PLATFORM rp2350-arm-s)
32+
set(PICO_BOARD pico2)
33+
3034
# Initialize the Pico SDK
3135
pico_sdk_init()
3236

0 commit comments

Comments
 (0)