Loading .gitlab-ci.yml +8 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,14 @@ variables: stage: build image: docker:git services: - docker:28.4.0-dind - docker:latest rules: # Auto-run on master - if: '$CI_COMMIT_BRANCH == "master"' when: on_success # Manual for all other branches - when: manual script: - "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY" - "docker pull $CI_REGISTRY_IMAGE:$IMAGE_TAG || true" Loading Dockerfile +54 −85 Original line number Diff line number Diff line FROM ubuntu:24.04 MAINTAINER Romain Hunault <romain.hunault@e.email> LABEL maintainer="Romain Hunault <romain.hunault@e.email>" # Environment variables ####################### ENV SRC_DIR /srv/src ENV CCACHE_BASE_DIR /srv/ccache ENV ZIP_DIR /srv/zips ENV LMANIFEST_DIR /srv/local_manifests ENV KEYS_DIR /srv/keys ENV LOGS_DIR /srv/logs ENV USERSCRIPTS_DIR /srv/userscripts ENV SRC_DIR=/srv/src ENV CCACHE_BASE_DIR=/srv/ccache ENV ZIP_DIR=/srv/zips ENV LMANIFEST_DIR=/srv/local_manifests ENV KEYS_DIR=/srv/keys ENV LOGS_DIR=/srv/logs ENV USERSCRIPTS_DIR=/srv/userscripts ENV DEBIAN_FRONTEND noninteractive ENV USER root ENV DEBIAN_FRONTEND=noninteractive ENV USER=root # Configurable environment variables #################################### # By default we want to use CCACHE, you can disable this # WARNING: disabling this may slow down a lot your builds! ENV USE_CCACHE 1 # ccache maximum size. It should be a number followed by an optional suffix: k, # M, G, T (decimal), Ki, Mi, Gi or Ti (binary). The default suffix is G. Use 0 # for no limit. ENV CCACHE_SIZE 100G # We need to specify the ccache binary since it is no longer packaged along with AOSP ENV CCACHE_EXEC /usr/bin/ccache ENV USE_CCACHE=1 # Environment for the /e/ branches name # See https://github.com/LineageOS/android_vendor_cm/branches for possible options ENV BRANCH_NAME 'v1-q' ENV BRANCH_NAME='v1-q' # When true, muppets manifests will keep BRANCH_NAME as branch instead of getting its lineage equivalent ENV KEEP_LOCAL_MANIFEST_BRANCH 'false' ENV KEEP_LOCAL_MANIFEST_BRANCH='false' # Environment for the device # eg. DEVICE=hammerhead ENV DEVICE '' ENV DEVICE='' # Release type string ENV RELEASE_TYPE 'UNOFFICIAL' ENV RELEASE_TYPE='UNOFFICIAL' # Repo use for build ENV REPO 'https://gitlab.e.foundation/e/os/android.git' ENV LINEAGE_REPO 'https://github.com/LineageOS/android.git' ENV REPO='https://gitlab.e.foundation/e/os/android.git' ENV LINEAGE_REPO='https://github.com/LineageOS/android.git' # If we have a change ref for lineage like refs/changes/42/436442/31 ENV CHANGE_REF='' # Optional parameter to repo init --depth N # A size of 0 deactivates --depth N ENV REPO_INIT_DEPTH 0 ENV REPO_INIT_DEPTH=0 # User identity ENV USER_NAME '/e/ robot' ENV USER_MAIL 'erobot@e.email' ENV USER_NAME='/e/ robot' ENV USER_MAIL='erobot@e.email' # Include proprietary files, downloaded automatically from github.com/TheMuppets/ and gitlab.com/the-muppets/ # Only some branches are supported ENV INCLUDE_PROPRIETARY true ENV INCLUDE_PROPRIETARY=true # If you want to preserve old ZIPs set this to 'false' ENV CLEAN_OUTDIR false ENV CLEAN_OUTDIR=false # Change this cron rule to what fits best for you # Use 'now' to start the build immediately # For example, '0 10 * * *' means 'Every day at 10:00 UTC' ENV CRONTAB_TIME 'now' ENV CRONTAB_TIME='now' # Clean source code before build ENV CLEAN_SRC_BUILD false ENV CLEAN_SRC_BUILD=false # Clean artifacts output after each build ENV CLEAN_AFTER_BUILD true ENV CLEAN_AFTER_BUILD=true # Provide a default JACK configuration in order to avoid out-of-memory issues ENV ANDROID_JACK_VM_ARGS "-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" ENV ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" # Custom packages to be installed ENV CUSTOM_PACKAGES '' ENV CUSTOM_PACKAGES='' # Sign the builds with the keys in $KEYS_DIR ENV SIGN_BUILDS false ENV SIGN_BUILDS=false # When SIGN_BUILDS = true but no keys have been provided, generate a new set with this subject ENV KEYS_SUBJECT '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com' ENV KEYS_SUBJECT='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com' # Move the resulting zips to $ZIP_DIR/$codename instead of $ZIP_DIR/ ENV ZIP_SUBDIR true ENV ZIP_SUBDIR=true # Write the verbose logs to $LOGS_DIR/$codename instead of $LOGS_DIR/ ENV LOGS_SUBDIR true ENV LOGS_SUBDIR=true # Backup the .img in addition to zips ENV BACKUP_IMG false ENV BACKUP_IMG=false # Delete old zips in $ZIP_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_ZIPS 0 ENV DELETE_OLD_ZIPS=0 # Delete old logs in $LOGS_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_LOGS 0 ENV DELETE_OLD_LOGS=0 # Save recovery image ENV RECOVERY_IMG false ENV RECOVERY_IMG=false # Assume device does not use vendor_boot as recovery by default ENV VBOOT_IS_RECOVERY false ENV VBOOT_IS_RECOVERY=false # Assume device does not need additional files for recovery to boot. ENV RECOVERY_NEEDS_SUPPORT_IMG false ENV RECOVERY_NEEDS_SUPPORT_IMG=false # Assume device does not use vendor_boot for recovery to boot by default. ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG false ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG=false # Assume device does not use boot.img for recovery to boot by default. ENV RECOVERY_NEEDS_BOOT_IMG false ENV RECOVERY_NEEDS_BOOT_IMG=false # Assume device does not use DTBO for recovery to boot by default. ENV RECOVERY_NEEDS_DTBO_IMG false ENV RECOVERY_NEEDS_DTBO_IMG=false # Assume device does not use VBMETA for recovery to boot by default. ENV RECOVERY_NEEDS_VBMETA_IMG false ENV RECOVERY_NEEDS_VBMETA_IMG=false # Assume device does not use super_image for recovery to boot by default. ENV RECOVERY_NEEDS_SUPER_IMG false ENV RECOVERY_NEEDS_SUPER_IMG=false # Assume device does not use vendor_kernel_boot for recovery to boot by default. ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG false ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG=false # Ship with Minimal Apps ENV MINIMAL_APPS false ENV MINIMAL_APPS=false # Force an eng build even when device name doesn't contain -eng ENV ENG_BUILD false ENV ENG_BUILD=false #Save intermediate system.img even when not in out folder ENV BACKUP_INTERMEDIATE_SYSTEM_IMG false ENV BACKUP_INTERMEDIATE_SYSTEM_IMG=false # Backup emulator files ENV BACKUP_EMULATOR false ENV BACKUP_EMULATOR=false # Use lunch command (by default, it's brunch) ENV USE_LUNCH false ENV USE_LUNCH=false # Include flash binaries and script to the resulting img zip ENV BUILD_FLASH_PACKAGE false ENV BUILD_FLASH_PACKAGE=false # specify a custom manifest URL ENV REPO_CUSTOM_MANIFEST false ENV REPO_CUSTOM_MANIFEST=false # Build lineage from source ENV IS_LINEAGE_BUILD false ENV IS_LINEAGE_BUILD=false # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: # * begin.sh, run at the very beginning Loading Loading @@ -191,31 +183,8 @@ RUN mkdir -p $USERSCRIPTS_DIR # Install build dependencies ############################ RUN apt-get -qq update RUN apt-get -qqy upgrade RUN apt-get install -y android-sdk-libsparse-utils bc bison bsdmainutils build-essential ccache cgpt clang cron \ curl flex g++-multilib gcc-multilib git git-crypt git-lfs gnupg gperf imagemagick kmod jq \ lib32readline-dev lib32z1-dev liblz4-tool \ libsdl1.2-dev libssl-dev libxml2 \ libxml2-utils lsof lzop maven pngcrush \ procps python3 python-is-python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \ zip zlib1g-dev # Install Python 2.7 for legacy device support RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-stdlib_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \ dpkg -i *.deb || apt-get install -f -y && \ rm -f *.deb && \ ln -sf /usr/bin/python2.7 /usr/bin/python2 RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo RUN chmod a+x /usr/local/bin/repo RUN 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 RUN 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 RUN /root/install-deps.sh RUN /root/install-latest-ccache.sh # Set the work directory ######################## Loading @@ -227,4 +196,4 @@ RUN ln -sf /proc/1/fd/1 /var/log/docker.log # Set the entry point to init.sh ################################ ENTRYPOINT /root/init.sh ENTRYPOINT ["/root/init.sh"] Dockerfile.community +48 −79 Original line number Diff line number Diff line FROM ubuntu:24.04 MAINTAINER Romain Hunault <romain.hunault@e.email> LABEL maintainer="Romain Hunault <romain.hunault@e.email>" # Environment variables ####################### ENV MIRROR_DIR /srv/mirror ENV SRC_DIR /srv/src ENV TMP_DIR /srv/tmp ENV CCACHE_DIR /srv/ccache ENV ZIP_DIR /srv/zips ENV LMANIFEST_DIR /srv/local_manifests ENV KEYS_DIR /srv/keys ENV LOGS_DIR /srv/logs ENV USERSCRIPTS_DIR /srv/userscripts ENV MIRROR_DIR=/srv/mirror ENV SRC_DIR=/srv/src ENV TMP_DIR=/srv/tmp ENV CCACHE_DIR=/srv/ccache ENV ZIP_DIR=/srv/zips ENV LMANIFEST_DIR=/srv/local_manifests ENV KEYS_DIR=/srv/keys ENV LOGS_DIR=/srv/logs ENV USERSCRIPTS_DIR=/srv/userscripts ENV DEBIAN_FRONTEND noninteractive ENV USER root ENV DEBIAN_FRONTEND=noninteractive ENV USER=root # Configurable environment variables #################################### # By default we want to use CCACHE, you can disable this # WARNING: disabling this may slow down a lot your builds! ENV USE_CCACHE 1 # ccache maximum size. It should be a number followed by an optional suffix: k, # M, G, T (decimal), Ki, Mi, Gi or Ti (binary). The default suffix is G. Use 0 # for no limit. ENV CCACHE_SIZE 50G # We need to specify the ccache binary since it is no longer packaged along with AOSP ENV CCACHE_EXEC /usr/bin/ccache ENV USE_CCACHE=1 # Environment for the /e/ branches name # See https://github.com/LineageOS/android_vendor_cm/branches for possible options ENV BRANCH_NAME 'v1-q' ENV BRANCH_NAME='v1-q' # Environment for the device list (separate by comma if more than one) # eg. DEVICE_LIST=hammerhead,bullhead,angler ENV DEVICE_LIST '' ENV DEVICE_LIST='' # Release type string ENV RELEASE_TYPE 'UNOFFICIAL' ENV RELEASE_TYPE='UNOFFICIAL' # Repo use for build ENV REPO 'https://gitlab.e.foundation/e/os/android.git' ENV REPO='https://gitlab.e.foundation/e/os/android.git' # Repo use for build ENV MIRROR 'https://github.com/LineageOS/mirror' ENV MIRROR='https://github.com/LineageOS/mirror' # OTA URL that will be used inside CMUpdater # Use this in combination with LineageOTA to make sure your device can auto-update itself from this buildbot ENV OTA_URL '' ENV OTA_URL='' # User identity ENV USER_NAME 'LineageOS Buildbot' ENV USER_MAIL 'lineageos-buildbot@docker.host' ENV USER_NAME='LineageOS Buildbot' ENV USER_MAIL='lineageos-buildbot@docker.host' # Include proprietary files, downloaded automatically from github.com/TheMuppets/ and gitlab.com/the-muppets/ # Only some branches are supported ENV INCLUDE_PROPRIETARY true ENV INCLUDE_PROPRIETARY=true # Mount an overlay filesystem over the source dir to do each build on a clean source ENV BUILD_OVERLAY false ENV BUILD_OVERLAY=false # Clone the full LineageOS mirror (> 200 GB) ENV LOCAL_MIRROR false ENV LOCAL_MIRROR=false # If you want to preserve old ZIPs set this to 'false' ENV CLEAN_OUTDIR false ENV CLEAN_OUTDIR=false # Change this cron rule to what fits best for you # Use 'now' to start the build immediately # For example, '0 10 * * *' means 'Every day at 10:00 UTC' ENV CRONTAB_TIME 'now' ENV CRONTAB_TIME='now' # Clean artifacts output after each build ENV CLEAN_AFTER_BUILD true ENV CLEAN_AFTER_BUILD=true # Provide root capabilities builtin inside the ROM (see http://lineageos.org/Update-and-Build-Prep/) ENV WITH_SU false ENV WITH_SU=false # Provide a default JACK configuration in order to avoid out-of-memory issues ENV ANDROID_JACK_VM_ARGS "-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" ENV ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" # Custom packages to be installed ENV CUSTOM_PACKAGES '' ENV CUSTOM_PACKAGES='' # Sign the builds with the keys in $KEYS_DIR ENV SIGN_BUILDS false ENV SIGN_BUILDS=false # When SIGN_BUILDS = true but no keys have been provided, generate a new set with this subject ENV KEYS_SUBJECT '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com' ENV KEYS_SUBJECT='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com' # Move the resulting zips to $ZIP_DIR/$codename instead of $ZIP_DIR/ ENV ZIP_SUBDIR true ENV ZIP_SUBDIR=true # Write the verbose logs to $LOGS_DIR/$codename instead of $LOGS_DIR/ ENV LOGS_SUBDIR true ENV LOGS_SUBDIR=true # Delete old zips in $ZIP_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_ZIPS 0 ENV DELETE_OLD_ZIPS=0 # Delete old logs in $LOGS_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_LOGS 0 ENV DELETE_OLD_LOGS=0 # Assume device does not use vendor_boot as recovery by default ENV VBOOT_IS_RECOVERY false ENV VBOOT_IS_RECOVERY=false # Assume device does not need additional files for recovery to boot. ENV RECOVERY_NEEDS_SUPPORT_IMG false ENV RECOVERY_NEEDS_SUPPORT_IMG=false # Assume device does not use vendor_boot for recovery to boot by default. ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG false ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG=false # Assume device does not use boot.img for recovery to boot by default. ENV RECOVERY_NEEDS_BOOT_IMG false ENV RECOVERY_NEEDS_BOOT_IMG=false # Assume device does not use DTBO for recovery to boot by default. ENV RECOVERY_NEEDS_DTBO_IMG false ENV RECOVERY_NEEDS_DTBO_IMG=false # Assume device does not use VBMETA for recovery to boot by default. ENV RECOVERY_NEEDS_VBMETA_IMG false ENV RECOVERY_NEEDS_VBMETA_IMG=false # Assume device does not use super_image for recovery to boot by default. ENV RECOVERY_NEEDS_SUPER_IMG false ENV RECOVERY_NEEDS_SUPER_IMG=false # Assume device does not use vendor_kernel_boot for recovery to boot by default. ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG false ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG=false # Force an eng build even when device name doesn't contain -eng ENV ENG_BUILD false ENV ENG_BUILD=false # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: Loading Loading @@ -174,31 +166,8 @@ RUN mkdir -p $USERSCRIPTS_DIR # Install build dependencies ############################ RUN apt-get -qq update RUN apt-get -qqy upgrade RUN apt-get install -y android-sdk-libsparse-utils bc bison bsdmainutils build-essential ccache cgpt clang cron \ curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick kmod jq \ lib32readline-dev lib32z1-dev liblz4-tool \ libsdl1.2-dev libssl-dev libxml2 \ libxml2-utils lsof lzop maven pngcrush \ procps python3 python-is-python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \ zip zlib1g-dev # Install Python 2.7 for legacy device support RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-stdlib_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \ dpkg -i *.deb || apt-get install -f -y && \ rm -f *.deb && \ ln -sf /usr/bin/python2.7 /usr/bin/python2 RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo RUN chmod a+x /usr/local/bin/repo RUN 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 RUN 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 RUN /root/install-deps.sh RUN /root/install-latest-ccache.sh # Set the work directory ######################## Loading @@ -210,4 +179,4 @@ RUN ln -sf /proc/1/fd/1 /var/log/docker.log # Set the entry point to init.sh ################################ ENTRYPOINT /root/init.sh ENTRYPOINT ["/root/init.sh"] build-community.sh +8 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ repo_log="$LOGS_DIR/repo-$(date +%Y%m%d).log" nproc_value=$(nproc --all) JOBS=$((nproc_value > 10 ? 10 : nproc_value)) source /root/init-ccache.sh # cd to working directory cd "$SRC_DIR" Loading Loading @@ -126,6 +128,12 @@ for branch in ${BRANCH_NAME//,/ }; do elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16"$regex_part2 || "${BRANCH_NAME}" =~ "a16" ]]; then themuppets_branch="lineage-23.0" android_version="16" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16.1"$regex_part2 || "${BRANCH_NAME}" =~ "a16.1" ]]; then themuppets_branch="lineage-23.1" android_version="16" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16.2"$regex_part2 || "${BRANCH_NAME}" =~ "a16.2" ]]; then themuppets_branch="lineage-23.2" android_version="16" else echo ">> [$(date)] Building branch $branch is not (yet) suppported" exit 1 Loading Loading @@ -335,8 +343,6 @@ for branch in ${BRANCH_NAME//,/ }; do echo ">> [$(date)] Starting build for $codename, $branch branch" | tee -a "$DEBUG_LOG" build_successful=false echo ">> [$(date)] ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}" echo ">> [$(date)] Switch to Python2" ln -fs /usr/bin/python2 /usr/bin/python if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then PRODUCT_PRERELEASE=$(echo ${BRANCH_NAME} | sed -E 's/v[0-9]*\.[0-9]*(\.[0-9]*)?-(beta|alpha|rc).*/\2/') Loading Loading @@ -488,9 +494,6 @@ for branch in ${BRANCH_NAME//,/ }; do mka clean &>>"$DEBUG_LOG" fi fi echo ">> [$(date)] Switch back to Python3" ln -fs /usr/bin/python3 /usr/bin/python fi done fi Loading src/build.sh +12 −2 Original line number Diff line number Diff line Loading @@ -83,6 +83,9 @@ exit_script() { /root/userscripts/end.sh fi # Print ccache usage after build ccache -s if [ "$build_successful" = false ] || [ "$sync_successful" = false ]; then exit 1 fi Loading @@ -91,7 +94,7 @@ exit_script() { sync_successful=true use_openjdk_from_ubuntu=false branch_dir=$(sed -E 's/^v[0-9](\.[0-9]*){0,2}(-(beta|alpha|rc)(\.[0-9]*){0,1}){0,1}-(s|t|u|a14|a15|a16)(-[a-zA-Z0-9_]*)*$/\5/' <<<"${BRANCH_NAME}") branch_dir=$(sed -E 's/^v[0-9](\.[0-9]*){0,2}(-(beta|alpha|rc)(\.[0-9]*){0,1}){0,1}-(s|t|u|a14|a15|a16\.2|a16\.1|a16)(-[a-zA-Z0-9_]*)*$/\5/' <<<"${BRANCH_NAME}") branch_dir=${branch_dir^^} default_key_dir="user-keys" Loading @@ -114,6 +117,12 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then elif [[ "${BRANCH_NAME}" =~ $regex_part1"a15"$regex_part2 || "${BRANCH_NAME}" =~ "a15" ]]; then themuppets_branch="lineage-22.2" android_version="15" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16.1"$regex_part2 || "${BRANCH_NAME}" =~ "a16.1" ]]; then themuppets_branch="lineage-23.1" android_version="16" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16.2"$regex_part2 || "${BRANCH_NAME}" =~ "a16.2" ]]; then themuppets_branch="lineage-23.2" android_version="16" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16"$regex_part2 || "${BRANCH_NAME}" =~ "a16" ]]; then themuppets_branch="lineage-23.0" android_version="16" Loading @@ -139,8 +148,9 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then mkdir -p "$CCACHE_BASE_DIR/$branch_dir" export CCACHE_DIR="$CCACHE_BASE_DIR/$branch_dir" source /root/init-ccache.sh echo ">> [$(date)] Setting up CCache, CCACHE_DIR=${CCACHE_DIR} CCACHE_SIZE=${CCACHE_SIZE}" echo ">> [$(date)] Setting up CCache, CCACHE_DIR=${CCACHE_DIR} CCACHE_SIZE=$(ccache --get-config max_size)" echo ">> [$(date)] Branch: ${BRANCH_NAME}" echo ">> [$(date)] Device: ${DEVICE}" Loading Loading
.gitlab-ci.yml +8 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,14 @@ variables: stage: build image: docker:git services: - docker:28.4.0-dind - docker:latest rules: # Auto-run on master - if: '$CI_COMMIT_BRANCH == "master"' when: on_success # Manual for all other branches - when: manual script: - "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY" - "docker pull $CI_REGISTRY_IMAGE:$IMAGE_TAG || true" Loading
Dockerfile +54 −85 Original line number Diff line number Diff line FROM ubuntu:24.04 MAINTAINER Romain Hunault <romain.hunault@e.email> LABEL maintainer="Romain Hunault <romain.hunault@e.email>" # Environment variables ####################### ENV SRC_DIR /srv/src ENV CCACHE_BASE_DIR /srv/ccache ENV ZIP_DIR /srv/zips ENV LMANIFEST_DIR /srv/local_manifests ENV KEYS_DIR /srv/keys ENV LOGS_DIR /srv/logs ENV USERSCRIPTS_DIR /srv/userscripts ENV SRC_DIR=/srv/src ENV CCACHE_BASE_DIR=/srv/ccache ENV ZIP_DIR=/srv/zips ENV LMANIFEST_DIR=/srv/local_manifests ENV KEYS_DIR=/srv/keys ENV LOGS_DIR=/srv/logs ENV USERSCRIPTS_DIR=/srv/userscripts ENV DEBIAN_FRONTEND noninteractive ENV USER root ENV DEBIAN_FRONTEND=noninteractive ENV USER=root # Configurable environment variables #################################### # By default we want to use CCACHE, you can disable this # WARNING: disabling this may slow down a lot your builds! ENV USE_CCACHE 1 # ccache maximum size. It should be a number followed by an optional suffix: k, # M, G, T (decimal), Ki, Mi, Gi or Ti (binary). The default suffix is G. Use 0 # for no limit. ENV CCACHE_SIZE 100G # We need to specify the ccache binary since it is no longer packaged along with AOSP ENV CCACHE_EXEC /usr/bin/ccache ENV USE_CCACHE=1 # Environment for the /e/ branches name # See https://github.com/LineageOS/android_vendor_cm/branches for possible options ENV BRANCH_NAME 'v1-q' ENV BRANCH_NAME='v1-q' # When true, muppets manifests will keep BRANCH_NAME as branch instead of getting its lineage equivalent ENV KEEP_LOCAL_MANIFEST_BRANCH 'false' ENV KEEP_LOCAL_MANIFEST_BRANCH='false' # Environment for the device # eg. DEVICE=hammerhead ENV DEVICE '' ENV DEVICE='' # Release type string ENV RELEASE_TYPE 'UNOFFICIAL' ENV RELEASE_TYPE='UNOFFICIAL' # Repo use for build ENV REPO 'https://gitlab.e.foundation/e/os/android.git' ENV LINEAGE_REPO 'https://github.com/LineageOS/android.git' ENV REPO='https://gitlab.e.foundation/e/os/android.git' ENV LINEAGE_REPO='https://github.com/LineageOS/android.git' # If we have a change ref for lineage like refs/changes/42/436442/31 ENV CHANGE_REF='' # Optional parameter to repo init --depth N # A size of 0 deactivates --depth N ENV REPO_INIT_DEPTH 0 ENV REPO_INIT_DEPTH=0 # User identity ENV USER_NAME '/e/ robot' ENV USER_MAIL 'erobot@e.email' ENV USER_NAME='/e/ robot' ENV USER_MAIL='erobot@e.email' # Include proprietary files, downloaded automatically from github.com/TheMuppets/ and gitlab.com/the-muppets/ # Only some branches are supported ENV INCLUDE_PROPRIETARY true ENV INCLUDE_PROPRIETARY=true # If you want to preserve old ZIPs set this to 'false' ENV CLEAN_OUTDIR false ENV CLEAN_OUTDIR=false # Change this cron rule to what fits best for you # Use 'now' to start the build immediately # For example, '0 10 * * *' means 'Every day at 10:00 UTC' ENV CRONTAB_TIME 'now' ENV CRONTAB_TIME='now' # Clean source code before build ENV CLEAN_SRC_BUILD false ENV CLEAN_SRC_BUILD=false # Clean artifacts output after each build ENV CLEAN_AFTER_BUILD true ENV CLEAN_AFTER_BUILD=true # Provide a default JACK configuration in order to avoid out-of-memory issues ENV ANDROID_JACK_VM_ARGS "-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" ENV ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" # Custom packages to be installed ENV CUSTOM_PACKAGES '' ENV CUSTOM_PACKAGES='' # Sign the builds with the keys in $KEYS_DIR ENV SIGN_BUILDS false ENV SIGN_BUILDS=false # When SIGN_BUILDS = true but no keys have been provided, generate a new set with this subject ENV KEYS_SUBJECT '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com' ENV KEYS_SUBJECT='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com' # Move the resulting zips to $ZIP_DIR/$codename instead of $ZIP_DIR/ ENV ZIP_SUBDIR true ENV ZIP_SUBDIR=true # Write the verbose logs to $LOGS_DIR/$codename instead of $LOGS_DIR/ ENV LOGS_SUBDIR true ENV LOGS_SUBDIR=true # Backup the .img in addition to zips ENV BACKUP_IMG false ENV BACKUP_IMG=false # Delete old zips in $ZIP_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_ZIPS 0 ENV DELETE_OLD_ZIPS=0 # Delete old logs in $LOGS_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_LOGS 0 ENV DELETE_OLD_LOGS=0 # Save recovery image ENV RECOVERY_IMG false ENV RECOVERY_IMG=false # Assume device does not use vendor_boot as recovery by default ENV VBOOT_IS_RECOVERY false ENV VBOOT_IS_RECOVERY=false # Assume device does not need additional files for recovery to boot. ENV RECOVERY_NEEDS_SUPPORT_IMG false ENV RECOVERY_NEEDS_SUPPORT_IMG=false # Assume device does not use vendor_boot for recovery to boot by default. ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG false ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG=false # Assume device does not use boot.img for recovery to boot by default. ENV RECOVERY_NEEDS_BOOT_IMG false ENV RECOVERY_NEEDS_BOOT_IMG=false # Assume device does not use DTBO for recovery to boot by default. ENV RECOVERY_NEEDS_DTBO_IMG false ENV RECOVERY_NEEDS_DTBO_IMG=false # Assume device does not use VBMETA for recovery to boot by default. ENV RECOVERY_NEEDS_VBMETA_IMG false ENV RECOVERY_NEEDS_VBMETA_IMG=false # Assume device does not use super_image for recovery to boot by default. ENV RECOVERY_NEEDS_SUPER_IMG false ENV RECOVERY_NEEDS_SUPER_IMG=false # Assume device does not use vendor_kernel_boot for recovery to boot by default. ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG false ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG=false # Ship with Minimal Apps ENV MINIMAL_APPS false ENV MINIMAL_APPS=false # Force an eng build even when device name doesn't contain -eng ENV ENG_BUILD false ENV ENG_BUILD=false #Save intermediate system.img even when not in out folder ENV BACKUP_INTERMEDIATE_SYSTEM_IMG false ENV BACKUP_INTERMEDIATE_SYSTEM_IMG=false # Backup emulator files ENV BACKUP_EMULATOR false ENV BACKUP_EMULATOR=false # Use lunch command (by default, it's brunch) ENV USE_LUNCH false ENV USE_LUNCH=false # Include flash binaries and script to the resulting img zip ENV BUILD_FLASH_PACKAGE false ENV BUILD_FLASH_PACKAGE=false # specify a custom manifest URL ENV REPO_CUSTOM_MANIFEST false ENV REPO_CUSTOM_MANIFEST=false # Build lineage from source ENV IS_LINEAGE_BUILD false ENV IS_LINEAGE_BUILD=false # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: # * begin.sh, run at the very beginning Loading Loading @@ -191,31 +183,8 @@ RUN mkdir -p $USERSCRIPTS_DIR # Install build dependencies ############################ RUN apt-get -qq update RUN apt-get -qqy upgrade RUN apt-get install -y android-sdk-libsparse-utils bc bison bsdmainutils build-essential ccache cgpt clang cron \ curl flex g++-multilib gcc-multilib git git-crypt git-lfs gnupg gperf imagemagick kmod jq \ lib32readline-dev lib32z1-dev liblz4-tool \ libsdl1.2-dev libssl-dev libxml2 \ libxml2-utils lsof lzop maven pngcrush \ procps python3 python-is-python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \ zip zlib1g-dev # Install Python 2.7 for legacy device support RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-stdlib_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \ dpkg -i *.deb || apt-get install -f -y && \ rm -f *.deb && \ ln -sf /usr/bin/python2.7 /usr/bin/python2 RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo RUN chmod a+x /usr/local/bin/repo RUN 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 RUN 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 RUN /root/install-deps.sh RUN /root/install-latest-ccache.sh # Set the work directory ######################## Loading @@ -227,4 +196,4 @@ RUN ln -sf /proc/1/fd/1 /var/log/docker.log # Set the entry point to init.sh ################################ ENTRYPOINT /root/init.sh ENTRYPOINT ["/root/init.sh"]
Dockerfile.community +48 −79 Original line number Diff line number Diff line FROM ubuntu:24.04 MAINTAINER Romain Hunault <romain.hunault@e.email> LABEL maintainer="Romain Hunault <romain.hunault@e.email>" # Environment variables ####################### ENV MIRROR_DIR /srv/mirror ENV SRC_DIR /srv/src ENV TMP_DIR /srv/tmp ENV CCACHE_DIR /srv/ccache ENV ZIP_DIR /srv/zips ENV LMANIFEST_DIR /srv/local_manifests ENV KEYS_DIR /srv/keys ENV LOGS_DIR /srv/logs ENV USERSCRIPTS_DIR /srv/userscripts ENV MIRROR_DIR=/srv/mirror ENV SRC_DIR=/srv/src ENV TMP_DIR=/srv/tmp ENV CCACHE_DIR=/srv/ccache ENV ZIP_DIR=/srv/zips ENV LMANIFEST_DIR=/srv/local_manifests ENV KEYS_DIR=/srv/keys ENV LOGS_DIR=/srv/logs ENV USERSCRIPTS_DIR=/srv/userscripts ENV DEBIAN_FRONTEND noninteractive ENV USER root ENV DEBIAN_FRONTEND=noninteractive ENV USER=root # Configurable environment variables #################################### # By default we want to use CCACHE, you can disable this # WARNING: disabling this may slow down a lot your builds! ENV USE_CCACHE 1 # ccache maximum size. It should be a number followed by an optional suffix: k, # M, G, T (decimal), Ki, Mi, Gi or Ti (binary). The default suffix is G. Use 0 # for no limit. ENV CCACHE_SIZE 50G # We need to specify the ccache binary since it is no longer packaged along with AOSP ENV CCACHE_EXEC /usr/bin/ccache ENV USE_CCACHE=1 # Environment for the /e/ branches name # See https://github.com/LineageOS/android_vendor_cm/branches for possible options ENV BRANCH_NAME 'v1-q' ENV BRANCH_NAME='v1-q' # Environment for the device list (separate by comma if more than one) # eg. DEVICE_LIST=hammerhead,bullhead,angler ENV DEVICE_LIST '' ENV DEVICE_LIST='' # Release type string ENV RELEASE_TYPE 'UNOFFICIAL' ENV RELEASE_TYPE='UNOFFICIAL' # Repo use for build ENV REPO 'https://gitlab.e.foundation/e/os/android.git' ENV REPO='https://gitlab.e.foundation/e/os/android.git' # Repo use for build ENV MIRROR 'https://github.com/LineageOS/mirror' ENV MIRROR='https://github.com/LineageOS/mirror' # OTA URL that will be used inside CMUpdater # Use this in combination with LineageOTA to make sure your device can auto-update itself from this buildbot ENV OTA_URL '' ENV OTA_URL='' # User identity ENV USER_NAME 'LineageOS Buildbot' ENV USER_MAIL 'lineageos-buildbot@docker.host' ENV USER_NAME='LineageOS Buildbot' ENV USER_MAIL='lineageos-buildbot@docker.host' # Include proprietary files, downloaded automatically from github.com/TheMuppets/ and gitlab.com/the-muppets/ # Only some branches are supported ENV INCLUDE_PROPRIETARY true ENV INCLUDE_PROPRIETARY=true # Mount an overlay filesystem over the source dir to do each build on a clean source ENV BUILD_OVERLAY false ENV BUILD_OVERLAY=false # Clone the full LineageOS mirror (> 200 GB) ENV LOCAL_MIRROR false ENV LOCAL_MIRROR=false # If you want to preserve old ZIPs set this to 'false' ENV CLEAN_OUTDIR false ENV CLEAN_OUTDIR=false # Change this cron rule to what fits best for you # Use 'now' to start the build immediately # For example, '0 10 * * *' means 'Every day at 10:00 UTC' ENV CRONTAB_TIME 'now' ENV CRONTAB_TIME='now' # Clean artifacts output after each build ENV CLEAN_AFTER_BUILD true ENV CLEAN_AFTER_BUILD=true # Provide root capabilities builtin inside the ROM (see http://lineageos.org/Update-and-Build-Prep/) ENV WITH_SU false ENV WITH_SU=false # Provide a default JACK configuration in order to avoid out-of-memory issues ENV ANDROID_JACK_VM_ARGS "-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" ENV ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" # Custom packages to be installed ENV CUSTOM_PACKAGES '' ENV CUSTOM_PACKAGES='' # Sign the builds with the keys in $KEYS_DIR ENV SIGN_BUILDS false ENV SIGN_BUILDS=false # When SIGN_BUILDS = true but no keys have been provided, generate a new set with this subject ENV KEYS_SUBJECT '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com' ENV KEYS_SUBJECT='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com' # Move the resulting zips to $ZIP_DIR/$codename instead of $ZIP_DIR/ ENV ZIP_SUBDIR true ENV ZIP_SUBDIR=true # Write the verbose logs to $LOGS_DIR/$codename instead of $LOGS_DIR/ ENV LOGS_SUBDIR true ENV LOGS_SUBDIR=true # Delete old zips in $ZIP_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_ZIPS 0 ENV DELETE_OLD_ZIPS=0 # Delete old logs in $LOGS_DIR, keep only the N latest one (0 to disable) ENV DELETE_OLD_LOGS 0 ENV DELETE_OLD_LOGS=0 # Assume device does not use vendor_boot as recovery by default ENV VBOOT_IS_RECOVERY false ENV VBOOT_IS_RECOVERY=false # Assume device does not need additional files for recovery to boot. ENV RECOVERY_NEEDS_SUPPORT_IMG false ENV RECOVERY_NEEDS_SUPPORT_IMG=false # Assume device does not use vendor_boot for recovery to boot by default. ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG false ENV RECOVERY_NEEDS_VENDOR_BOOT_IMG=false # Assume device does not use boot.img for recovery to boot by default. ENV RECOVERY_NEEDS_BOOT_IMG false ENV RECOVERY_NEEDS_BOOT_IMG=false # Assume device does not use DTBO for recovery to boot by default. ENV RECOVERY_NEEDS_DTBO_IMG false ENV RECOVERY_NEEDS_DTBO_IMG=false # Assume device does not use VBMETA for recovery to boot by default. ENV RECOVERY_NEEDS_VBMETA_IMG false ENV RECOVERY_NEEDS_VBMETA_IMG=false # Assume device does not use super_image for recovery to boot by default. ENV RECOVERY_NEEDS_SUPER_IMG false ENV RECOVERY_NEEDS_SUPER_IMG=false # Assume device does not use vendor_kernel_boot for recovery to boot by default. ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG false ENV RECOVERY_NEEDS_VENDOR_KERNEL_BOOT_IMG=false # Force an eng build even when device name doesn't contain -eng ENV ENG_BUILD false ENV ENG_BUILD=false # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: Loading Loading @@ -174,31 +166,8 @@ RUN mkdir -p $USERSCRIPTS_DIR # Install build dependencies ############################ RUN apt-get -qq update RUN apt-get -qqy upgrade RUN apt-get install -y android-sdk-libsparse-utils bc bison bsdmainutils build-essential ccache cgpt clang cron \ curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick kmod jq \ lib32readline-dev lib32z1-dev liblz4-tool \ libsdl1.2-dev libssl-dev libxml2 \ libxml2-utils lsof lzop maven pngcrush \ procps python3 python-is-python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \ zip zlib1g-dev # Install Python 2.7 for legacy device support RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-stdlib_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \ dpkg -i *.deb || apt-get install -f -y && \ rm -f *.deb && \ ln -sf /usr/bin/python2.7 /usr/bin/python2 RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo RUN chmod a+x /usr/local/bin/repo RUN 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 RUN 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 RUN /root/install-deps.sh RUN /root/install-latest-ccache.sh # Set the work directory ######################## Loading @@ -210,4 +179,4 @@ RUN ln -sf /proc/1/fd/1 /var/log/docker.log # Set the entry point to init.sh ################################ ENTRYPOINT /root/init.sh ENTRYPOINT ["/root/init.sh"]
build-community.sh +8 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ repo_log="$LOGS_DIR/repo-$(date +%Y%m%d).log" nproc_value=$(nproc --all) JOBS=$((nproc_value > 10 ? 10 : nproc_value)) source /root/init-ccache.sh # cd to working directory cd "$SRC_DIR" Loading Loading @@ -126,6 +128,12 @@ for branch in ${BRANCH_NAME//,/ }; do elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16"$regex_part2 || "${BRANCH_NAME}" =~ "a16" ]]; then themuppets_branch="lineage-23.0" android_version="16" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16.1"$regex_part2 || "${BRANCH_NAME}" =~ "a16.1" ]]; then themuppets_branch="lineage-23.1" android_version="16" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16.2"$regex_part2 || "${BRANCH_NAME}" =~ "a16.2" ]]; then themuppets_branch="lineage-23.2" android_version="16" else echo ">> [$(date)] Building branch $branch is not (yet) suppported" exit 1 Loading Loading @@ -335,8 +343,6 @@ for branch in ${BRANCH_NAME//,/ }; do echo ">> [$(date)] Starting build for $codename, $branch branch" | tee -a "$DEBUG_LOG" build_successful=false echo ">> [$(date)] ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}" echo ">> [$(date)] Switch to Python2" ln -fs /usr/bin/python2 /usr/bin/python if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then PRODUCT_PRERELEASE=$(echo ${BRANCH_NAME} | sed -E 's/v[0-9]*\.[0-9]*(\.[0-9]*)?-(beta|alpha|rc).*/\2/') Loading Loading @@ -488,9 +494,6 @@ for branch in ${BRANCH_NAME//,/ }; do mka clean &>>"$DEBUG_LOG" fi fi echo ">> [$(date)] Switch back to Python3" ln -fs /usr/bin/python3 /usr/bin/python fi done fi Loading
src/build.sh +12 −2 Original line number Diff line number Diff line Loading @@ -83,6 +83,9 @@ exit_script() { /root/userscripts/end.sh fi # Print ccache usage after build ccache -s if [ "$build_successful" = false ] || [ "$sync_successful" = false ]; then exit 1 fi Loading @@ -91,7 +94,7 @@ exit_script() { sync_successful=true use_openjdk_from_ubuntu=false branch_dir=$(sed -E 's/^v[0-9](\.[0-9]*){0,2}(-(beta|alpha|rc)(\.[0-9]*){0,1}){0,1}-(s|t|u|a14|a15|a16)(-[a-zA-Z0-9_]*)*$/\5/' <<<"${BRANCH_NAME}") branch_dir=$(sed -E 's/^v[0-9](\.[0-9]*){0,2}(-(beta|alpha|rc)(\.[0-9]*){0,1}){0,1}-(s|t|u|a14|a15|a16\.2|a16\.1|a16)(-[a-zA-Z0-9_]*)*$/\5/' <<<"${BRANCH_NAME}") branch_dir=${branch_dir^^} default_key_dir="user-keys" Loading @@ -114,6 +117,12 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then elif [[ "${BRANCH_NAME}" =~ $regex_part1"a15"$regex_part2 || "${BRANCH_NAME}" =~ "a15" ]]; then themuppets_branch="lineage-22.2" android_version="15" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16.1"$regex_part2 || "${BRANCH_NAME}" =~ "a16.1" ]]; then themuppets_branch="lineage-23.1" android_version="16" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16.2"$regex_part2 || "${BRANCH_NAME}" =~ "a16.2" ]]; then themuppets_branch="lineage-23.2" android_version="16" elif [[ "${BRANCH_NAME}" =~ $regex_part1"a16"$regex_part2 || "${BRANCH_NAME}" =~ "a16" ]]; then themuppets_branch="lineage-23.0" android_version="16" Loading @@ -139,8 +148,9 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then mkdir -p "$CCACHE_BASE_DIR/$branch_dir" export CCACHE_DIR="$CCACHE_BASE_DIR/$branch_dir" source /root/init-ccache.sh echo ">> [$(date)] Setting up CCache, CCACHE_DIR=${CCACHE_DIR} CCACHE_SIZE=${CCACHE_SIZE}" echo ">> [$(date)] Setting up CCache, CCACHE_DIR=${CCACHE_DIR} CCACHE_SIZE=$(ccache --get-config max_size)" echo ">> [$(date)] Branch: ${BRANCH_NAME}" echo ">> [$(date)] Device: ${DEVICE}" Loading