forked from microsoft/security-utilities
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildAndTest.cmd
47 lines (40 loc) · 1.54 KB
/
BuildAndTest.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
time /T
pushd .\src\security_utilities_rust\
call cargo clean --release
call cargo test --release
if "%ERRORLEVEL%" NEQ "0" (
echo "security_utilities_rust testing failed..."
exit /b %ERRORLEVEL%
)
popd
pushd .\src\security_utilities_rust_ffi\
call cargo clean --release
call cargo test --release
if "%ERRORLEVEL%" NEQ "0" (
echo "security_utilities_rust_ffi testing failed..."
exit /b %ERRORLEVEL%
)
popd
pushd .\src\security_utilities_rust_ffi\
call cargo clean --release
call cargo build --release --target x86_64-pc-windows-msvc
if "%ERRORLEVEL%" NEQ "0" (
echo "security_utilities_rust_ffi build failed for x86_64-pc-windows-msvc target..."
exit /b %ERRORLEVEL%
)
call cargo build --release --target i686-pc-windows-msvc
if "%ERRORLEVEL%" NEQ "0" (
echo "security_utilities_rust_ffi build failed for i686-pc-windows-msvc target..."
exit /b %ERRORLEVEL%
)
popd
xcopy /Y .\src\security_utilities_rust_ffi\target\i686-pc-windows-msvc\release\microsoft_security_utilities_core.dll .\refs\win-x86\
xcopy /Y .\src\security_utilities_rust_ffi\target\i686-pc-windows-msvc\release\microsoft_security_utilities_core.pdb .\refs\win-x86\
xcopy /Y .\src\security_utilities_rust_ffi\target\x86_64-pc-windows-msvc\release\microsoft_security_utilities_core.dll .\refs\win-x64\
xcopy /Y .\src\security_utilities_rust_ffi\target\x86_64-pc-windows-msvc\release\microsoft_security_utilities_core.pdb .\refs\win-x64\
call powershell -ExecutionPolicy RemoteSigned -File %~dp0\scripts\BuildAndTest.ps1 %*
set result=%ERRORLEVEL%
time /T
echo %RESULT%
exit /b %RESULT%