forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathotel_sdk_build.cmd
More file actions
61 lines (49 loc) · 1.85 KB
/
otel_sdk_build.cmd
File metadata and controls
61 lines (49 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@echo off
setlocal
cd /d "%~dp0"
if "%__BAZEL__%"=="" IF EXIST "%LOCALAPPDATA%\Microsoft\WinGet\Links\bazelisk.exe" set __BAZEL__=%LOCALAPPDATA%\Microsoft\WinGet\Links\bazelisk.exe
if "%__BAZEL__%"=="" IF EXIST "%LOCALAPPDATA%\Microsoft\WinGet\Links\bazel.exe" set __BAZEL__=%LOCALAPPDATA%\Microsoft\WinGet\Links\bazel.exe
if "%__BAZEL__%"=="" set __BAZEL__=bazel
echo BAZEL="%__BAZEL__%"
"%__BAZEL__%" version
if "%1"=="" goto:all
if "%1"=="test" goto:test
if "%1"=="zip" goto:zip
if "%1"=="minimal" goto:minimal
if "%1"=="shutdown" goto:shutdown
endlocal
goto:eof
:all
"%__BAZEL__%" test --profile=0.nodll.tracing.json -k --//:with_dll=false -- ... || goto:error
call:test
call:zip
call:shutdown
goto:eof
:test_no_dll
goto:eof
:test
"%__BAZEL__%" run --profile=5.pkgk.tracing.json -k --//:with_dll=true make_otel_sdk || goto:error
"%__BAZEL__%" build --profile=1.all.tracing.json --//:with_dll=true -- ... -otel_sdk_zip || goto:error
"%__BAZEL__%" test --profile=2.dbg.tracing.json --//:with_dll=true -c dbg -- ... -otel_sdk_zip || goto:error
"%__BAZEL__%" test --profile=3.fastbuild.tracing.json --//:with_dll=true -c fastbuild -- ... -otel_sdk_zip || goto:error
"%__BAZEL__%" test --profile=4.opt.tracing.json --//:with_dll=true -c opt -- ... -otel_sdk_zip || goto:error
goto:eof
:minimal
"%__BAZEL__%" build --profile=min.dll.tracing.json --//:with_dll=true otel_sdk_d otel_sdk_rd otel_sdk_r || goto:error
"%__BAZEL__%" test --profile=min.nodll.tracing.json --//:with_dll=true //install/... || goto:error
"%__BAZEL__%" test --profile=min.nodll.tracing.json --//:with_dll=false //install/... || goto:error
goto:eof
:zip
"%__BAZEL__%" run --profile=5.pkg.tracing.json --//:with_dll=true make_otel_sdk || goto:error
goto:eof
:shutdown
"%__BAZEL__%" shutdown || goto:error
goto:eof
:no-bazel
echo FAILED: No bazelisk or bazel found!
exit 1
goto:eof
:error
echo FAILED!
exit 1
goto:eof