fix comp #84
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 RPI | |
on: | |
push: | |
branches: | |
- "2.5-evo" | |
- "dev-release" | |
- "release" | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 512 | |
swap-size-mb: 1024 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
overprovision-lvm: 'true' | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: pguyot/arm-runner-action@98b8d5a3228f504a8bd54913ab1e23d70f369c6e | |
id: build_image | |
with: | |
base_image: raspios_lite:2023-05-03 | |
image_additional_mb: 4000 | |
copy_repository_path: /opt | |
copy_artifact_path: userland | |
import_github_env: true | |
commands: | | |
ls -a | |
cd /opt | |
cd userland | |
sudo apt update | |
bash install_dep.sh | |
mkdir build | |
cd build | |
cmake .. | |
make -j4 | |
sudo make install | |
cd .. | |
rm -Rf /opt/vc/src | |
rm -Rf /opt/vc/man | |
rm -Rf /opt/vc/include | |
mkdir -p /opt/vc/usr/local/bin/ | |
mkdir -p /opt/vc/etc/systemd/system | |
cp -r /opt/vc/bin/fpv_video0.bin /opt/vc/usr/local/bin/ | |
rm -Rf /opt/vc/bin | |
mkdir -p /opt/vc/lib2/arm-linux-gnueabihf | |
cp -r /opt/vc/lib/libopenmaxil.so /opt/vc/lib2/arm-linux-gnueabihf | |
rm -Rf /opt/vc/lib | |
mv /opt/vc/lib2/ /opt/vc/lib/ | |
fpm -a armhf -s dir -t deb -n openhd-userland -v 2.5-evo-$(date '+%m%d%H%M') -C /opt/vc -p openhd-userland.deb --after-install after-install.sh | |
ls -a | |
- name: Upload to Github | |
uses: 'actions/upload-artifact@v2' | |
with: | |
name: "userland" | |
path: | | |
userland/*.deb | |
if-no-files-found: error | |
- name: Push | |
id: push | |
uses: cloudsmith-io/action@master | |
with: | |
api-key: ${{ secrets.CLOUDSMITH_API_KEY }} | |
command: "push" | |
format: "deb" | |
owner: "openhd" | |
repo: ${{ github.ref_name }} | |
distro: "raspbian" | |
release: "bullseye" | |
republish: "true" # needed ONLY if version is not changing | |
file: "userland/*.deb" | |
#- name: Install | |
# run: | | |
# cd OpenHD/build | |
# sudo cmake --install . | |
#- name: Build ninja | |
# run: | | |
# sudo apt -y install ninja-build | |
# cd OpenHD | |
# ./build_cmake.sh |