Skip to content

Build GSI

Build GSI #39

Workflow file for this run

name: Build GSI
on:
workflow_dispatch:
env:
CCACHE_COMPRESS: 1
CCACHE_MAXSIZE: 50G
DISABLE_RUNNER_CLEANUP: false # should ONLY be set to true if ABSOLUTELY necessary
USE_CCACHE: 1
jobs:
build-gsi:
runs-on: [self-hosted]
steps:
- name: setup git config
run: |
git config --global user.email "androidbuild@localhost"
git config --global user.name "androidbuild"
- name: checkout basic repo
uses: actions/checkout@v4
- name: clone rom manifest
run: repo init -u https://github.com/VoltageOS/manifest.git -b 14 --depth=1
- name: copy manifest config
run: |
mkdir -p .repo/local_manifests
cp -v manifest.xml .repo/local_manifests/
- name: setup git-lfs hook
run: git lfs install
- name: perform full sources sync (with auto retry)
uses: nick-fields/retry@v2
with:
command: repo sync -c -j8 --force-sync --no-clone-bundle --no-tags # set to 8 cores to slow down sync and avoid github-actions timeouts
max_attempts: 3
retry_on: error
timeout_minutes: 20
- name: fetch all git-lfs objects
run: |
grep -l 'merge=lfs' $( find $PWD -name .gitattributes ) /dev/null | while IFS= read -r line; do
dir=$(dirname $line)
echo $dir
( cd $dir ; git lfs pull )
done
- name: apply patches
run: |
./patches/apply.sh . trebledroid
./patches/apply.sh . ponces
./patches/apply.sh . personal
- name: generate base rom config
run: bash generate.sh Voltage
working-directory: device/phh/treble
- name: initialize ccache
run: ccache -M 50G -F 0
- name: build gsi image
run: |
. build/envsetup.sh
lunch treble_arm64_bvN-userdebug
make systemimage -j"$(nproc --all)"
- name: compress system.img with xz
run: xz -9 -T0 -v -z system.img
working-directory: out/target/product/tdgsi_arm64_ab
- name: upload system.img to temp.sh
run: curl -F "[email protected]" https://temp.sh/upload
working-directory: out/target/product/tdgsi_arm64_ab
- name: cleanup work directory
uses: eviden-actions/clean-self-hosted-runner@v1
if: ${{ always() }} # Run even if previous steps in the job fail or are canceled