Skip to content

Commit 5ca920c

Browse files
committed
Add option to integration_tests workflow to build tests using openssl or boringssl.
1 parent 628cb6e commit 5ca920c

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/integration_tests.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
ios_version:
2828
description: 'iOS device version'
2929
default: '13.3'
30+
desktop_ssl_variants:
31+
description: 'Which SSL variants to build desktop SDK with'
32+
default: 'openssl,boringssl'
33+
required: true
3034

3135
jobs:
3236
# To feed input into the job matrix, we first need to convert to a JSON
@@ -36,6 +40,7 @@ jobs:
3640
outputs:
3741
matrix_os: ${{ steps.set-matrix-os.outputs.matrix_os }}
3842
matrix_platform: ${{ steps.set-matrix-os.outputs.matrix_platform }}
43+
matrix_ssl: ${{ steps.set-matrix-os.outputs.matrix_ssl }}
3944
steps:
4045
- id: set-matrix-os
4146
# e.g. 'ubuntu-latest,macos-latest' -> '["ubuntu-latest","macos-latest"]'
@@ -44,6 +49,8 @@ jobs:
4449
echo "::set-output name=matrix_os::${OS_JSON}"
4550
PLATFORM_JSON=[\"$(echo ${{ github.event.inputs.platforms }} | sed 's/,/","/g')\"]
4651
echo "::set-output name=matrix_platform::${PLATFORM_JSON}"
52+
SSL_JSON=[\"$(echo ${{ github.event.inputs.desktop_ssl_variants }} | sed 's/,/","/g')\"]
53+
echo "::set-output name=matrix_ssl::${SSL_JSON}"
4754
tests:
4855
name: ${{ matrix.os }}-${{ matrix.target_platform }}
4956
needs: prepare_matrix
@@ -53,11 +60,16 @@ jobs:
5360
matrix:
5461
os: ${{ fromJson(needs.prepare_matrix.outputs.matrix_os) }}
5562
target_platform: ${{ fromJson(needs.prepare_matrix.outputs.matrix_platform) }}
63+
ssl_variant: ${{ fromJson(needs.prepare_matrix.outputs.matrix_ssl) }}
5664
exclude:
5765
- os: ubuntu-latest
5866
target_platform: iOS
5967
- os: windows-latest
6068
target_platform: iOS
69+
- target_platform: iOS
70+
ssl_variant: boringssl
71+
- target_platform: Android
72+
ssl_variant: boringssl
6173

6274
steps:
6375
- uses: actions/checkout@v2
@@ -118,7 +130,11 @@ jobs:
118130
119131
- name: Build integration tests
120132
run: |
121-
python scripts/gha/build_testapps.py --t ${{ github.event.inputs.apis }} --p ${{ matrix.target_platform }} --output_directory ${{ github.workspace }} --use_vcpkg --noadd_timestamp
133+
ssl_option=
134+
if [[ "${{ matrix.ssl_variant }}" == "boringssl" ]]; then
135+
ssl_option=--cmake_flag=-DFIREBASE_USE_BORINGSSL=ON
136+
fi
137+
python scripts/gha/build_testapps.py --t ${{ github.event.inputs.apis }} --p ${{ matrix.target_platform }} --output_directory ${{ github.workspace }} --use_vcpkg --noadd_timestamp ${ssl_option}
122138
123139
- name: Run desktop integration tests
124140
if: matrix.target_platform == 'Desktop' && !cancelled()

scripts/gha/build_testapps.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@
159159
" Will install vcpkg, use it to install dependencies, and then configure"
160160
" CMake to use it.")
161161

162+
flags.DEFINE_multi_string(
163+
"cmake_flag", None,
164+
"Pass an additional flag to the CMake configure step."
165+
" This option can be specified multiple times.")
162166

163167
flags.register_validator(
164168
"platforms",
@@ -205,6 +209,9 @@ def main(argv):
205209
"-DVCPKG_TARGET_TRIPLET=%s" % utils.get_vcpkg_triplet(arch="x64")
206210
))
207211

212+
if FLAGS.cmake_flag:
213+
cmake_flags.extend(FLAGS.cmake_flag)
214+
208215
failures = []
209216
for testapp in testapps:
210217
logging.info("BEGIN building for %s", testapp)

0 commit comments

Comments
 (0)