Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 510e08ae authored by Steven Moreland's avatar Steven Moreland Committed by Android (Google) Code Review
Browse files

Merge "Split finalization scripts between vFRC and sFRC." into main

parents 4d5ac1fb 0f84e4b2
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -3,16 +3,17 @@ This folder contains automation and CI scripts for [finalizing](https://go/andro

## Automation:
1. [Environment setup](./environment.sh). Set values for varios finalization constants.
2. [Finalize SDK](./finalize-aidl-vndk-sdk-resources.sh). Prepare the branch for SDK release. SDK contains Android Java APIs and other stable APIs. Commonly referred as a 1st step.
3. [Finalize Android](./finalize-sdk-rel.sh). Mark branch as "REL", i.e. prepares for Android release. Any signed build containing these changes will be considered an official Android Release. Referred as a 2nd finalization step.
4. [Finalize SDK and submit](./step-1.sh). Do [Finalize SDK](./finalize-aidl-vndk-sdk-resources.sh) step, create CLs, organize them into topic and send to Gerrit.
5. [Finalize Android and submit](./step-2.sh). Do [Finalize Android](./finalize-sdk-rel.sh) step, create  CLs, organize them into topic and send to Gerrit.
1. [Finalize VINTF](./finalize-vintf-resources.sh). Prepare the branch for VINTF release.
1. [Finalize SDK](./finalize-sdk-resources.sh). Prepare the branch for SDK release. SDK contains Android Java APIs and other stable APIs. Commonly referred as a 1st step.
1. [Finalize Android](./finalize-sdk-rel.sh). Mark branch as "REL", i.e. prepares for Android release. Any signed build containing these changes will be considered an official Android Release. Referred as a 2nd finalization step.
1. [Finalize SDK and submit](./step-1.sh). Do Finalize VINTF and Finalize SDK step, create CLs, organize them into topic and send to Gerrit.
1. [Finalize Android and submit](./step-2.sh). Do [Finalize Android](./finalize-sdk-rel.sh) step, create  CLs, organize them into topic and send to Gerrit.

## CI:
Performed in build targets in Finalization branches.
1. [Finalization Step 1, git_main-fina-1-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-1-release). Test [1st step/Finalize SDK](./finalize-aidl-vndk-sdk-resources.sh).
3. [Finalization Step 2, git_main-fina-2-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-2-release). Test [1st step/Finalize SDK](./finalize-aidl-vndk-sdk-resources.sh) and [2nd step/Finalize Android](./finalize-sdk-rel.sh). Use [local finalization](./localonly-steps.sh) to build and copy presubmits.
5. [Local finalization steps](./localonly-steps.sh) are done only during local testing or in the CI lab. Normally these steps use artifacts from other builds.
1. [Finalization Step 1, git_main-fina-1-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-1-release). Test Finalize VINTF, Finalize SDK.
1. [Finalization Step 2, git_main-fina-2-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-2-release). Test Finalize VINTF, Finalize SDK, and [2nd step/Finalize Android](./finalize-sdk-rel.sh). Use [local finalization](./localonly-steps.sh) to build and copy presubmits.
1. [Local finalization steps](./localonly-steps.sh) are done only during local testing or in the CI lab. Normally these steps use artifacts from other builds.

## Utility:
[Full cleanup](./cleanup.sh). Remove all local changes and switch each project into head-less state. This is the best state to sync/rebase/finalize the branch.
+2 −1
Original line number Diff line number Diff line
@@ -8,7 +8,8 @@ function finalize_main_step12() {

    if [ "$FINAL_STATE" = "unfinalized" ] ; then
        # SDK codename -> int
        source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
        source $top/build/make/tools/finalization/finalize-vintf-resources.sh
        source $top/build/make/tools/finalization/finalize-sdk-resources.sh
    fi;

    if [ "$FINAL_STATE" = "unfinalized" ] || [ "$FINAL_STATE" = "sdk" ] ; then
+2 −1
Original line number Diff line number Diff line
@@ -8,7 +8,8 @@ function finalize_main_step1() {

    if [ "$FINAL_STATE" = "unfinalized" ] ; then
        # Build finalization artifacts.
        source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
        source $top/build/make/tools/finalization/finalize-vintf-resources.sh
        source $top/build/make/tools/finalization/finalize-sdk-resources.sh
    fi;
}

+0 −8
Original line number Diff line number Diff line
@@ -111,10 +111,6 @@ function finalize_aidl_vndk_sdk_resources() {
    # bionic/NDK
    finalize_bionic_ndk

    # pre-finalization build target (trunk)
    local aidl_m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_RELEASE=trunk TARGET_BUILD_VARIANT=userdebug DIST_DIR=out/dist"
    AIDL_TRANSITIVE_FREEZE=true $aidl_m aidl-freeze-api

    # TODO(b/309880485)
    # Add back create_reference_dumps and $top/build/make/target/product/gsi/current.txt

@@ -129,10 +125,6 @@ function finalize_aidl_vndk_sdk_resources() {
    local build_tools_source="$top/development/sdk/build_tools_source.prop_template"
    sed -i -e 's/Pkg\.Revision.*/Pkg\.Revision=${PLATFORM_SDK_VERSION}.0.0/g' $build_tools_source

    # build/make
    sed -i -e "s/sepolicy_major_vers := .*/sepolicy_major_vers := ${FINAL_PLATFORM_SDK_VERSION}/g" "$top/build/make/core/config.mk"
    cp "$top/build/make/target/product/gsi/current.txt" "$top/build/make/target/product/gsi/$FINAL_PLATFORM_SDK_VERSION.txt"

    # build/bazel
    local codename_version="\"${FINAL_PLATFORM_CODENAME}\": ${FINAL_PLATFORM_SDK_VERSION}"
    if ! grep -q "$codename_version" "$top/build/bazel/rules/common/api_constants.bzl" ; then
+22 −0
Original line number Diff line number Diff line
#!/bin/bash

set -ex

function finalize_vintf_resources() {
    local top="$(dirname "$0")"/../../../..
    source $top/build/make/tools/finalization/environment.sh

    # TODO(b/314010764): finalize LL_NDK
    # TODO(b/314010177): finalize SELinux

    # pre-finalization build target (trunk)
    local aidl_m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_RELEASE=trunk TARGET_BUILD_VARIANT=userdebug DIST_DIR=out/dist"
    AIDL_TRANSITIVE_FREEZE=true $aidl_m aidl-freeze-api

    # build/make
    sed -i -e "s/sepolicy_major_vers := .*/sepolicy_major_vers := ${FINAL_PLATFORM_SDK_VERSION}/g" "$top/build/make/core/config.mk"
    cp "$top/build/make/target/product/gsi/current.txt" "$top/build/make/target/product/gsi/$FINAL_PLATFORM_SDK_VERSION.txt"
}

finalize_vintf_resources
Loading