Build #1
This file contains hidden or 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: Build | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update and upgrade the system | |
run: | | |
apt-get update | |
apt-get upgrade -o Dpkg::Options::="--force-confold" -o Dpkg::Options::=--force-confdef -y --allow-downgrades --allow-remove-essential --allow-change-held-packages | |
- name: Install Android Platform Tools | |
run: | | |
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip | |
unzip platform-tools-latest-linux.zip -d ~ | |
echo "~/platform-tools" >> $GITHUB_PATH | |
- name: Install LineageOS build dependencies | |
run: | | |
DEBIAN_FRONTEND=noninteractive apt-get install -yq bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick protobuf-compiler python3-protobuf lib32readline-dev lib32z1-dev libdw-dev libelf-dev lz4 libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev | |
wget https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2_amd64.deb && dpkg -i libtinfo5_6.3-2_amd64.deb && rm -f libtinfo5_6.3-2_amd64.deb | |
wget https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncurses5_6.3-2_amd64.deb && dpkg -i libncurses5_6.3-2_amd64.deb && rm -f libncurses5_6.3-2_amd64.deb | |
DEBIAN_FRONTEND=noninteractive apt-get instalal -yq python-is-python3 | |
- name: Setup LineageOS directories | |
run: | | |
mkdir -p ~/bin | |
mkdir -p ~/android/lineage | |
- name: Install the repo tool | |
run: | | |
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | |
chmod a+x ~/bin/repo | |
echo "~/bin" >> $GITHUB_PATH | |
- name: Configure git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Nikola Vukosavljević" | |
git lfs install | |
git config --global trailer.changeid.key "Change-Id" | |
- name: Configure build caching | |
run: | | |
echo "USE_CCACHE=1" >> $GITHUB_ENV | |
echo "CCACHE_EXEC=/usr/bin/ccache" >> $GITHUB_ENV | |
ccache -M 50G | |
- name: Initialize the LineageOS repository | |
run: | | |
cd ~/android/lineage | |
repo init -u https://github.com/LineageOS/android.git -b lineage-22.2 --git-lfs --no-clone-bundle | |
repo sync | |
- name: Extract proprietary blobs | |
run: | | |
source ~/android/lineage/build/envsetup.sh | |
mkdir ~/android/system_dump/ | |
cd ~/android/system_dump/ | |
DEBIAN_FRONTEND=noninteractive apt-get install -yq python3-protobuf | |
git clone https://github.com/LineageOS/android_prebuilts_extract-tools android/prebuilts/extract-tools | |
git clone https://github.com/LineageOS/android_tools_extract-utils android/tools/extract-utils | |
git clone https://github.com/LineageOS/android_system_update_engine android/system/update_engine | |
wget https://mirrorbits.lineageos.org/full/alioth/20250917/lineage-22.2-20250917-nightly-alioth-signed.zip | |
unzip lineage-22.2-20250917-nightly-alioth-signed.zip | |
./android/prebuilts/extract-tools/linux-x86/bin/ota_extractor --payload payload.bin | |
mkdir system/ | |
mount -o ro system.img system/ | |
mount -o ro vendor.img system/vendor/ | |
mount -o ro odm.img system/odm/ | |
mount -o ro product.img system/product/ | |
mount -o ro system_ext.img system/system_ext/ | |
cd ~/android/lineage/device/xiaomi/alioth | |
./extract-files.py ~/android/system_dump/ | |
- name: Build | |
run: | | |
source ~/android/lineage/build/envsetup.sh | |
curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash - | |
croot | |
brunch alioth | |
- name: Upload vendor_boot.img | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vendor_boot.img | |
path: vendor_boot.img | |
- name: Upload main zip file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lineage-22.2-UNOFFICIAL-alioth.zip | |
path: lineage-22.2*.zip |