-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathBuildAndTestRust.cmd
47 lines (40 loc) · 1.06 KB
/
BuildAndTestRust.cmd
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
@echo off
setlocal
set NO_TEST=0
:parse_args
set ARG=%1
if /i "%ARG%" == "-NoTest" set NO_TEST=1
if not "%ARG%" == "" shift & goto :parse_args
set STEP=Building security_utilities_rust for x64
echo %STEP%...
pushd .\src\security_utilities_rust\
call cargo build --release --target x86_64-pc-windows-msvc
if %ERRORLEVEL% neq 0 goto :exit
popd
set STEP=Building security_utilities_rust for x86
echo %STEP%...
pushd .\src\security_utilities_rust\
call cargo build --release --target i686-pc-windows-msvc
if %ERRORLEVEL% neq 0 goto :exit
popd
set STEP=Testing security_utilities_rust for x64
if %NO_TEST% neq 1 (
echo %STEP%...
pushd .\src\security_utilities_rust\
call cargo test --release --target x86_64-pc-windows-msvc
if %ERRORLEVEL% neq 0 goto :exit
popd
)
set STEP=Testing security_utilities_rust for x86
if %NO_TEST% neq 1 (
echo %STEP%...
pushd .\src\security_utilities_rust\
call cargo test --release --target i686-pc-windows-msvc
if %ERRORLEVEL% neq 0 goto :exit
popd
)
:exit
if %ERRORLEVEL% neq 0 (
echo ERROR: %STEP% failed.
)
exit /b %ERRORLEVEL%