Skip to content

move to latest radxa zero 3w image #9

move to latest radxa zero 3w image

move to latest radxa zero 3w image #9

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
tag=zero3w-v1.7.0
system=radxaZero3wrev2.img
wget -nv https://github.com/OpenIPC/sbc-groundstations/releases/download/${tag}/${system}.xz
unxz -T4 ${system}.xz
output=output
mkdir $output
device=$(sudo losetup -P --show -f ${system})
sudo mount ${device}p3 $output
cat > build.sh << EOL
#!/bin/bash
apt-get update
apt-get install -y cmake g++ git pkg-config libcairo-dev libdrm-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
cd /home
git clone https://github.com/rockchip-linux/mpp --depth 1
cd mpp
cmake -B build
cmake --build build --target install -j4
cd ..
cmake -B build
cmake --build build -j4
EOL
chmod 755 build.sh
sudo cp -r build.sh CMakeLists.txt src $output/home
echo nameserver 1.1.1.1 | sudo tee -a $output/etc/resolv.conf
sudo chroot $output /home/build.sh
sudo cp $output/home/build/pixelpilot .
- name: Upload
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
with:
tag_name: latest
files: pixelpilot