Skip to content

Commit ea2116a

Browse files
authored
also build for sbc target (#119)
1 parent 21872fd commit ea2116a

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,71 @@ jobs:
9898
${{ matrix.debian_codename }}_pixelpilot-rk_*_arm64.deb
9999
${{ matrix.debian_codename }}_pixelpilot-rk-dbgsym_*_arm64.deb
100100
101+
build_sbc:
102+
name: Build for sbc-groundstations (${{ matrix.platform }})
103+
runs-on: ubuntu-latest
104+
strategy:
105+
fail-fast: false
106+
matrix:
107+
platform:
108+
- runcam_wifilink
109+
- emax_wyvern-link
110+
- openipc_bonnet
111+
- radxa_zero3
112+
steps:
113+
- name: Checkout PixelPilot_rk
114+
uses: actions/checkout@v4
115+
with:
116+
submodules: recursive
117+
path: PixelPilot_rk
118+
119+
- name: Checkout sbc-groundstations
120+
uses: actions/checkout@v4
121+
with:
122+
repository: OpenIPC/sbc-groundstations
123+
path: sbc-groundstations
124+
125+
- name: Install deps
126+
run: |
127+
sudo apt-get update
128+
sudo apt-get install -y cpio rsync bc qemu-user-static binfmt-support
129+
130+
- name: Prepare workspace
131+
run: |
132+
sudo mkdir -p /mnt/workspace
133+
sudo chown $USER:$USER /mnt/workspace
134+
rsync -a sbc-groundstations/ /mnt/workspace/
135+
echo "CACHE_DATE=$(date +%m)" >> $GITHUB_ENV
136+
137+
- name: Cache ccache
138+
uses: actions/cache@v5
139+
with:
140+
path: /tmp/ccache
141+
key: ${{ matrix.platform }}-ccache-${{ env.CACHE_DATE }}
142+
restore-keys: |
143+
${{ matrix.platform }}-ccache-
144+
145+
- name: Build
146+
working-directory: /mnt/workspace
147+
run: |
148+
set -x
149+
mkdir -p /tmp/ccache
150+
151+
export PIXELPILOT_OVERRIDE_SRCDIR=$GITHUB_WORKSPACE/PixelPilot_rk
152+
export BR2_CCACHE_DIR=/tmp/ccache
153+
DEFCONFIG=${{ matrix.platform }}_defconfig bash build.sh pixelpilot-rebuild
154+
155+
- name: Extract pixelpilot binary
156+
run: |
157+
cp /mnt/workspace/output/${{ matrix.platform }}_defconfig/target/usr/bin/pixelpilot \
158+
sbc_${{ matrix.platform }}_pixelpilot
159+
160+
- name: Upload binary
161+
uses: actions/upload-artifact@v4
162+
with:
163+
name: sbc-${{ matrix.platform }}-bin
164+
path: sbc_${{ matrix.platform }}_pixelpilot
165+
101166
test:
102167
name: Test (${{ matrix.debian_codename }})
103168
runs-on: ubuntu-latest
@@ -136,6 +201,7 @@ jobs:
136201
needs:
137202
- build
138203
- build_deb
204+
- build_sbc
139205
steps:
140206
- name: Checkout
141207
uses: actions/checkout@v4
@@ -157,6 +223,7 @@ jobs:
157223
bookworm_pixelpilot
158224
bookworm_pixelpilot-rk_*_arm64.deb
159225
bookworm_pixelpilot-rk-dbgsym_*_arm64.deb
226+
sbc_*_pixelpilot
160227
config_osd.json
161228
pixelpilot.yaml
162229
gsmenu.sh
@@ -173,6 +240,7 @@ jobs:
173240
bookworm_pixelpilot
174241
bookworm_pixelpilot-rk_*_arm64.deb
175242
bookworm_pixelpilot-rk-dbgsym_*_arm64.deb
243+
sbc_*_pixelpilot
176244
config_osd.json
177245
pixelpilot.yaml
178246
gsmenu.sh

0 commit comments

Comments
 (0)