-
Notifications
You must be signed in to change notification settings - Fork 21
/
appveyor.yml
76 lines (69 loc) · 4.11 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
69
70
71
72
73
74
75
76
version: '{build}'
image: Visual Studio 2019
environment:
matrix:
- CONFIGURATION: Debug
WINFSP: rel
LXDK: rel
- CONFIGURATION: Release
WINFSP: rel
LXDK: rel
init:
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- git submodule update --init --recursive
# install WinFsp
- appveyor AddMessage "Install WinFsp" -Category Information
- if %WINFSP%==rel appveyor DownloadFile https://github.com/billziss-gh/winfsp/releases/download/v1.8B2/winfsp-1.8.20221.msi
- if %WINFSP%==rel appveyor DownloadFile https://github.com/billziss-gh/winfsp/releases/download/v1.8B2/winfsp-tests-1.8.20221.zip
- if %WINFSP%==src tools\build-winfsp.bat %CONFIGURATION%
- if %WINFSP%==src copy ext\winfsp\build\VStudio\build\%CONFIGURATION%\winfsp-*.msi .
- if %WINFSP%==src copy ext\winfsp\build\VStudio\build\%CONFIGURATION%\winfsp-tests-*.zip .
- for %%f in ("winfsp-*.msi") do start /wait msiexec /i %%f /qn INSTALLLEVEL=1000
- for %%f in ("winfsp-tests-*.zip") do powershell -command "Expand-Archive -Path %%f -DestinationPath 'C:\Program Files (x86)\WinFsp\bin'"
# install LxDK
- appveyor AddMessage "Install LxDK" -Category Information
- if %LXDK%==rel appveyor DownloadFile https://github.com/billziss-gh/lxdk/releases/download/v0.3/lxdk-0.3.20228.msi
- if %LXDK%==src tools\build-lxdk.bat %CONFIGURATION%
- if %LXDK%==src copy ext\lxdk\build\VStudio\build\%CONFIGURATION%\lxdk-*.msi .
- for %%f in ("lxdk-*.msi") do start /wait msiexec /i %%f /qn INSTALLLEVEL=1000
# install WSL Ubuntu 20.04 - adapted from appveyor/build-images:scripts/Windows/install_wsl.ps1
- appveyor AddMessage "Install WSL Ubuntu 20.04" -Category Information
- ps: (New-Object Net.WebClient).DownloadFile('https://aka.ms/wslubuntu2004', "$env:TEMP\wsl-ubuntu-2004.zip")
- ps: Expand-Archive -Path "$env:TEMP\wsl-ubuntu-2004.zip" -DestinationPath "C:\WSL\WinFuse-Ubuntu2004" -Force
- ps: Remove-Item "$env:TEMP\wsl-ubuntu-2004.zip"
- ps: . "C:\WSL\WinFuse-Ubuntu2004\ubuntu2004.exe" install --root
- ps: . "C:\WSL\WinFuse-Ubuntu2004\ubuntu2004.exe" run adduser appveyor --gecos `"First,Last,RoomNumber,WorkPhone,HomePhone`" --disabled-password
- ps: . "C:\WSL\WinFuse-Ubuntu2004\ubuntu2004.exe" run "echo 'appveyor:Password12!' | sudo chpasswd"
- ps: . "C:\WSL\WinFuse-Ubuntu2004\ubuntu2004.exe" run usermod -aG sudo appveyor
- ps: |
. "C:\WSL\WinFuse-Ubuntu2004\ubuntu2004.exe" run "echo -e `"`"appveyor\tALL=(ALL)\tNOPASSWD: ALL`"`" > /etc/sudoers.d/appveyor"
- ps: . "C:\WSL\WinFuse-Ubuntu2004\ubuntu2004.exe" run chmod 0755 /etc/sudoers.d/appveyor
- ps: . "C:\WSL\WinFuse-Ubuntu2004\ubuntu2004.exe" config --default-user appveyor
- wslconfig /setdefault Ubuntu-20.04
- wsl -- lsb_release -a
# install WSL tools
- appveyor AddMessage "Install WSL tools" -Category Information
- wsl -- sudo apt-get update; sudo apt-get install -y g++ gdb make ninja-build rsync zip libfuse3-dev
# enable test-signing and verifier and reboot
- appveyor AddMessage "Change boot configuration and reboot" -Category Information
- bcdedit /set testsigning on
- verifier /standard /driver winfuse-x64.sys || ver>nul
- if exist %SystemRoot%\memory.dmp del %SystemRoot%\memory.dmp
- ps: Restart-Computer -Force
- ps: Start-Sleep -s 60
build_script:
- appveyor AddMessage "Reboot complete" -Category Information
- tools\build.bat %CONFIGURATION%
- for %%f in ("build\VStudio\build\%CONFIGURATION%\winfuse-*-x64.msi") do start /wait msiexec /i %%f /qn INSTALLLEVEL=1000
- copy ext\libfuse\build\%CONFIGURATION%\x86\lib\fuse3-x86.dll "C:\Program Files\WinFuse\opt\libfuse\bin"
- copy ext\libfuse\build\%CONFIGURATION%\x86\lib\fuse3-x86.lib "C:\Program Files\WinFuse\opt\libfuse\lib"
test_script:
- tools\nmake-ext-test.bat
- tools\run-tests.bat %CONFIGURATION%
- tools\run-tests.bat %CONFIGURATION% sample
- if exist %SystemRoot%\memory.dmp exit 1
on_finish:
- if exist %SystemRoot%\memory.dmp (7z a memory.dmp.zip %SystemRoot%\memory.dmp && appveyor PushArtifact memory.dmp.zip)
- verifier /query
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))