Skip to content

Commit e27b03c

Browse files
committed
add job to compile go tool
1 parent 9761a6b commit e27b03c

File tree

1 file changed

+59
-9
lines changed

1 file changed

+59
-9
lines changed

.github/workflows/release.yml

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,23 @@ jobs:
6262
repository: raspberrypi/pico-sdk
6363
path: pico-sdk
6464

65-
- name: set env vars
65+
- name: Set env vars
6666
run: |
6767
echo "LIBUSBUDEV=/opt/lib/${{ matrix.cross_compile }}/libusbudev.a" >> $GITHUB_ENV
6868
echo "PICO_SDK_PATH=${GITHUB_WORKSPACE}/pico-sdk" >> $GITHUB_ENV
6969
if: matrix.os != 'darwin'
7070

71-
- name: set env vars for macos
71+
- name: Set env vars for macos
7272
run: |
7373
echo "LIBUSBUDEV=$LIBUSB_DIR.libs/libusb-1.0.a" >> $GITHUB_ENV
7474
echo "PICO_SDK_PATH=${GITHUB_WORKSPACE}/pico-sdk" >> $GITHUB_ENV
7575
if: matrix.os == 'darwin'
7676

77-
- name: set env var for win
77+
- name: Set env var for win
7878
run: echo "CFLAGS="-mno-ms-bitfields $CFLAGS"" >> $GITHUB_ENV
7979
if: matrix.os == 'windows'
8080

81-
- name: build picotool
81+
- name: Build picotool
8282
run: |
8383
cd $GITHUB_WORKSPACE/picotool
8484
git apply $GITHUB_WORKSPACE/rp2040tools/patches/picotool_cmakelists.patch
@@ -90,7 +90,7 @@ jobs:
9090
mv picotool${{ matrix.extension }} /tmp/
9191
if: matrix.os != 'darwin'
9292

93-
- name: build picotool for macos
93+
- name: Build picotool for macos
9494
run: |
9595
cd $GITHUB_WORKSPACE/picotool
9696
mkdir build
@@ -100,7 +100,7 @@ jobs:
100100
mv picotool${{ matrix.extension }} /tmp/
101101
if: matrix.os == 'darwin'
102102

103-
- name: build elf2uf2
103+
- name: Build elf2uf2
104104
run: |
105105
cd $GITHUB_WORKSPACE/pico-sdk/tools/elf2uf2/
106106
git apply $GITHUB_WORKSPACE/rp2040tools/patches/elf2uf2_cmakelists.patch
@@ -111,7 +111,7 @@ jobs:
111111
mv elf2uf2${{ matrix.extension }} /tmp/
112112
if: matrix.os != 'darwin'
113113

114-
- name: build elf2uf2 for macos
114+
- name: Build elf2uf2 for macos
115115
run: |
116116
cd $GITHUB_WORKSPACE/pico-sdk/tools/elf2uf2/
117117
mkdir build
@@ -121,10 +121,60 @@ jobs:
121121
mv elf2uf2${{ matrix.extension }} /tmp/
122122
if: matrix.os == 'darwin'
123123

124-
- name: upload artifacts
124+
- name: Upload artifacts
125125
uses: actions/upload-artifact@v2
126126
with:
127-
name: ${{matrix.os}}_${{matrix.arch}}
127+
name: tools_${{matrix.os}}_${{matrix.arch}}
128128
path: |
129129
/tmp/elf2uf2${{ matrix.extension }}
130130
/tmp/picotool${{ matrix.extension }}
131+
132+
build-go:
133+
runs-on:
134+
ubuntu-latest
135+
strategy:
136+
matrix:
137+
os: [linux, darwin, windows]
138+
arch: [amd64]
139+
include:
140+
- os: linux
141+
- os: linux
142+
arch: 386
143+
- os: linux
144+
arch: arm
145+
- os: linux
146+
arch: arm64
147+
- os: darwin
148+
- os: windows
149+
arch: 386
150+
extension: .exe
151+
exclude:
152+
- os: windows
153+
arch: amd64
154+
steps:
155+
- name: Checkout rp2040tools repository
156+
uses: actions/checkout@v2
157+
with:
158+
repository: arduino/rp2040tools
159+
token: ${{ secrets.RP2040_CI_PAT }}
160+
161+
- name: Install Go
162+
uses: actions/setup-go@v2
163+
with:
164+
go-version: "1.15.8"
165+
166+
- name: Build rp2040load
167+
run: go build
168+
env:
169+
GOOS: ${{ matrix.os }}
170+
GOARCH: ${{ matrix.arch }}
171+
CGO_ENABLED: 0
172+
173+
- name: Debug print
174+
run: file rp2040load${{ matrix.extension }}
175+
176+
- name: Upload artifacts
177+
uses: actions/upload-artifact@v2
178+
with:
179+
name: rp2040load_${{matrix.os}}_${{matrix.arch}}
180+
path: rp2040load${{ matrix.extension }}

0 commit comments

Comments
 (0)