Skip to content

Commit 78d9374

Browse files
authored
Merge pull request #175 from inputlabs/github-actions-targets
GitHub actions targets
2 parents 5b5418c + 20cc832 commit 78d9374

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
path: deps/
3131
# Unique identifier by concatenation.
32-
key: pico-sdk_${{ env.SDK_TAG }}_${{ env.ARM_FILENAME_LINUX_X86_64 }}
32+
key: pico-sdk_${{ env.SDK_TAG }}_${{ env.ARM_FILENAME_LINUX_X86_64 }}_v4
3333

3434
- name: Dependencies from internet
3535
if: steps.cache-deps.outputs.cache-hit != 'true'
@@ -69,10 +69,12 @@ jobs:
6969
Commit:
7070
${GITHUB_SHA}
7171
72-
Checksum:
73-
\$ shasum <filename>
72+
Checksums:
73+
\$ shasum alpakka_pico_${VERSION}.uf2
7474
$(cat alpakka_pico_${VERSION}.uf2 | shasum | head -c 40)
75+
\$ shasum alpakka_marmota_${VERSION}.uf2
7576
$(cat alpakka_marmota_${VERSION}.uf2 | shasum | head -c 40)
77+
\$ shasum dongle_marmota_${VERSION}.uf2
7678
$(cat dongle_marmota_${VERSION}.uf2 | shasum | head -c 40)
7779
7880
Job:

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ cmake_minimum_required(VERSION 3.16)
55

66
if (EXISTS ./deps/pico-sdk AND EXISTS ./deps/arm-toolchain)
77
# If the dependencies are local.
8+
message("Using local dependencies")
89
set(PICO_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/pico-sdk)
910
set(PICO_SDK_EXTRAS ${CMAKE_CURRENT_SOURCE_DIR}/deps/pico-extras)
11+
set(picotool_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/picotool/build/bin/picotool)
1012
set(PICO_TOOLCHAIN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/arm-toolchain)
1113
include(${PICO_SDK_PATH}/pico_sdk_init.cmake)
1214
include(${PICO_SDK_EXTRAS}/external/pico_extras_import.cmake)
1315
else()
1416
# If the dependencies are global.
17+
message("Using global dependencies")
1518
include(scripts/pico_sdk_import.cmake)
1619
endif()
1720

scripts/install.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ SDK_TAG=2.1.0
99
EXTRAS_URL=https://github.com/raspberrypi/pico-extras.git
1010
EXTRAS_TAG=sdk-2.1.0
1111

12+
# Pico tool.
13+
PICOTOOL_URL=https://github.com/raspberrypi/picotool.git
14+
PICOTOOL_TAG=v2.1.0
15+
1216
# ESP serial flasher
1317
ESPSF_URL=https://github.com/espressif/esp-serial-flasher
1418
ESPSF_TAG=v1.6.2
@@ -77,5 +81,18 @@ git submodule update --init
7781
python3 ../../scripts/esp_flasher_patch.py
7882
cd ..
7983

84+
# Picotool (pico-sdk depends on it now).
85+
echo "Downloading Picotool..."
86+
git clone $PICOTOOL_URL
87+
cd picotool
88+
git checkout --quiet $PICOTOOL_TAG_TAG
89+
echo "Building Picotool..."
90+
export PICO_SDK_PATH=`pwd`/../pico-sdk
91+
mkdir build
92+
cd build
93+
cmake -DCMAKE_INSTALL_PREFIX=./bin -DPICOTOOL_FLAT_INSTALL=1 ..
94+
make install
95+
cd ../..
96+
8097
# Done.
8198
echo "Dependencies installed"

0 commit comments

Comments
 (0)