-
Notifications
You must be signed in to change notification settings - Fork 4
97 lines (82 loc) · 3.13 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
#=================================================
# Description: Build ubports using GitHub Actions
# Lisence: MIT
#=================================================
name: Build Ubport 7.1
on:
# push:
# branches:
# - ut-7.1
workflow_dispatch:
schedule:
- cron: 0 8 1 * ?
jobs:
build:
runs-on: ubuntu-16.04
env:
DEVICE: onyx
ANDROID_ROOT: /home/runner/work/halium/
steps:
- name: Checkout
uses: actions/checkout@master
with:
ref: ut-7.1
- 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 m4 libxml2-utils \
gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev \
lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool \
libncurses5-dev libsdl1.2-dev libssl-dev repo libwxgtk3.0-dev \
libxml2 libxml2-utils lzop pngcrush rsync schedtool \
squashfs-tools xsltproc yasm zip zlib1g-dev git
sudo docker rmi `docker images -q`
sudo rm -rf \
/usr/share/dotnet \
/etc/mysql \
/etc/php
#install repo
mkdir -p ~/bin
#if use python2
curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo
#if use python3
#curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
git config --global user.name "ittat"
git config --global user.email "ittat@github.com"
- name: Downloading source code
run: |
source halium.env
mkdir -p $ANDROID_ROOT
cd $ANDROID_ROOT
python2.7 ~/bin/repo init -u https://github.com/Halium/android -b halium-7.1 --depth=1
#python3.7 ~/bin/repo init -u git@github.com:Halium/android.git -b halium-7.1 --depth=1
repo sync -j8 -c --no-clone-bundle --no-tags
- name: Clone device spec source
run: |
source halium.env
git clone https://github.com/OnePlus-onyx/device_oneplus_onyx.git -b ut-7.1 $ANDROID_ROOT/device/oneplus/onyx --depth=1
git clone https://github.com/OnePlus-onyx/android_device_oppo_common.git -b ut-7.1 $ANDROID_ROOT/device/oppo/common --depth=1
git clone https://github.com/OnePlus-onyx/kernel_oneplus_onyx.git -b ut-7.1 $ANDROID_ROOT/kernel/oneplus/onyx --depth=1
git clone https://github.com/OnePlus-onyx/proprietary_vendor_oneplus.git -b ut-7.1 $ANDROID_ROOT/vendor/oneplus --depth=1
- name: Build HAL
run: |
chmod +x build-hal.sh
bash -x build-hal.sh
shell: bash
- name : Upload boot image
uses: actions/upload-artifact@master
with:
name: halium-boot image
path: /home/runner/work/halium/out/target/product/onyx/halium-boot.img
- name : Upload system image
uses: actions/upload-artifact@master
with:
name: System image
path: /home/runner/work/halium/out/target/product/onyx/system.img
- name: Done
run: |
cd $ANDROID_ROOT
sudo rm -r ./*