This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (71 loc) · 2.64 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
name: Compile AOSP 5.1
on:
push:
branches: [ "lollipop" ]
workflow_dispatch:
inputs:
enable_ssh:
description: 'enable ssh or not'
required: true
type: boolean
default: false
jobs:
build:
runs-on: ubuntu-latest
container:
image: gamecss/lollipop_buildenv:latest
env:
LC_ALL: "C"
steps:
- name: Clear disk
run: |
sudo rm -rf /__t/* || true
sudo rm -rf $GITHUB_WORKSPACE/* || true
echo "========== / =========="
sudo du -hxd3 /
echo "========== __* =========="
sudo du -hxd2 /__*
df -h
- name: Get source
run: |
cd $GITHUB_WORKSPACE/
mkdir aosp
cd aosp
git config --global user.email "[email protected]"
git config --global user.name "xunmod@bot"
sudo rm -f /usr/bin/python
sudo ln -sf /usr/local/bin/python3.8 /usr/bin/python
repo init --depth=1 -u https://github.com/xunmod/android_manifest -b lollipop
mkdir .repo/local_manifests
wget https://github.com/xunmod/android_device_ONDA_octopus-ibt/raw/lollipop/.github/extras.xml -O .repo/local_manifests/extras.xml
repo sync -c -f --no-tags --no-clone-bundle -j16
rm -rf .repo/project-objects/platform .repo/project-objects/*-*
rm -r device/softwinner/octopus-ibt
rm -r bootable/recovery-twrp/applypatch
mv bootable/recovery/applypatch bootable/recovery-twrp/
rm -r bootable/recovery
mv bootable/recovery-twrp bootable/recovery
curl https://github.com/xunmod/android_device_ONDA_octopus-ibt/raw/lollipop/.github/twrp.patch | patch -p1 -
- name: Build
shell: bash
run: |
sudo rm -f /usr/bin/python
sudo ln -sf /usr/bin/python2.7 /usr/bin/python
cd $GITHUB_WORKSPACE/aosp
source build/envsetup.sh
lunch octopus_ibt-eng
make -j$(nproc --all)
- name: Package image
run: |
tar -czvf images.tar.gz $(find $GITHUB_WORKSPACE/aosp/out/target/product/octopus-ibt -name *.img | xargs)
- uses: actions/upload-artifact@v3
with:
name: Images
path: 'images.tar.gz'
# - name: Setup tmate session
# if: ${{ failure() || inputs.enable_ssh }}
# run: |
# wget https://github.com/tmate-io/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-amd64.tar.xz
# tar -xf tmate-2.4.0-static-linux-amd64.tar.xz
# sudo chmod +x tmate-2.4.0-static-linux-amd64/tmate
# tmate-2.4.0-static-linux-amd64/tmate -F