forked from winnfsd/winnfsd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
68 lines (59 loc) · 4.06 KB
/
appveyor.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
configuration:
- Release
init:
# uncomment for rdp debugging
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- git config --global core.eol lf
- git config --global core.autocrlf false
- ps: mkdir C:\Users\appveyor\.vagrant.d | Out-Null
- ps: mkdir C:\downloads | Out-Null
install:
- ps: |
cd C:\downloads
[Net.ServicePointManager]::SecurityProtocol = 'Ssl3, Tls, Tls11, Tls12'
Start-FileDownload "http://download.virtualbox.org/virtualbox/5.1.6/VirtualBox-5.1.6-110634-Win.exe"
Start-FileDownload "http://download.virtualbox.org/virtualbox/5.1.6/Oracle_VM_VirtualBox_Extension_Pack-5.1.6.vbox-extpack"
Start-FileDownload "https://releases.hashicorp.com/vagrant/1.8.5/vagrant_1.8.5.msi"
Start-Process -FilePath "VirtualBox-5.1.6-110634-Win.exe" -ArgumentList "-silent -logging -msiparams INSTALLDIR=C:\VBox" -Wait
Start-Process -FilePath "msiexec.exe" -ArgumentList "/a vagrant_1.8.5.msi /qb TARGETDIR=C:\Vagrant" -Wait
cd $env:APPVEYOR_BUILD_FOLDER
- set PATH=C:\Vagrant\HashiCorp\Vagrant\bin;C:\VBox;%PATH%
- VBoxManage extpack install C:\downloads\Oracle_VM_VirtualBox_Extension_Pack-5.1.6.vbox-extpack
- vagrant -v
- VBoxManage -v
- ssh -V
- ipconfig /all
before_build:
# see http://help.appveyor.com/discussions/problems/4569-the-target-_convertpdbfiles-listed-in-a-beforetargets-attribute-at-c-does-not-exist-in-the-project-and-will-be-ignored
- del "C:\Program Files (x86)\MSBuild\12.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
- del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
- ps: |
if ($env:APPVEYOR_REPO_TAG_NAME) { $env:VERSION = $env:APPVEYOR_REPO_TAG_NAME } else { $env:VERSION = $env:APPVEYOR_REPO_BRANCH }
(Get-Content $env:APPVEYOR_BUILD_FOLDER\src\winnfsd.cpp).replace('{{VERSION}}', $env:VERSION) | Set-Content $env:APPVEYOR_BUILD_FOLDER\src\winnfsd.cpp
(Get-Content $env:APPVEYOR_BUILD_FOLDER\src\winnfsd.cpp).replace('{{HASH}}', $env:APPVEYOR_REPO_COMMIT.Substring(0, 7)) | Set-Content $env:APPVEYOR_BUILD_FOLDER\src\winnfsd.cpp
# patch assembly info
- ps: |
$env:LAST_TAG = "$(git describe --abbrev=0 --tags).0"
$env:LAST_TAG_FULL = "$($env:LAST_TAG)-$($env:APPVEYOR_REPO_COMMIT.Substring(0, 7))"
(Get-Content $env:APPVEYOR_BUILD_FOLDER\src\WinNFSd.rc).replace('1,0,0,0', ($env:LAST_TAG).replace('.',',')) | Set-Content $env:APPVEYOR_BUILD_FOLDER\src\WinNFSd.rc
(Get-Content $env:APPVEYOR_BUILD_FOLDER\src\WinNFSd.rc).replace('1.0.0.0-000000', $env:LAST_TAG_FULL) | Set-Content $env:APPVEYOR_BUILD_FOLDER\src\WinNFSd.rc
(Get-Content $env:APPVEYOR_BUILD_FOLDER\src\WinNFSd.rc).replace('1.0.0.0', $env:LAST_TAG) | Set-Content $env:APPVEYOR_BUILD_FOLDER\src\WinNFSd.rc
(Get-Content $env:APPVEYOR_BUILD_FOLDER\src\WinNFSd.rc).replace('YYYY', $(Get-Date -UFormat %Y)) | Set-Content $env:APPVEYOR_BUILD_FOLDER\src\WinNFSd.rc
before_test:
- ps: netsh advfirewall firewall add rule name="WinNFSd-IN" dir="in" action=allow protocol=any program="$env:APPVEYOR_BUILD_FOLDER\src\Release\WinNFSd.exe" profile=any
- ps: netsh advfirewall firewall add rule name="WinNFSd-OUT" dir="out" action=allow protocol=any program="$env:APPVEYOR_BUILD_FOLDER\src\Release\WinNFSd.exe" profile=any
- ps: cd $env:APPVEYOR_BUILD_FOLDER\tests
- vagrant up
- mkdir C:\connectathon-winnfsd
- ps: copy -Recurse $env:APPVEYOR_BUILD_FOLDER\tests C:\connectathon-winnfsd
- ps: start-process "$env:APPVEYOR_BUILD_FOLDER\src\Release\WinNFSd.exe" "-log off C:\connectathon-winnfsd"
test_script:
- vagrant ssh -c "sudo mkdir /winnfsd && sudo mount -o 'vers=3,udp,nolock' 192.168.56.1:/C/connectathon-winnfsd /winnfsd"
- vagrant ssh -c "sudo -E /winnfsd/tests/bash/tests.sh"
matrix:
fast_finish: true
artifacts:
- path: src/Release/winnfsd.exe
# uncomment for rdp debugging
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))