Skip to content

Commit ce8f3d3

Browse files
markchandlera-maurice
authored andcommitted
Firebase cpp: Updated kokoro team job to use tasks (like unity) instead of separate jobs
PiperOrigin-RevId: 273351787
1 parent 4cae565 commit ce8f3d3

File tree

5 files changed

+137
-12
lines changed

5 files changed

+137
-12
lines changed

test_android.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2019 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Builds and runs the tests, meant to be used on a Linux environment.
18+
19+
# Fail on any error.
20+
set -e
21+
# Display commands being run.
22+
set -x
23+
24+
./gradlew :app:assembleRelease
25+
26+

test_mac_ios.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2019 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Builds and runs the tests, meant to be used on a Linux environment.
18+
19+
# Fail on any error.
20+
set -e
21+
# Display commands being run.
22+
set -x
23+
24+
# Make a directory to work in
25+
mkdir -p mac_ios_build
26+
cd mac_ios_build
27+
28+
# Configure cmake with tests enabled
29+
# and disable use of libsecret due to not working on kokoro builders
30+
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.cmake .. -DFIREBASE_CPP_BUILD_TESTS=ON -DFIREBASE_FORCE_FAKE_SECURE_STORAGE=ON
31+
32+
# Build the SDK and the tests
33+
cmake --build .
34+
35+
# Run the tests
36+
ctest --verbose

test_macos.sh renamed to test_mac_x64.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ set -e
2222
set -x
2323

2424
# Make a directory to work in
25-
mkdir -p macos_build
26-
cd macos_build
25+
mkdir -p mac_x64_build
26+
cd mac_x64_build
2727

2828
# Configure cmake with tests enabled
2929
# and disable use of libsecret due to not working on kokoro builders

test_windows.bat renamed to test_windows_x32.bat

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,9 @@ IF EXIST "C:\Program Files (x86)\OpenSSL-Win32" (
3030
EXIT /B -1
3131
)
3232

33-
IF EXIST "C:\Program Files\OpenSSL-Win64" (
34-
SET OPENSSL_x64=C:/Program Files/OpenSSL-Win64
35-
) ELSE (
36-
ECHO ERROR: Cant find open ssl x64
37-
EXIT /B -1
38-
)
39-
4033
CALL :BUILD x32, "%OPENSSL_x32%", ""
4134
if %errorlevel% neq 0 (SET status=%errorlevel%)
4235

43-
CALL :BUILD x64, "%OPENSSL_x64%", "-A x64"
44-
if %errorlevel% neq 0 (SET status=%errorlevel%)
45-
4636
EXIT /B %status%
4737

4838
:BUILD

test_windows_x64.bat

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
@echo off
2+
3+
REM !/bin/bash
4+
REM
5+
REM Copyright 2019 Google LLC
6+
REM
7+
REM Licensed under the Apache License, Version 2.0 (the "License");
8+
REM you may not use this file except in compliance with the License.
9+
REM You may obtain a copy of the License at
10+
REM
11+
REM http://www.apache.org/licenses/LICENSE-2.0
12+
REM
13+
REM Unless required by applicable law or agreed to in writing, software
14+
REM distributed under the License is distributed on an "AS IS" BASIS,
15+
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
REM See the License for the specific language governing permissions and
17+
REM limitations under the License.
18+
REM
19+
REM Builds and packs firebase unity meant to be used on a Windows environment.
20+
21+
SETLOCAL
22+
23+
SET status=0
24+
set PROTOBUF_SRC_ROOT_FOLDER=%PROTOBUF_SRC_ROOT_FOLDER:\=/%
25+
26+
IF EXIST "C:\Program Files\OpenSSL-Win64" (
27+
SET OPENSSL_x64=C:/Program Files/OpenSSL-Win64
28+
) ELSE (
29+
ECHO ERROR: Cant find open ssl x64
30+
EXIT /B -1
31+
)
32+
33+
CALL :BUILD x64, "%OPENSSL_x64%", "-A x64"
34+
if %errorlevel% neq 0 (SET status=%errorlevel%)
35+
36+
EXIT /B %status%
37+
38+
:BUILD
39+
ECHO #################################################################
40+
DATE /T
41+
TIME /T
42+
ECHO Building config '%~1' with option '%~3'.
43+
ECHO #################################################################
44+
45+
@echo on
46+
47+
mkdir windows_%~1
48+
pushd windows_%~1
49+
50+
cmake .. -DFIREBASE_CPP_BUILD_TESTS=ON -DPROTOBUF_SRC_ROOT_FOLDER=%PROTOBUF_SRC_ROOT_FOLDER% -DOPENSSL_ROOT_DIR="%~2" %~3
51+
52+
:: Check for errors, and return if there were any
53+
if %errorlevel% neq 0 (
54+
popd
55+
@echo off
56+
exit /b %errorlevel%
57+
)
58+
59+
cmake --build . --config Release
60+
61+
:: Again, check for errors, and return if there were any
62+
if %errorlevel% neq 0 (
63+
popd
64+
@echo off
65+
exit /b %errorlevel%
66+
)
67+
68+
:: Run the tests
69+
ctest --verbose %CTEST_SKIP_FILTER%
70+
71+
popd
72+
@echo off
73+
EXIT /B %errorlevel%

0 commit comments

Comments
 (0)