blob: 7afac0350b1efb43027015565cacd0db56e4e828 [file] [log] [blame]
name: GN
description: Generates and checks GN.
runs:
using: "composite"
steps:
- name: Configure Environment
shell: bash
run: |
echo "PYTHONPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Set up Cloud SDK
if: startsWith(${{matrix.target_platform}}, 'android')
uses: isarkis/setup-gcloud@40dce7857b354839efac498d3632050f568090b6 # v1.1.1
- name: Configure Android Environment
shell: bash
if: startsWith(${{matrix.target_platform}}, 'android')
run: |
echo "ANDROID_HOME=/root/starboard-toolchains/AndroidSdk/" >> $GITHUB_ENV
echo "COBALT_GRADLE_BUILD_COUNT=24" >> $GITHUB_ENV
PROJECT_NAME=$(gcloud config get-value project)
echo "GCS_NIGHTLY_PATH=gs://${PROJECT_NAME}-build-artifacts" >> $GITHUB_ENV
- name: GN
run: |
set -x
extra_arguments="${{matrix.extra_gn_arguments}}"
if [ -z ${COBALT_BOOTLOADER+x} ]; then
BUILD_PLATFORM=${{ matrix.target_platform }}
else
BUILD_PLATFORM=${COBALT_BOOTLOADER}
if [ ! -z "${{matrix.bootloader_extra_gn_arguments}}" ]
then
extra_arguments="${{matrix.bootloader_extra_gn_arguments}}"
fi
fi
gn gen $GITHUB_WORKSPACE/out/${BUILD_PLATFORM}_${{matrix.config}} --args="target_platform=\"${BUILD_PLATFORM}\" ${{matrix.sb_api_version}} ${{matrix.target_os}} ${{matrix.target_cpu}} ${extra_arguments} is_internal_build=false build_type=\"${{matrix.config}}\""
gn check $GITHUB_WORKSPACE/out/${BUILD_PLATFORM}_${{ matrix.config }}
shell: bash