forked from raspberrypi/userland
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (90 loc) · 2.69 KB
/
rpi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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