Skip to content

Commit 31444a7

Browse files
committed
Update github actions
1 parent 4310ade commit 31444a7

File tree

3 files changed

+67
-15
lines changed

3 files changed

+67
-15
lines changed

.github/workflows/build.yml

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
os: [ubuntu-latest, windows-latest, macos-14]
9+
os: [ubuntu-latest, windows-latest, macos-15]
1010
runs-on: ${{ matrix.os }}
1111
steps:
1212
- name: Checkout PicoRVD
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v6
1414
with:
1515
path: PicoRVD
1616

17-
- name: Checkout pico-sdk/1.5.1
18-
uses: actions/checkout@v3
17+
- name: Checkout pico-sdk/2.2.0
18+
uses: actions/checkout@v6
1919
with:
2020
repository: raspberrypi/pico-sdk
21-
ref: 1.5.1
21+
ref: 2.2.0
2222
path: pico-sdk
2323

2424
- name: Checkout pico-sdk submodules
@@ -29,21 +29,70 @@ jobs:
2929
if: ${{ matrix.os == 'windows-latest' }}
3030
working-directory: ${{github.workspace}}/PicoRVD
3131
run: choco install .github/workflows/choco_packages.config
32+
33+
- name: Download and setup libusb
34+
if: ${{ matrix.os == 'windows-latest' }}
35+
shell: bash
36+
run: |
37+
echo "Downloading libusb..."
38+
curl -L https://github.com/libusb/libusb/releases/download/v1.0.29/libusb-1.0.29.7z -o libusb.7z
39+
echo "Extracting libusb..."
40+
7z x libusb.7z -oC:/libusb -y
41+
echo "Checking libusb structure..."
42+
ls -la C:/libusb/
43+
ls -la C:/libusb/MinGW64/static/ || true
44+
ls -la C:/libusb/MinGW64/dll/ || true
45+
echo "Cloning picotool..."
46+
git clone https://github.com/raspberrypi/picotool.git --branch 2.2.0 --depth 1 C:/picotool-src
47+
48+
echo "Building picotool with libusb support..."
49+
mkdir -p C:/picotool-src/build
50+
cd C:/picotool-src/build
51+
52+
# Use the correct x86_64 MinGW64 paths (not ARM64!)
53+
cmake -G "Ninja" \
54+
-DCMAKE_BUILD_TYPE=Release \
55+
-DPICO_SDK_PATH="${{github.workspace}}/pico-sdk" \
56+
-DLIBUSB_LIBRARIES="C:/libusb/MinGW64/static/libusb-1.0.dll.a" \
57+
-DLIBUSB_INCLUDE_DIR="C:/libusb/include" \
58+
..
59+
60+
# Build
61+
ninja
62+
63+
# Verify picotool was built
64+
if [ ! -f "picotool.exe" ]; then
65+
echo "ERROR: picotool.exe was not built!"
66+
exit 1
67+
fi
68+
69+
# Create deployment directory
70+
mkdir -p C:/picotool-bin
71+
72+
# Copy picotool executable and required DLL (x86_64 version!)
73+
cp picotool.exe C:/picotool-bin/
74+
cp C:/libusb/MinGW64/dll/libusb-1.0.dll C:/picotool-bin/
75+
76+
# Add to PATH for subsequent steps
77+
echo "C:/picotool-bin" >> $GITHUB_PATH
78+
79+
echo "Testing binary"
80+
picotool.exe --version || true
3281
3382
- name: Install dependencies (Linux)
3483
if: ${{ matrix.os == 'ubuntu-latest' }}
3584
run: sudo apt-get update && sudo apt-get install -y build-essential git cmake gcc-arm-none-eabi gcc-riscv64-unknown-elf
3685

3786
- name: Install dependencies (Mac)
38-
if: ${{ matrix.os == 'macos-14' }}
87+
if: ${{ matrix.os == 'macos-15' }}
3988
run: |
40-
brew install cmake make
89+
brew install make
4190
brew install gcc-arm-embedded
4291
brew tap riscv-software-src/riscv
4392
brew install riscv-tools
4493
4594
- name: Build Project (CH32V003 Blinky)
46-
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' }}
95+
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-15' }}
4796
working-directory: ${{github.workspace}}/PicoRVD
4897
shell: bash
4998
run: |
@@ -57,15 +106,17 @@ jobs:
57106
run: |
58107
mkdir bin
59108
INCLUDE_BIN=ON
109+
PICOTOOL_OPTION=
60110
if [ "$RUNNER_OS" == "Windows" ]; then
61111
INCLUDE_BIN=OFF
112+
PICOTOOL_OPTION=-DPICOTOOL_FETCH_FROM_GIT_PATH =C:/picotool-bin/
62113
fi
63-
cmake -B bin -G "Unix Makefiles" -DPICO_SDK_PATH=../pico-sdk -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DINCLUDE_BLINKY_BINARY:BOOL=$INCLUDE_BIN -DCMAKE_BUILD_TYPE=Release -DPICO_BOARD=pico
114+
cmake -B bin -G "Unix Makefiles" -DPICO_SDK_PATH=../pico-sdk -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON $PICOTOOL_OPTION -DINCLUDE_BLINKY_BINARY:BOOL=$INCLUDE_BIN -DCMAKE_BUILD_TYPE=Release -DPICO_BOARD=pico
64115
make -j8 -C bin
65116
66117
- name: Upload UF2 File
67118
if: ${{ matrix.os == 'ubuntu-latest' }}
68-
uses: actions/upload-artifact@v3
119+
uses: actions/upload-artifact@v6
69120
with:
70121
name: PicoRVD.uf2
71122
path: ${{github.workspace}}/PicoRVD/bin/picorvd.uf2
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="gcc-arm-embedded" version="10.2.1" />
4-
<package id="cmake" version="3.25.2" installArguments="ADD_CMAKE_TO_PATH=System" />
5-
<package id="make" version="4.3" />
3+
<package id="gcc-arm-embedded" version="10.3.1" />
4+
<package id="cmake" version="4.2.3 " installArguments="ADD_CMAKE_TO_PATH=System" />
5+
<package id="make" version="4.4.1" />
66
<package id="xxd" version="1.11" />
7+
<package id="ninja" version="1.13.2" />
78
</packages>

pico_sdk_import.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ if (NOT PICO_SDK_PATH)
3434
FetchContent_Declare(
3535
pico_sdk
3636
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
37-
GIT_TAG 1.5.1
37+
GIT_TAG 2.2.0
3838
GIT_SUBMODULES_RECURSE FALSE
3939
)
4040
else ()
4141
FetchContent_Declare(
4242
pico_sdk
4343
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
44-
GIT_TAG 1.5.1
44+
GIT_TAG 2.2.0
4545
)
4646
endif ()
4747

0 commit comments

Comments
 (0)