Use "mpp" from apt instead of building from source #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-arm64.tar.xz | |
# https://github.com/OpenIPC/sbc-groundstations/releases/download/zero3w-v1.7.0/radxaZero3wrev2.img.xz | |
host=https://cloud.debian.org/images/cloud/bullseye | |
release=latest | |
system=debian-11-generic-arm64.tar | |
wget -nv ${host}/${release}/${system}.xz | |
# unxz -T4 ${system}.xz | |
tar -xf ${system}.xz | |
output=output | |
mkdir $output | |
# device=$(sudo losetup -P --show -f ${system}) | |
# sudo mount ${device}p3 $output | |
device=$(sudo losetup -P --show -f disk.raw) | |
sudo mount ${device}p1 $output | |
cat > build.sh << EOL | |
#!/bin/bash | |
apt-get update | |
apt-get install -y cmake g++ git pkg-config librockchip-mpp-dev libcairo-dev libdrm-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev | |
cd /home | |
cmake -B build | |
cmake --build build -j4 | |
EOL | |
chmod 755 build.sh | |
sudo cp -r build.sh CMakeLists.txt src $output/home | |
sudo rm $output/etc/resolv.conf | |
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 |