Skip to content

Commit 1aee8c6

Browse files
cynthiajoanCynthia Jiang
andauthored
Add the gha tag into the build so it would register correctly for heartbeat (#448)
* update readme * update with comments * tiny update * add cmake build by gha flag in the workflow Co-authored-by: Cynthia Jiang <[email protected]>
1 parent 26e9b56 commit 1aee8c6

File tree

6 files changed

+9
-5
lines changed

6 files changed

+9
-5
lines changed

.github/workflows/build_android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
shell: bash
141141
run: |
142142
# TODO add handling cmake_extras
143-
python scripts/build_scripts/build_zips.py --platform=android --unity_root=$UNITY_ROOT_DIR --apis=${{ inputs.apis }}
143+
python scripts/build_scripts/build_zips.py --gha --platform=android --unity_root=$UNITY_ROOT_DIR --apis=${{ inputs.apis }}
144144
145145
- name: Check zip file
146146
shell: bash

.github/workflows/build_ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
shell: bash
115115
run: |
116116
# TODO add handling cmake_extras
117-
python scripts/build_scripts/build_zips.py --platform=ios --unity_root=$UNITY_ROOT_DIR --apis=${{ inputs.apis }}
117+
python scripts/build_scripts/build_zips.py --gha --platform=ios --unity_root=$UNITY_ROOT_DIR --apis=${{ inputs.apis }}
118118
119119
- name: Check zip file
120120
shell: bash

.github/workflows/build_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
shell: bash
121121
run: |
122122
# TODO add handling cmake_extras
123-
python scripts/build_scripts/build_zips.py --platform=linux --use_boringssl=true --unity_root=$UNITY_ROOT_DIR --apis=${{ inputs.apis }} --gen_documentation_zip
123+
python scripts/build_scripts/build_zips.py --gha --platform=linux --use_boringssl=true --unity_root=$UNITY_ROOT_DIR --apis=${{ inputs.apis }} --gen_documentation_zip
124124
125125
- name: Check zip files
126126
shell: bash

.github/workflows/build_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
shell: bash
127127
run: |
128128
# TODO add handling cmake_extras
129-
python scripts/build_scripts/build_zips.py --platform=macos --unity_root=$UNITY_ROOT_DIR --use_boringssl --architecture=x86_64 --architecture=arm64 --apis=${{ inputs.apis }}
129+
python scripts/build_scripts/build_zips.py --gha --platform=macos --unity_root=$UNITY_ROOT_DIR --use_boringssl --architecture=x86_64 --architecture=arm64 --apis=${{ inputs.apis }}
130130
131131
- name: Check zip file
132132
shell: bash

.github/workflows/build_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
shell: bash
127127
run: |
128128
# TODO add handling cmake_extras
129-
python scripts/build_scripts/build_zips.py --platform=windows --unity_root="$UNITY_ROOT_DIR" --swig_dir="$SWIG_DIR" --apis=${{ inputs.apis }}
129+
python scripts/build_scripts/build_zips.py --gha --platform=windows --unity_root="$UNITY_ROOT_DIR" --swig_dir="$SWIG_DIR" --apis=${{ inputs.apis }}
130130
131131
- name: Check zip file
132132
shell: bash

scripts/build_scripts/build_zips.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
flags.DEFINE_bool("verbose", False, "If verbose, cmake build with DCMAKE_VERBOSE_MAKEFILE=1")
103103
flags.DEFINE_string("swig_dir", None, "If pass in swig dir directly rather than find swig by cmake")
104104
flags.DEFINE_bool("gen_documentation_zip", False, "Also generate a zip file containing files to document")
105+
flags.DEFINE_bool("gha", False, "True if the build is triggered by Github Action.")
105106

106107
def get_build_path(platform, clean_build=False):
107108
"""Get the folder that cmake configure and build in.
@@ -574,6 +575,9 @@ def main(argv):
574575
"-DFIREBASE_CPP_BUILD_STUB_TESTS=ON",
575576
])
576577

578+
if FLAGS.gha:
579+
cmake_setup_args.append("-DFIREBASE_GITHUB_ACTION_BUILD=ON")
580+
577581
unity_root_args = get_unity_engine_folder_args(FLAGS.unity_root)
578582
if unity_root_args:
579583
cmake_setup_args.append(unity_root_args)

0 commit comments

Comments
 (0)