ADD: added new version of protobuf
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
@rem enter repo root
|
||||
cd /d %~dp0\..\..\..
|
||||
|
||||
call kokoro\windows\prepare_build_win64.bat || goto :error
|
||||
|
||||
@rem Allow Bazel to create short paths.
|
||||
fsutil 8dot3name set 0
|
||||
|
||||
@rem TODO(b/241475022) Use docker to guarantee better stability.
|
||||
|
||||
@rem Reinstall Bazel due to corrupt installation in kokoro.
|
||||
bazel version
|
||||
choco install bazel -y -i --version 5.1.0
|
||||
bazel version
|
||||
|
||||
@rem Set invocation ID so that bazel run is known to kokoro
|
||||
uuidgen > %KOKORO_ARTIFACTS_DIR%\bazel_invocation_ids
|
||||
SET /p BAZEL_INTERNAL_INVOCATION_ID=<%KOKORO_ARTIFACTS_DIR%\bazel_invocation_ids
|
||||
|
||||
@rem Make paths as short as possible to avoid long path issues.
|
||||
set BAZEL_STARTUP=--output_user_root=C:/tmp --windows_enable_symlinks
|
||||
set BAZEL_FLAGS=--enable_runfiles --keep_going --test_output=errors ^
|
||||
--verbose_failures ^
|
||||
--invocation_id=%BAZEL_INTERNAL_INVOCATION_ID% ^
|
||||
--google_credentials=%KOKORO_BAZEL_AUTH_CREDENTIAL% ^
|
||||
--remote_cache=https://storage.googleapis.com/protobuf-bazel-cache/%KOKORO_JOB_NAME%
|
||||
|
||||
@rem Build libraries first.
|
||||
bazel %BAZEL_STARTUP% build //:protoc //:protobuf //:protobuf_lite %BAZEL_FLAGS% || goto :error
|
||||
|
||||
@rem Run C++ tests.
|
||||
@rem TODO(b/241484899) Enable conformance tests on windows.
|
||||
bazel %BAZEL_STARTUP% test %BAZEL_FLAGS% ^
|
||||
--test_tag_filters=-conformance --build_tag_filters=-conformance ^
|
||||
//src/... @com_google_protobuf_examples//... || goto :error
|
||||
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
echo Failed!
|
||||
exit /b 1
|
||||
@@ -1,27 +0,0 @@
|
||||
# Config file for running tests in Kokoro
|
||||
|
||||
# Location of the build script in repository
|
||||
build_file: "protobuf/kokoro/windows/bazel/build.bat"
|
||||
timeout_mins: 1440
|
||||
|
||||
before_action {
|
||||
fetch_keystore {
|
||||
keystore_resource {
|
||||
keystore_config_id: 77103
|
||||
keyname: "kokoro_gcp_service"
|
||||
}
|
||||
}
|
||||
}
|
||||
bazel_setting {
|
||||
project_id: "protobuf-build"
|
||||
bes_backend_address: "buildeventservice.googleapis.com"
|
||||
foundry_backend_address: "remotebuildexecution.googleapis.com"
|
||||
upsalite_frontend_address: "https://source.cloud.google.com"
|
||||
local_execution: true
|
||||
|
||||
# Need to be same as the fetch_keystore entry in the previous step.
|
||||
auth_credential: {
|
||||
keystore_config_id: 77103
|
||||
keyname: "kokoro_gcp_service"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
@@ -1 +0,0 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
@@ -1,33 +0,0 @@
|
||||
@rem enter repo root
|
||||
cd /d %~dp0\..\..\..
|
||||
|
||||
call kokoro\windows\prepare_build_win64.bat || goto :error
|
||||
|
||||
@rem TODO(b/241475022) Use docker to guarantee better stability.
|
||||
@rem TODO(b/241484899) Run conformance tests in windows.
|
||||
|
||||
md build
|
||||
md %KOKORO_ARTIFACTS_DIR%\logs
|
||||
|
||||
cd build
|
||||
|
||||
cmake .. ^
|
||||
-G "Visual Studio 15 2017" -A x64 ^
|
||||
-Dprotobuf_BUILD_EXAMPLES=ON ^
|
||||
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
|
||||
-Dprotobuf_WITH_ZLIB=OFF ^
|
||||
-Dprotobuf_TEST_XML_OUTDIR=%KOKORO_ARTIFACTS_DIR%\logs\ || goto :error
|
||||
|
||||
cmake --build . || goto :error
|
||||
|
||||
ctest --verbose -C Debug || goto :error
|
||||
|
||||
goto :success
|
||||
|
||||
:error
|
||||
cd /d %~dp0\..\..\..
|
||||
echo Failed!
|
||||
exit /b 1
|
||||
|
||||
:success
|
||||
cd ..
|
||||
@@ -1,5 +0,0 @@
|
||||
# Config file for running tests in Kokoro
|
||||
|
||||
# Location of the build script in repository
|
||||
build_file: "protobuf/kokoro/windows/cmake/build.bat"
|
||||
timeout_mins: 1440
|
||||
@@ -1 +0,0 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
@@ -1 +0,0 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
@@ -1,45 +0,0 @@
|
||||
@rem enter repo root
|
||||
cd /d %~dp0\..\..\..
|
||||
|
||||
call kokoro\windows\prepare_build_win64.bat || goto :error
|
||||
|
||||
@rem TODO(b/241475022) Use docker to guarantee better stability.
|
||||
@rem TODO(b/241484899) Run conformance tests in windows.
|
||||
|
||||
md build
|
||||
md %KOKORO_ARTIFACTS_DIR%\logs
|
||||
|
||||
cd build
|
||||
|
||||
@rem First install protobuf from source.
|
||||
cmake .. ^
|
||||
-G "Visual Studio 15 2017" -A x64 ^
|
||||
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
|
||||
-Dprotobuf_WITH_ZLIB=OFF || goto :error
|
||||
|
||||
cmake --build . --target install || goto :error
|
||||
|
||||
@rem Next run tests forcing the use of our installation.
|
||||
|
||||
rm -rf *
|
||||
|
||||
cmake .. ^
|
||||
-G "Visual Studio 15 2017" -A x64 ^
|
||||
-Dprotobuf_REMOVE_INSTALLED_HEADERS=ON ^
|
||||
-Dprotobuf_BUILD_PROTOBUF_BINARIES=OFF ^
|
||||
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
|
||||
-Dprotobuf_TEST_XML_OUTDIR=%KOKORO_ARTIFACTS_DIR%\logs\ || goto :error
|
||||
|
||||
cmake --build . --target ALL_BUILD || goto :error
|
||||
|
||||
ctest --verbose -C Debug || goto :error
|
||||
|
||||
goto :success
|
||||
|
||||
:error
|
||||
cd /d %~dp0\..\..\..
|
||||
echo Failed!
|
||||
exit /b 1
|
||||
|
||||
:success
|
||||
cd ..
|
||||
@@ -1,5 +0,0 @@
|
||||
# Config file for running tests in Kokoro
|
||||
|
||||
# Location of the build script in repository
|
||||
build_file: "protobuf/kokoro/windows/cmake_install/build.bat"
|
||||
timeout_mins: 1440
|
||||
@@ -1 +0,0 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
@@ -1 +0,0 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
@@ -1,33 +0,0 @@
|
||||
@rem enter repo root
|
||||
cd /d %~dp0\..\..\..
|
||||
|
||||
call kokoro\windows\prepare_build_win64.bat || goto :error
|
||||
|
||||
@rem TODO(b/241475022) Use docker to guarantee better stability.
|
||||
@rem TODO(b/241484899) Run conformance tests in windows.
|
||||
|
||||
md build
|
||||
md %KOKORO_ARTIFACTS_DIR%\logs
|
||||
|
||||
cd build
|
||||
|
||||
cmake .. ^
|
||||
-G "Visual Studio 15 2017" -A x64 ^
|
||||
-Dprotobuf_BUILD_SHARED_LIBS=ON ^
|
||||
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
|
||||
-Dprotobuf_WITH_ZLIB=OFF ^
|
||||
-Dprotobuf_TEST_XML_OUTDIR=%KOKORO_ARTIFACTS_DIR%\logs\ || goto :error
|
||||
|
||||
cmake --build . || goto :error
|
||||
|
||||
ctest --verbose -C Debug || goto :error
|
||||
|
||||
goto :success
|
||||
|
||||
:error
|
||||
cd /d %~dp0\..\..\..
|
||||
echo Failed!
|
||||
exit /b 1
|
||||
|
||||
:success
|
||||
cd ..
|
||||
@@ -1,5 +0,0 @@
|
||||
# Config file for running tests in Kokoro
|
||||
|
||||
# Location of the build script in repository
|
||||
build_file: "protobuf/kokoro/windows/cmake_shared/build.bat"
|
||||
timeout_mins: 1440
|
||||
@@ -1 +0,0 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
@@ -1 +0,0 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Config file for running tests in Kokoro
|
||||
|
||||
# Location of the build script in repository
|
||||
build_file: "protobuf/kokoro/windows/csharp/build.bat"
|
||||
timeout_mins: 1440
|
||||
@@ -1 +1,5 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
# Config file for running tests in Kokoro
|
||||
|
||||
# Location of the build script in repository
|
||||
build_file: "protobuf/kokoro/windows/csharp/build.bat"
|
||||
timeout_mins: 1440
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
# Config file for running tests in Kokoro
|
||||
|
||||
# Location of the build script in repository
|
||||
build_file: "protobuf/kokoro/windows/csharp/build.bat"
|
||||
timeout_mins: 1440
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
@rem Update Chocolatey
|
||||
choco upgrade -y --no-progress chocolatey
|
||||
choco install -y --no-progress --pre cmake
|
||||
|
||||
@rem Enable long paths.
|
||||
Powershell.exe -Command "New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1 -PropertyType DWORD -Force"
|
||||
|
||||
@rem Update git submodules.
|
||||
git submodule update --init --recursive
|
||||
|
||||
@rem Select Visual Studio 2017.
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
|
||||
@rem Convert Windows line breaks to Unix line breaks
|
||||
@rem This allows text-matching tests to pass
|
||||
find . -type f -print0 | xargs -0 d2u
|
||||
Reference in New Issue
Block a user