Build using selfhosted runner #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build using selfhosted runner | |
on: | |
workflow_dispatch: | |
# Must match the project() name in CMakeLists.txt | |
env: | |
APP_NAME: picosmsPlus | |
# Allow this workflow to write back to the repository | |
permissions: | |
contents: write | |
jobs: | |
build-release: | |
runs-on: self-hosted | |
name: Build using self-hosted runner | |
steps: | |
#- name: Install dependencies | |
# run: | | |
# sudo apt update && \ | |
# sudo apt install -y git python3 && \ | |
# sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential libusb-1.0-0-dev | |
- name: Check out this repository with submodules | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Update line containing pico_set_program_version() in CMakelists.txt with tag name. | |
run: | | |
# Extract the tag name that triggered the event and remove the 'refs/tags/' prefix | |
input_string=${{ github.ref }} | |
prefix="refs/tags/" | |
tag="No versioninfo found" | |
if [[ $input_string == $prefix* ]]; then | |
echo "The string starts with 'refs/tags/'." | |
tag="${input_string#$prefix}" | |
echo "Tag is ${tag}" | |
sed -i "s/^[[:space:]]*pico_set_program_version(.*/pico_set_program_version(${{ env.APP_NAME }} \"$tag\")/" CMakeLists.txt | |
sed -i "s/VX.X/$tag/" menu.h | |
else | |
echo "The string does not start with 'refs/tags/'." | |
fi | |
grep "pico_set_program_version" CMakeLists.txt | |
grep SWVERSION menu.h | |
- name: build source tree | |
run: | | |
arm-none-eabi-gcc --version | |
id | |
pwd | |
export PICO_SDK_PATH="$HOME/pico-sdk" | |
echo "$PICO_SDK_PATH" | |
ls -l | |
echo "$PICO_SDK_PATH" | |
chmod +x build*.sh | |
./buildAll.sh | |
- name: Show release info using picotool | |
run: | | |
export PICO_SDK_PATH=$HOME/pico-sdk | |
$HOME/picotool/build/picotool info releases/${{ env.APP_NAME }}AdaFruitDVISD.uf2 | |
echo "-----------------------------" | |
$HOME/picotool/build/picotool info releases/${{ env.APP_NAME }}FeatherDVI.uf2 | |
echo "-----------------------------" | |
$HOME/picotool/build/picotool info releases/${{ env.APP_NAME }}PimoroniDV.uf2 | |
echo "-----------------------------" | |
$HOME/picotool/build/picotool info releases/${{ env.APP_NAME }}WsRP2040PiZero.uf2 |