зеркало из https://github.com/microsoft/SymCrypt.git
Merged PR 3991172: Create Azure Pipelines YAML script for Windows build
This change adds a YAML script to enable building CMake for AMD64 Windows 10 in Azure Dev Ops. This build should occur automatically for all pull requests into master, and whenever master changes (whether due to a PR or a force push, etc). Also removed the dependency on `ntintsafe.h`, which was not actually being used. (Maybe Changyu removed calls to its functions it when he did the Linux port?)
This commit is contained in:
Родитель
c1a9027961
Коммит
9ec45fc43a
|
@ -2,7 +2,10 @@ cmake_minimum_required(VERSION 2.8.9)
|
|||
|
||||
add_compile_options(-DSYMCRYPT_IGNORE_PLATFORM)
|
||||
|
||||
if(NOT WIN32)
|
||||
if(WIN32)
|
||||
# Require Windows 10 SDK version 18362 for BCRYPT_TLS_CBC_HMAC_VERIFY_FLAG
|
||||
set(CMAKE_SYSTEM_VERSION 10.0.18362)
|
||||
else()
|
||||
add_compile_options(-Wno-deprecated-declarations -Wno-deprecated)
|
||||
add_compile_options(-g)
|
||||
add_compile_options(-Wno-multichar)
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
trigger:
|
||||
- master
|
||||
|
||||
pr:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
- job: Windows
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
|
||||
submodules: recursive
|
||||
# Initialize CMake
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'bin'
|
||||
cmakeArgs: '..'
|
||||
# Build with CMake
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'bin'
|
||||
cmakeArgs: '--build .'
|
||||
- script: |
|
||||
cd bin\unittest\exe_test\Debug
|
||||
.\symcryptunittest_generic.exe
|
||||
displayName: 'Execute generic unit test'
|
||||
name: 'WindowsGenericUnitTest'
|
||||
|
|
@ -5,10 +5,6 @@ Copyright (c) Microsoft Corporation. Licensed under the MIT license.
|
|||
*/
|
||||
|
||||
#include <ntstatus.h>
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable: 26071, "Avoid error in validation of RtlULongLongMult")
|
||||
#include <ntintsafe.h>
|
||||
#pragma prefast(pop)
|
||||
|
||||
// Ensure that windows.h doesn't re-define the status_* symbols
|
||||
#define WIN32_NO_STATUS
|
||||
|
|
|
@ -7,9 +7,6 @@ set_source_files_properties(symcryptunittest.rc PROPERTIES LANGUAGE RC)
|
|||
|
||||
add_compile_options(-DTESTDRIVER_NAME=\"SymCryptDriver_win7nlater.sys\")
|
||||
|
||||
# Workaround for including ntintsafe.h
|
||||
add_compile_options(-DCMAKE_COMPILE)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/SymCryptDependencies/inc)
|
||||
|
||||
add_executable(symcryptunittest_win7nlater ${SOURCES})
|
||||
|
|
|
@ -7,9 +7,6 @@ set_source_files_properties(symcryptunittest.rc PROPERTIES LANGUAGE RC)
|
|||
|
||||
add_compile_options(-DTESTDRIVER_NAME=\"SymCryptDriver_win7nlater.sys\")
|
||||
|
||||
# Workaround for including ntintsafe.h
|
||||
add_compile_options(-DCMAKE_COMPILE)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/SymCryptDependencies/inc)
|
||||
|
||||
add_executable(symcryptunittest_win8_1nlater ${SOURCES})
|
||||
|
|
|
@ -7,9 +7,6 @@ set_source_files_properties(symcryptunittest.rc PROPERTIES LANGUAGE RC)
|
|||
|
||||
add_compile_options(-DTESTDRIVER_NAME=\"SymCryptDriver_legacy.sys\")
|
||||
|
||||
# Workaround for including ntintsafe.h
|
||||
add_compile_options(-DCMAKE_COMPILE)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/SymCryptDependencies/inc)
|
||||
|
||||
add_executable(symcryptunittest_legacy ${SOURCES})
|
||||
|
|
|
@ -7,9 +7,6 @@ set_source_files_properties(symcryptunittest.rc PROPERTIES LANGUAGE RC)
|
|||
|
||||
add_compile_options(-DTESTDRIVER_NAME=\"SymCryptDriver_test.sys\")
|
||||
|
||||
# Workaround for including ntintsafe.h
|
||||
add_compile_options(-DCMAKE_COMPILE)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/SymCryptDependencies/inc)
|
||||
|
||||
add_executable(symcryptunittest_generic ${SOURCES})
|
||||
|
|
|
@ -161,14 +161,6 @@
|
|||
#define Sleep(x) sleep((x)/1000)
|
||||
#else
|
||||
#include <ntstatus.h>
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable: 26071, "Avoid error in validation of RtlULongLongMult")
|
||||
#ifdef CMAKE_COMPILE
|
||||
#include <../km/ntintsafe.h>
|
||||
#else
|
||||
#include <ntintsafe.h>
|
||||
#endif
|
||||
#pragma prefast(pop)
|
||||
|
||||
// Ensure that windows.h doesn't re-define the status_* symbols
|
||||
#define WIN32_NO_STATUS
|
||||
|
@ -245,11 +237,6 @@ extern "C"
|
|||
//#include <nturtl.h>
|
||||
#include <ntstatus.h>
|
||||
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable: 26071, "Avoid error in validation of RtlULongLongMult")
|
||||
#include <ntintsafe.h>
|
||||
#pragma prefast(pop)
|
||||
|
||||
// Ensure that windows.h doesn't re-define the status_* symbols
|
||||
#define WIN32_NO_STATUS
|
||||
#include <windows.h>
|
||||
|
|
|
@ -60,8 +60,6 @@ include_directories(${CMAKE_SOURCE_DIR}/SymCryptDependencies/inc)
|
|||
if(WIN32)
|
||||
# DNDEBUG is required to link with msbignum. This should eventually be removed.
|
||||
add_compile_options(-DNDEBUG)
|
||||
# Workaround for including ntintsafe.h
|
||||
add_compile_options(-DCMAKE_COMPILE)
|
||||
add_compile_options(-D_CRT_SECURE_NO_WARNINGS)
|
||||
else()
|
||||
add_compile_options(-Wno-write-strings)
|
||||
|
|
Загрузка…
Ссылка в новой задаче