aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.appveyor/build.ps163
-rw-r--r--.appveyor/test.ps122
-rw-r--r--CMakeLists.txt5
-rw-r--r--appveyor.yml6
-rw-r--r--um/CMakeLists.txt4
m---------um/cmake0
6 files changed, 16 insertions, 84 deletions
diff --git a/.appveyor/build.ps1 b/.appveyor/build.ps1
index 6ecbf00..40233af 100644
--- a/.appveyor/build.ps1
+++ b/.appveyor/build.ps1
@@ -1,7 +1,5 @@
param(
- [string] $BuildDir = $null,
[string] $ProjectDir = $null,
- [string] $Generator = $null,
[string] $Platform = $null,
[string] $Configuration = $null,
[string] $DriverTargetOS = $null
@@ -35,39 +33,11 @@ function Test-AppVeyor {
function Set-AppVeyorDefaults {
$script:ProjectDir = $env:APPVEYOR_BUILD_FOLDER
- $script:BuildDir = 'C:\Projects\build'
- $script:Generator = switch ($env:APPVEYOR_BUILD_WORKER_IMAGE) {
- 'Visual Studio 2013' { 'Visual Studio 12 2013' }
- 'Visual Studio 2015' { 'Visual Studio 14 2015' }
- 'Visual Studio 2017' { 'Visual Studio 15 2017' }
- default { throw "Unsupported AppVeyor image: $env:APPVEYOR_BUILD_WORKER_IMAGE" }
- }
$script:Platform = $env:PLATFORM
$script:Configuration = $env:CONFIGURATION
$script:DriverTargetOS = $env:appveyor_driver_target_os
}
-function Build-ProjectUserMode {
- param(
- [Parameter(Mandatory=$true)]
- [string] $ProjectDir,
- [Parameter(Mandatory=$true)]
- [string] $BuildDir,
- [Parameter(Mandatory=$true)]
- [string] $Generator,
- [Parameter(Mandatory=$true)]
- [string] $Platform,
- [Parameter(Mandatory=$true)]
- [string] $Configuration
- )
-
- mkdir $BuildDir
- cd $BuildDir
-
- Invoke-Exe { cmake.exe -G $Generator -A $Platform "$ProjectDir\um" }
- Invoke-Exe { cmake.exe --build . --config $Configuration -- /m }
-}
-
function Get-DriverConfiguration {
param(
[Parameter(Mandatory=$true)]
@@ -151,35 +121,6 @@ function Build-ProjectKernelMode {
}
}
-function Build-Project {
- param(
- [Parameter(Mandatory=$true)]
- [string] $ProjectDir,
- [Parameter(Mandatory=$true)]
- [string] $BuildDir,
- [Parameter(Mandatory=$true)]
- [string] $Generator,
- [Parameter(Mandatory=$true)]
- [string] $Platform,
- [Parameter(Mandatory=$true)]
- [string] $Configuration,
- [Parameter(Mandatory=$true)]
- [string] $DriverTargetOS
- )
-
- Build-ProjectUserMode `
- -ProjectDir $ProjectDir `
- -BuildDir $BuildDir `
- -Generator $Generator `
- -Platform $Platform `
- -Configuration $Configuration
- Build-ProjectKernelMode `
- -ProjectDir $ProjectDir `
- -Platform $Platform `
- -Configuration $Configuration `
- -DriverTargetOS $DriverTargetOS
-}
-
function Build-ProjectAppVeyor {
if (Test-AppVeyor) {
Set-AppVeyorDefaults
@@ -187,10 +128,8 @@ function Build-ProjectAppVeyor {
}
try {
- Build-Project `
+ Build-ProjectKernelMode `
-ProjectDir $script:ProjectDir `
- -BuildDir $script:BuildDir `
- -Generator $script:Generator `
-Platform $script:Platform `
-Configuration $script:Configuration `
-DriverTargetOS $script:DriverTargetOS
diff --git a/.appveyor/test.ps1 b/.appveyor/test.ps1
index 3eeebfc..ece8dbe 100644
--- a/.appveyor/test.ps1
+++ b/.appveyor/test.ps1
@@ -1,5 +1,6 @@
param(
- [string] $BuildDir = $null,
+ [Parameter(Mandatory=$true)]
+ [string] $InstallDir = $null,
[string] $ProjectDir = $null,
[string] $Configuration = $null,
[string] $Platform = $null,
@@ -35,24 +36,11 @@ function Test-AppVeyor {
function Set-AppVeyorDefaults {
$script:ProjectDir = $env:APPVEYOR_BUILD_FOLDER
- $script:BuildDir = 'C:\Projects\build'
$script:Platform = $env:PLATFORM
$script:Configuration = $env:CONFIGURATION
$script:DriverTargetOS = $env:appveyor_driver_target_os
}
-function Add-UtilsPath {
- param(
- [Parameter(Mandatory=$true)]
- [string] $BuildDir,
- [Parameter(Mandatory=$true)]
- [string] $Configuration
- )
-
- $env:PATH = "$BuildDir\service\utils\$Configuration;${env:PATH}"
- $env:PATH = "$BuildDir\wrappers\simple\utils\$Configuration;${env:PATH}"
-}
-
function Get-DriverName {
param(
[Parameter(Mandatory=$true)]
@@ -189,7 +177,7 @@ function Run-ProjectTests {
[Parameter(Mandatory=$true)]
[string] $ProjectDir,
[Parameter(Mandatory=$true)]
- [string] $BuildDir,
+ [string] $InstallDir,
[Parameter(Mandatory=$true)]
[string] $Platform,
[Parameter(Mandatory=$true)]
@@ -198,7 +186,7 @@ function Run-ProjectTests {
[string] $DriverTargetOS
)
- Add-UtilsPath -BuildDir $BuildDir -Configuration $Configuration
+ $env:PATH = "$InstallDir\bin;${env:PATH}"
$drivers = 'minimal', 'simple', 'special\nt_namespace'
@@ -228,7 +216,7 @@ function Run-ProjectTestsAppVeyor {
try {
Run-ProjectTests `
-ProjectDir $script:ProjectDir `
- -BuildDir $script:BuildDir `
+ -InstallDir $script:InstallDir `
-Platform $script:Platform `
-Configuration $script:Configuration `
-DriverTargetOS $script:DriverTargetOS
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..425d711
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(win7drv CXX)
+
+add_subdirectory(um)
diff --git a/appveyor.yml b/appveyor.yml
index 0294159..f3c3b1e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -9,6 +9,9 @@ image: Visual Studio 2013
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
environment:
+ global:
+ python_exe: C:\Python36-x64\python.exe
+ install_dir: C:\Projects\install\win7drv
matrix:
- appveyor_driver_target_os: Win7
- appveyor_driver_target_os: Win8
@@ -26,6 +29,7 @@ install:
- git submodule update --init --recursive
build_script:
+ - '"%python_exe%" um/cmake/ci/build_appveyor.py --install "%install_dir%"'
- ps: .\.appveyor\build.ps1
for:
@@ -50,4 +54,4 @@ for:
- ps: Start-Sleep -s 10
- appveyor.exe AddMessage "OK"
test_script:
- - ps: .\.appveyor\test.ps1
+ - ps: .\.appveyor\test.ps1 -InstallDir $env:install_dir
diff --git a/um/CMakeLists.txt b/um/CMakeLists.txt
index 70336dc..b5df409 100644
--- a/um/CMakeLists.txt
+++ b/um/CMakeLists.txt
@@ -1,7 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
-
-project(win7drv CXX)
-
# WIN32_LEAN_AND_MEAN shouldn't be defined, it masks CTL_CODE:
set(CC_WINDOWS_DEF OFF)
diff --git a/um/cmake b/um/cmake
-Subproject 22ecbd5bdaec83f9714d21b1510ddc29d8596bc
+Subproject f1b56311d06aa2371779a34aae0be55e7bb1c1f