forked from areyoudeveloper1/ubports-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (97 loc) · 3.82 KB
/
build.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#=================================================
# Description: Build ubports using GitHub Actions
# Lisence: MIT
# Contributor: 0312birdzhang
# Maintainer: Danct12
# Credit: https://github.com/P3TERX/Actions-OpenWrt
#=================================================
name: Building System Images...
on:
push:
branches:
- master
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
env:
VENDOR: xiaomi
DEVICE: rolex
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Check free space
run: |
echo "Free space:"
df -h
- name: Initialization environment
run: |
sudo apt-get update
sudo apt-get install -y \
openjdk-8-jdk android-tools-adb bc \
bison build-essential curl flex g++-multilib \
gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev \
lib32readline-dev lib32z1-dev liblz4-tool \
libncurses5-dev libsdl1.2-dev libssl-dev \
libxml2 libxml2-utils lzop pngcrush rsync schedtool \
squashfs-tools xsltproc yasm zip zlib1g-dev git python3.7
sudo docker rmi `docker images -q`
sudo rm -rf \
/usr/share/dotnet \
/etc/mysql \
/etc/php
mkdir -p ~/bin
wget 'https://storage.googleapis.com/git-repo-downloads/repo' -P ~/bin
chmod +x ~/bin/repo
git config --global user.name "UBports Redmi 4A CI"
git config --global user.email "[email protected]"
- name: Downloading source code
run: |
source halium.env
mkdir -p /home/runner/work/ubports-ci-4a/ubports-ci-4a/halium
cd /home/runner/work/ubports-ci-4a/ubports-ci-4a/halium
repo init -u https://github.com/Halium/android -b halium-7.1 --depth=1
mkdir -p /home/runner/work/ubports-ci-4a/ubports-ci-4a/halium/.repo/local_manifests
wget https://raw.githubusercontent.com/Halium/halium-devices/halium-7.1/manifests/"$VENDOR"_"$DEVICE".xml -O $ANDROID_ROOT/.repo/local_manifests/$DEVICE.xml
repo sync -j8 -c --no-clone-bundle --no-tags
- name: Build HAL
run: |
sudo apt update
sudo apt autoremove python3 -y
sudo apt install android-tools-mkbootimg bc bison build-essential ca-certificates cpio curl flex git kmod libssl-dev libtinfo5 python2 sudo unzip wget xz-utils -y --no-install-recommends
sudo ln -sf python2.7 /usr/bin/python
chmod +x build-hal.sh
bash -x build-hal.sh
shell: bash
- name : Upload Hybris-Boot image
uses: actions/upload-artifact@master
with:
name: hybris-boot image
path: /home/runner/work/ubports-ci-4a/ubports-ci-4a/halium/out/target/product/rolex/hybris-boot.img
- name : Upload boot image
uses: actions/upload-artifact@master
with:
name: halium-boot image
path: /home/runner/work/ubports-ci-4a/ubports-ci-4a/halium/out/target/product/rolex/halium-boot.img
- name : Upload recovery image
uses: actions/upload-artifact@master
with:
name: Recovery image
path: /home/runner/work/ubports-ci-4a/ubports-ci-4a/halium//out/target/product/rolex/recovery.img
- name : Upload Hybris-Recovery image
uses: actions/upload-artifact@master
with:
name: hybris-boot image
path: /home/runner/work/ubports-ci-4a/ubports-ci-4a/halium/out/target/product/rolex/hybris-recovery.img
- name : Upload system image
uses: actions/upload-artifact@master
with:
name: System image
path: /home/runner/work/ubports-ci-4a/ubports-ci-4a/halium/out/target/product/rolex/system.img