This repository has been archived by the owner on May 9, 2024. It is now read-only.
Update workflow #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Clean disk | |
run: | | |
docker rmi $(docker image ls -aq) | |
sudo du -hxd4 / | |
df -h | |
- name: Get source | |
run: | | |
mkdir $GITHUB_WORKSPACE/aosp | |
cd $GITHUB_WORKSPACE/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 | |
repo sync -c -f --no-tags --no-clone-bundle -j16 | |
rm -r device/softwinner/octopus-ibt | |
rm -r bootable/recovery | |
git clone https://github.com/TeamWin/android_bootable_recovery bootable/recovery --depth 1 --single-branch -b android9.0 | |
git clone https://github.com/TeamWin/android_external_python3 external/python3 --depth 1 --single-branch -b android9.0 | |
git clone https://github.com/LineageOS/android_external_bash external/bash --depth 1 --single-branch -b cm-12.1 | |
git clone https://github.com/LineageOS/android_external_libncurses external/libncurses --depth 1 --single-branch -b cm-12.1 | |
git clone https://github.com/LineageOS/android_external_openssh external/openssh --depth 1 --single-branch -b cm-12.1 | |
git clone --single-branch -b lollipop --depth 1 https://github.com/xunmod/android_device_ONDA_octopus-ibt device/ONDA/octopus-ibt | |
- 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-userdebug | |
make -j$(nproc --all) | |
- name: Package image | |
run: | | |
tar -czvf images.tar.gz $(find 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 -tf tmate-2.4.0-static-linux-amd64.tar.xz | |
# sudo mv tmate*/tmate /usr/bin | |
# sudo chown +x /usr/bin/tmate | |
# tmate | |
# cat << EOF >> tmate_keeper | |
# while true | |
# do | |
# sleep 1800 | |
# done | |
# EOF | |
# chmod +x tmate_keeper | |
# ./tmate_keeper |