Skip to content

Commit b604fd0

Browse files
committed
Unix2dos
1 parent 2cec6d2 commit b604fd0

File tree

3 files changed

+151
-1
lines changed

3 files changed

+151
-1
lines changed

buildscripts/kokoro/android.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ cd $BASE_DIR/github/grpc-java
103103
./gradlew clean
104104
git checkout HEAD^
105105
./gradlew --stop # use a new daemon to build the previous commit
106-
GRADLE_FLAGS="${GRADLE_FLAGS} -PskipCodegen=true"
106+
GRADLE_FLAGS="${GRADLE_FLAGS} -PskipCodegen=true" # skip codegen for build from previous commit since it wasn't built with --std=c++14 when making this change
107107
./gradlew publishToMavenLocal $GRADLE_FLAGS
108108
cd examples/android/helloworld/
109109
../../gradlew build $GRADLE_FLAGS

buildscripts/kokoro/windows32.bat

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
@rem ##########################################################################
2+
@rem
3+
@rem Runs tests and then builds artifacts to %WORKSPACE%\artifacts\
4+
@rem
5+
@rem ##########################################################################
6+
7+
type c:\VERSION
8+
9+
@rem Enter repo root
10+
cd /d %~dp0\..\..
11+
12+
set WORKSPACE=T:\src\github\grpc-java
13+
set ESCWORKSPACE=%WORKSPACE:\=\\%
14+
15+
16+
@rem Clear JAVA_HOME to prevent a different Java version from being used
17+
set JAVA_HOME=
18+
19+
mkdir grpc-java-helper32
20+
cd grpc-java-helper32
21+
call "%VS170COMNTOOLS%\..\..\VC\Auxiliary\Build\vcvars32.bat" || exit /b 1
22+
call "%WORKSPACE%\buildscripts\make_dependencies.bat" || exit /b 1
23+
24+
cd "%WORKSPACE%"
25+
26+
SET TARGET_ARCH=x86_32
27+
SET FAIL_ON_WARNINGS=true
28+
SET PROTOBUF_VER=22.5
29+
SET PKG_CONFIG_PATH=%ESCWORKSPACE%\\grpc-java-helper32\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\lib\\pkgconfig
30+
SET VC_PROTOBUF_LIBS=/LIBPATH:%ESCWORKSPACE%\\grpc-java-helper32\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\lib
31+
SET VC_PROTOBUF_INCLUDE=%ESCWORKSPACE%\\grpc-java-helper32\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\include
32+
call :Get_Libs
33+
SET GRADLE_FLAGS=-PtargetArch=%TARGET_ARCH% -PfailOnWarnings=%FAIL_ON_WARNINGS% -PvcProtobufLibs=%VC_PROTOBUF_LIBS% -PvcProtobufInclude=%VC_PROTOBUF_INCLUDE% -PskipAndroid=true
34+
SET GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1g'"
35+
36+
cmd.exe /C "%WORKSPACE%\gradlew.bat %GRADLE_FLAGS% build"
37+
set GRADLEEXIT=%ERRORLEVEL%
38+
39+
@rem Rename test results .xml files to format parsable by Kokoro
40+
@echo off
41+
for /r %%F in (TEST-*.xml) do (
42+
mkdir "%%~dpnF"
43+
move "%%F" "%%~dpnF\sponge_log.xml" >NUL
44+
)
45+
@echo on
46+
47+
IF NOT %GRADLEEXIT% == 0 (
48+
exit /b %GRADLEEXIT%
49+
)
50+
51+
@rem make sure no daemons have any files open
52+
cmd.exe /C "%WORKSPACE%\gradlew.bat --stop"
53+
54+
cmd.exe /C "%WORKSPACE%\gradlew.bat %GRADLE_FLAGS% -Dorg.gradle.parallel=false -PrepositoryDir=%WORKSPACE%\artifacts clean grpc-compiler:build grpc-compiler:publish" || exit /b 1
55+
56+
goto :eof
57+
:Get_Libs
58+
SetLocal EnableDelayedExpansion
59+
set "libs_list="
60+
for /f "tokens=*" %%a in ('pkg-config --libs protobuf') do (
61+
for %%b in (%%a) do (
62+
set lib=%%b
63+
set libfirst2char=!lib:~0,2!
64+
if !libfirst2char!==-l (
65+
@rem remove the leading -l
66+
set lib=!lib:~2!
67+
@rem remove spaces
68+
set lib=!lib: =!
69+
@rem Because protobuf is specified as libprotobuf and elsewhere
70+
if !lib! NEQ protobuf (
71+
set lib=!lib!.lib
72+
if "!libs_list!"=="" (
73+
set libs_list=!lib!
74+
) else (
75+
set libs_list=!libs_list!,!lib!
76+
)
77+
)
78+
)
79+
)
80+
)
81+
EndLocal & set "VC_PROTOBUF_LIBS=%VC_PROTOBUF_LIBS%,%libs_list%"
82+
exit /b 0
83+

