Skip to content

Commit

Permalink
CI adjustments (#180)
Browse files Browse the repository at this point in the history
* Added armake 0.5.1
* moved build script into separate ps file
* Changed image to stable vs17
* Win64 build fix
  • Loading branch information
Christian Klemm authored and dedmen committed Nov 29, 2017
1 parent ba455db commit 2be01cf
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -1,3 +1,4 @@
* text eol=crlf
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg binary
*.exe filter=lfs diff=lfs merge=lfs -text
38 changes: 16 additions & 22 deletions appveyor.yml
@@ -1,6 +1,10 @@
version: "{build}"

image: Visual Studio 2017 Preview
image: Visual Studio 2017

# Troubleshooting
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

branches:
only:
Expand All @@ -10,36 +14,26 @@ branches:
configuration:
- RelWithDebInfo

environment:
matrix:
- platform: Win32
vcproj_dir: vcproj
vcproj_file: vcproj\Intercept.sln
cmake_gen: "Visual Studio 15 2017"
cmake_args: ""

- platform: x64
vcproj_dir: vcproj64
vcproj_file: vcproj64\Intercept.sln
cmake_gen: "Visual Studio 15 2017 Win64"
cmake_args: "-DUSE_64BIT_BUILD=ON"

matrix:
fast_finish: true

before_build:
- mkdir build
- cd %vcproj_dir%
- cmake .. -G "%cmake_gen%" %cmake_args%
- cd vcproj
- cmake .. -G "Visual Studio 15 2017"
- cd ..
- cd vcproj64
- cmake .. -G "Visual Studio 15 2017 Win64" "-DUSE_64BIT_BUILD=ON"
- cd ..

build:
parallel: true
verbosity: minimal

build_script:
- msbuild "%vcproj_file%"
- msbuild vcproj\Intercept.sln /m
- msbuild vcproj64\Intercept.sln /m

on_success:
- ps: .\tools\ci_publish_artifacts.ps1

artifacts:
- path: build\win32\intercept_client\RelWithDebInfo\intercept_client.lib
name: win32_client_lib
Expand All @@ -52,4 +46,4 @@ artifacts:
- path: build\win64\intercept\RelWithDebInfo\intercept_x64.dll
name: win64_host_lib
- path: build\win64\intercept\RelWithDebInfo\intercept_x64.pdb
name: win32_host_pdb
name: win32_host_pdb
3 changes: 3 additions & 0 deletions tools/armake_w64.exe
Git LFS file not shown
46 changes: 46 additions & 0 deletions tools/ci_publish_artifacts.ps1
@@ -0,0 +1,46 @@
# Create host addon folders and copy items
New-Item $env:APPVEYOR_BUILD_FOLDER\artifacts\@intercept\addons -type directory | Out-Null
Copy-Item $env:APPVEYOR_BUILD_FOLDER\build\win32\intercept\RelWithDebInfo\intercept.dll $env:APPVEYOR_BUILD_FOLDER\artifacts\@intercept
Copy-Item $env:APPVEYOR_BUILD_FOLDER\build\win64\intercept\RelWithDebInfo\intercept_x64.dll $env:APPVEYOR_BUILD_FOLDER\artifacts\@intercept

# Create dev folders and copy items
New-Item $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\client\include -type directory | Out-Null
Copy-Item $env:APPVEYOR_BUILD_FOLDER\src\client\headers\* $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\client\include -recurse

New-Item $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\client\lib -type directory | Out-Null
Copy-Item $env:APPVEYOR_BUILD_FOLDER\build\win32\intercept_client\RelWithDebInfo\intercept_client.lib $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\client\lib

New-Item $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\client\lib64 -type directory | Out-Null
Copy-Item $env:APPVEYOR_BUILD_FOLDER\build\win64\intercept_client\RelWithDebInfo\intercept_client.lib $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\client\lib64

New-Item $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\host\@intercept\addons -type directory | Out-Null
Copy-Item $env:APPVEYOR_BUILD_FOLDER\build\win32\intercept\RelWithDebInfo\intercept.dll $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\host\@intercept
Copy-Item $env:APPVEYOR_BUILD_FOLDER\build\win32\intercept\RelWithDebInfo\intercept.pdb $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\host\@intercept
Copy-Item $env:APPVEYOR_BUILD_FOLDER\build\win64\intercept\RelWithDebInfo\intercept_x64.dll $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\host\@intercept
Copy-Item $env:APPVEYOR_BUILD_FOLDER\build\win64\intercept\RelWithDebInfo\intercept_x64.pdb $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\host\@intercept

# Pack host addon
Write-Host "Packing intercept_core.pbo"
Start-Process -FilePath "$env:APPVEYOR_BUILD_FOLDER\tools\armake_w64.exe" -ArgumentList "build `"$env:APPVEYOR_BUILD_FOLDER\rv\addons\core`" `"$env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\host\@intercept\addons\intercept_core.pbo`"" -Wait

# Copy host addon to host addon folder
Copy-Item $env:APPVEYOR_BUILD_FOLDER\artifacts\intercept\host\@intercept\addons\intercept_core.pbo $env:APPVEYOR_BUILD_FOLDER\artifacts\@intercept\addons

# Define zip extension when commit tag is present
$zipExtension = ""
if(![string]::IsNullOrEmpty($env:APPVEYOR_REPO_TAG_NAME)) {
Write-Host "Tag name is present: $env:APPVEYOR_REPO_TAG_NAME"
$zipExtension = "_$env:APPVEYOR_REPO_TAG_NAME"
} else {
Write-Host "Tag name is not present, not including it into artifacts"
}

# Zip host artifact and publish it
7z a "$env:APPVEYOR_BUILD_FOLDER\artifacts\intercept_host$zipExtension.zip" "$env:APPVEYOR_BUILD_FOLDER\artifacts\@intercept" | Out-Null
Write-Host "Zipped host files"
Push-AppveyorArtifact "$env:APPVEYOR_BUILD_FOLDER\artifacts\intercept_host$zipExtension.zip"

# Zip dev artifact and publish it
7z a "$env:APPVEYOR_BUILD_FOLDER\artifacts\intercept_dev$zipExtension.zip" "$env:APPVEYOR_BUILD_FOLDER\artifacts\intercept" | Out-Null
Write-Host "Zipped dev files"
Push-AppveyorArtifact "$env:APPVEYOR_BUILD_FOLDER\artifacts\intercept_dev$zipExtension.zip"

0 comments on commit 2be01cf

Please sign in to comment.