forked from Seeed-Studio/reCamera-OS
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (75 loc) · 3.34 KB
/
main.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
name: Build and Create Release on Tag
on:
push:
jobs:
build-and-release:
runs-on: ubuntu-22.04
strategy:
matrix:
target:
- sg2002_recamera_emmc
#- sg2002_recamera_sd
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 1
- name: Install dependencies
run: |
sudo apt update
sudo apt-get remove aria2 ansible shellcheck rpm xorriso zsync \
clang-6.0 lldb-6.0 lld-6.0 clang-format-6.0 clang-8 lldb-8 lld-8 clang-format-8 \
clang-9 lldb-9 lld-9 clangd-9 clang-format-9 \
esl-erlang gfortran-8 gfortran-9 \
cabal-install-2.0 cabal-install-2.2 \
cabal-install-2.4 cabal-install-3.0 cabal-install-3.2 heroku imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete mysql-client libmysqlclient-dev \
mysql-server mssql-tools unixodbc-dev yarn bazel chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
php-zmq snmp pollinate libpq-dev postgresql-client ruby-full \
azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell \
sphinxsearch subversion mongodb-org -yq >/dev/null 2>&1 \
|| echo "failed main apt-get remove"
echo "Removing large packages"
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get clean
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
#echo "https://github.com/actions/virtual-environments/issues/709"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "remove big /usr/local"
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /usr/local/lib/android >/dev/null 2>&1
sudo rm -rf /usr/share/dotnet/sdk > /dev/null 2>&1
sudo rm -rf /usr/share/dotnet/shared > /dev/null 2>&1
sudo rm -rf /usr/share/swift > /dev/null 2>&1
sudo -E apt-get -qq update
sudo -E apt-get -y install git
sudo -E apt-get -qq autoremove --purge
sudo -E apt-get -qq clean
sudo apt-get update
sudo apt-get install -y build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils \
jq cmake python3-distutils tclsh scons parallel ssh-client tree python3-dev python3-pip device-tree-compiler libssl-dev ssh cpio \
squashfs-tools fakeroot libncurses5 flex bison mtools libpoco-dev
sudo apt-get clean
df -h
- name: Build ${{ matrix.target }}
id: build
run: |
echo `pwd`
git submodule update --init --recursive --depth 1
make ${{ matrix.target }}
DIR=output/${{ matrix.target }}/install/soc_${{ matrix.target }}
echo "output_dir=./$DIR" >> $GITHUB_OUTPUT
du -h -d1
ls -a
- name: Upload to Github
uses: 'actions/upload-artifact@v4'
with:
name: "upload"
path: |
output/${{ matrix.target }}/install/soc_${{ matrix.target }}