buildscripts/kokoro/windows64.bat

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@rem ##########################################################################
2+
@rem
3+
@rem Builds artifacts for x86_64 into %WORKSPACE%\artifacts\
4+
@rem
5+
@rem ##########################################################################
6+
7+
type c:\VERSION
8+
9+
@rem Enter repo root
10+
cd /d %~dp0\..\..
11+
12+
set WORKSPACE=T:\src\github\grpc-java
13+
set ESCWORKSPACE=%WORKSPACE:\=\\%
14+
15+
@rem Clear JAVA_HOME to prevent a different Java version from being used
16+
set JAVA_HOME=
17+
18+
mkdir grpc-java-helper64
19+
cd grpc-java-helper64
20+
call "%VS170COMNTOOLS%\..\..\VC\Auxiliary\Build\vcvars64.bat" || exit /b 1
21+
call "%WORKSPACE%\buildscripts\make_dependencies.bat" || exit /b 1
22+
23+
cd "%WORKSPACE%"
24+
25+
SET TARGET_ARCH=x86_64
26+
SET FAIL_ON_WARNINGS=true
27+
SET PROTOBUF_VER=22.5
28+
SET PKG_CONFIG_PATH=%ESCWORKSPACE%\\grpc-java-helper64\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\lib\\pkgconfig
29+
SET VC_PROTOBUF_LIBS=/LIBPATH:%ESCWORKSPACE%\\grpc-java-helper64\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\lib
30+
SET VC_PROTOBUF_INCLUDE=%ESCWORKSPACE%\\grpc-java-helper64\\protobuf-%PROTOBUF_VER%\\build\\protobuf-%PROTOBUF_VER%\\include
31+
call :Get_Libs
32+
SET GRADLE_FLAGS=-PtargetArch=%TARGET_ARCH% -PfailOnWarnings=%FAIL_ON_WARNINGS% -PvcProtobufLibs=%VC_PROTOBUF_LIBS% -PvcProtobufInclude=%VC_PROTOBUF_INCLUDE% -PskipAndroid=true
33+
SET GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1g'"
34+
35+
@rem make sure no daemons have any files open
36+
cmd.exe /C "%WORKSPACE%\gradlew.bat --stop"
37+
38+
cmd.exe /C "%WORKSPACE%\gradlew.bat %GRADLE_FLAGS% -Dorg.gradle.parallel=false -PrepositoryDir=%WORKSPACE%\artifacts grpc-compiler:clean grpc-compiler:build grpc-compiler:publish" || exit /b 1
39+
40+
goto :eof
41+
:Get_Libs
42+
SetLocal EnableDelayedExpansion
43+
set "libs_list="
44+
for /f "tokens=*" %%a in ('pkg-config --libs protobuf') do (
45+
for %%b in (%%a) do (
46+
set lib=%%b
47+
set libfirst2char=!lib:~0,2!
48+
if !libfirst2char!==-l (
49+
@rem remove the leading -l
50+
set lib=!lib:~2!
51+
@rem remove spaces
52+
set lib=!lib: =!
53+
@rem Because protobuf is specified as libprotobuf and elsewhere
54+
if !lib! NEQ protobuf (
55+
set lib=!lib!.lib
56+
if "!libs_list!"=="" (
57+
set libs_list=!lib!
58+
) else (
59+
set libs_list=!libs_list!,!lib!
60+
)
61+
)
62+
)
63+
)
64+
)
65+
EndLocal & set "VC_PROTOBUF_LIBS=%VC_PROTOBUF_LIBS%,%libs_list%"
66+
exit /b 0
67+

0 commit comments

Comments
 (0)