Build GSI #56
Workflow file for this run
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: 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 . personal | |
- name: generate base rom config | |
run: | | |
cp -v ../../../Voltage.mk . | |
bash generate.sh Voltage | |
working-directory: device/phh/treble | |
- name: initialize ccache | |
run: ccache -M 50G -F 0 | |
- name: build standard image | |
run: | | |
. build/envsetup.sh | |
lunch treble_arm64_bvN-userdebug | |
make systemimage -j"$(nproc --all)" | |
- name: create vndklite image | |
run: | | |
cp -v ../out/target/product/tdgsi_arm64_ab/system.img standard_system.img | |
sudo bash lite-adapter.sh 64 standard_system.img | |
sudo chown -R $(whoami):$(id | awk -F'[()]' '{ print $2 }') . | |
working-directory: treble_adapter | |
- name: rename image files | |
run: | | |
buildDate=$(date +%Y%m%d) | |
mv -v out/target/product/tdgsi_arm64_ab/system.img VoltageOS-arm64-ab-3.1-"${buildDate}"-UNOFFICIAL.img | |
mv -v treble_adapter/s.img VoltageOS-arm64-ab-vndklite-3.1-"${buildDate}"-UNOFFICIAL.img | |
- name: compress images with xz | |
run: find . -name 'VoltageOS*.img' -maxdepth 1 -exec xz -9 -T0 -v -z "{}" \; | |
- name: upload images to temp.sh | |
run: find . -name 'VoltageOS*.img.xz' -maxdepth 1 -exec curl -F "file=@{}" https://temp.sh/upload \; | |
- 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 |