2022-05-25 20:16:39 +00:00
|
|
|
version: 8.4.{build}
|
2022-10-06 12:17:38 +00:00
|
|
|
image: Visual Studio 2022
|
2016-02-22 10:46:47 +00:00
|
|
|
|
2021-09-04 19:29:29 +00:00
|
|
|
#skip_commits:
|
|
|
|
# files:
|
|
|
|
# - PowerEditor/bin/*/*.xml
|
|
|
|
# - PowerEditor/installer/*/*.xml
|
2018-02-01 22:05:41 +00:00
|
|
|
|
|
|
|
environment:
|
2022-12-14 01:06:32 +00:00
|
|
|
python_dir: C:\Python311-x64
|
2018-02-01 22:05:41 +00:00
|
|
|
matrix:
|
2023-11-03 22:01:45 +00:00
|
|
|
#- compiler: MSC
|
|
|
|
# platform: Win32
|
2018-02-01 22:05:41 +00:00
|
|
|
|
2021-09-04 19:29:29 +00:00
|
|
|
- compiler: MSC
|
|
|
|
platform: x64
|
2018-02-01 22:05:41 +00:00
|
|
|
|
2023-11-03 22:01:45 +00:00
|
|
|
#- compiler: MSC
|
|
|
|
# platform: arm64
|
2016-07-12 07:19:56 +00:00
|
|
|
|
2023-11-03 22:01:45 +00:00
|
|
|
#- compiler: GCC
|
|
|
|
# platform: i686
|
2021-02-28 00:45:09 +00:00
|
|
|
|
2023-11-03 22:01:45 +00:00
|
|
|
#- compiler: GCC
|
|
|
|
# platform: x86_64
|
2021-02-28 00:45:09 +00:00
|
|
|
|
2016-07-12 07:19:56 +00:00
|
|
|
configuration:
|
2021-07-27 19:27:24 +00:00
|
|
|
- Release
|
2023-11-03 22:01:45 +00:00
|
|
|
#- Debug
|
2016-07-12 07:19:56 +00:00
|
|
|
|
2021-09-04 19:29:29 +00:00
|
|
|
before_build:
|
2018-02-01 22:05:41 +00:00
|
|
|
- ps: |
|
2022-11-02 12:09:11 +00:00
|
|
|
Write-Output "Build parameters:"
|
2021-09-04 19:29:29 +00:00
|
|
|
Write-Output "Compiler : $env:compiler"
|
|
|
|
Write-Output "Platform : $env:platform"
|
|
|
|
Write-Output "Configuration : $env:configuration"
|
2022-11-02 12:09:11 +00:00
|
|
|
Write-Output ""
|
2022-11-25 19:10:45 +00:00
|
|
|
# XML validation mode
|
2022-12-01 00:03:28 +00:00
|
|
|
$allowMaster = $true
|
|
|
|
if ($allowMaster -or $env:APPVEYOR_PULL_REQUEST_NUMBER) {
|
2023-01-17 23:57:17 +00:00
|
|
|
$folders_onejob = "PowerEditor/(Test|(installer/(filesForTesting|functionList)))/"
|
2023-02-24 15:58:58 +00:00
|
|
|
$files_nowork = "md|txt|log|ini"
|
2022-11-25 19:10:45 +00:00
|
|
|
$files_modified = @(git diff --name-only HEAD~1)
|
2022-12-12 12:53:48 +00:00
|
|
|
$files_notmached = @($files_modified | Where-Object {$_ -notmatch "\.(xml|$files_nowork)$|$folders_onejob"})
|
2022-12-01 00:03:28 +00:00
|
|
|
if (($files_modified.length -gt 0 -and $files_notmached.length -eq 0) -or $env:APPVEYOR_REPO_COMMIT_MESSAGE -match "\[force (xml|nowork)\]") {
|
|
|
|
if (@($files_modified | Where-Object {$_ -notmatch "\.($files_nowork)$"}).length -eq 0 -or $env:APPVEYOR_REPO_COMMIT_MESSAGE -match "\[force nowork\]") {
|
|
|
|
Write-Output "Changed files on this commit don't require any additional tasks.`n"
|
|
|
|
Exit-AppVeyorBuild
|
2022-11-25 19:10:45 +00:00
|
|
|
}
|
|
|
|
else {
|
2022-12-01 00:03:28 +00:00
|
|
|
Write-Output "XML validation mode`n"
|
|
|
|
if ("$env:platform/$env:configuration" -eq "Win32/Debug") {
|
2022-12-12 12:53:48 +00:00
|
|
|
if (@($files_modified | Where-Object {$_ -match $folders_onejob}).length -eq 0) {
|
2022-12-14 01:06:32 +00:00
|
|
|
$env:Path = "$env:python_dir;$env:python_dir\Scripts;" + $env:Path
|
2022-12-01 00:03:28 +00:00
|
|
|
python -m pip install requests rfc3987 pywin32 lxml
|
|
|
|
python PowerEditor\Test\xmlValidator\validator_xml.py
|
|
|
|
if ($LastExitCode -eq 0) {
|
|
|
|
Write-Output "`nAll XML files are valid.`n"
|
|
|
|
Exit-AppVeyorBuild
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
Write-Output "`nSome XML files are invalid.`n"
|
|
|
|
$host.SetShouldExit($LastExitCode)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
Write-Output "In XML validation mode only Win32/Debug performs the proper tasks.`n"
|
|
|
|
Exit-AppVeyorBuild
|
|
|
|
}
|
2022-11-25 19:10:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif ($env:APPVEYOR_REPO_COMMIT_MESSAGE -match "\[xml\]" -and $env:APPVEYOR_REPO_COMMIT_MESSAGE -notmatch "\[force compile\]") {
|
2022-12-01 00:03:28 +00:00
|
|
|
throw "Changed files on this commit require full build."
|
2022-11-25 19:10:45 +00:00
|
|
|
}
|
|
|
|
}
|
2021-09-04 19:29:29 +00:00
|
|
|
|
|
|
|
for:
|
2022-11-25 19:10:45 +00:00
|
|
|
|
2021-09-04 19:29:29 +00:00
|
|
|
- matrix:
|
|
|
|
only:
|
|
|
|
- compiler: MSC
|
2022-11-25 19:10:45 +00:00
|
|
|
platform: Win32
|
|
|
|
configuration: Release
|
|
|
|
skip_commits:
|
|
|
|
message: /\[xml\]/
|
|
|
|
build:
|
|
|
|
parallel: true
|
|
|
|
project: PowerEditor\visual.net\notepadPlus.sln
|
|
|
|
after_build:
|
|
|
|
# artifacts
|
|
|
|
- ps: |
|
|
|
|
$nppFileName = "Notepad++.$env:platform.$env:configuration.exe"
|
|
|
|
Push-AppveyorArtifact "PowerEditor\bin\Notepad++.exe" -FileName "$nppFileName"
|
|
|
|
|
|
|
|
- matrix:
|
|
|
|
only:
|
|
|
|
- compiler: MSC
|
|
|
|
platform: Win32
|
|
|
|
configuration: Debug
|
|
|
|
build:
|
|
|
|
parallel: true
|
|
|
|
project: PowerEditor\visual.net\notepadPlus.sln
|
|
|
|
after_build:
|
|
|
|
# artifacts
|
|
|
|
- ps: |
|
|
|
|
$nppFileName = "Notepad++.$env:platform.$env:configuration.exe"
|
|
|
|
Push-AppveyorArtifact "PowerEditor\visual.net\Debug\Notepad++.exe" -FileName "$nppFileName"
|
|
|
|
# xml files syntax checks
|
2022-12-14 01:06:32 +00:00
|
|
|
- set PATH=%python_dir%;%python_dir%\Scripts;%PATH%
|
2022-11-25 19:10:45 +00:00
|
|
|
- python -m pip install requests rfc3987 pywin32 lxml
|
|
|
|
- python PowerEditor\Test\xmlValidator\validator_xml.py
|
|
|
|
# tests
|
|
|
|
- ps: |
|
|
|
|
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\visual.net\Debug\Notepad++.exe" -Destination "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\bin"
|
|
|
|
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\src\langs.model.xml" -Destination "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\bin"
|
|
|
|
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\src\stylers.model.xml" -Destination "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\bin"
|
|
|
|
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\src\shortcuts.xml" -Destination "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\bin"
|
|
|
|
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\src\contextMenu.xml" -Destination "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\bin"
|
|
|
|
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\installer\functionList" -Destination "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\bin" -Recurse
|
|
|
|
|
|
|
|
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\installer\filesForTesting\regexGlobalTest.xml" -Destination "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\bin\functionList"
|
|
|
|
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\installer\filesForTesting\overrideMap.xml" -Destination "$env:APPVEYOR_BUILD_FOLDER\PowerEditor\bin\functionList"
|
|
|
|
|
|
|
|
cd .\PowerEditor\Test\FunctionList\
|
2023-11-03 22:01:45 +00:00
|
|
|
.\unitTestLauncher.ps1
|
|
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
2022-11-25 19:10:45 +00:00
|
|
|
|
|
|
|
cd ..\UrlDetection
|
|
|
|
.\verifyUrlDetection.ps1
|
|
|
|
|
|
|
|
cd "$env:APPVEYOR_BUILD_FOLDER"
|
|
|
|
|
|
|
|
- matrix:
|
|
|
|
only:
|
|
|
|
- compiler: MSC
|
|
|
|
platform: x64
|
|
|
|
skip_commits:
|
|
|
|
message: /\[xml\]/
|
2021-09-04 19:29:29 +00:00
|
|
|
build:
|
|
|
|
parallel: true
|
|
|
|
project: PowerEditor\visual.net\notepadPlus.sln
|
|
|
|
after_build:
|
|
|
|
# artifacts
|
|
|
|
- ps: |
|
|
|
|
$nppFileName = "Notepad++.$env:platform.$env:configuration.exe"
|
|
|
|
if ("$env:platform/$env:configuration" -eq "x64/Release") {
|
2016-07-12 07:19:56 +00:00
|
|
|
Push-AppveyorArtifact "PowerEditor\bin64\Notepad++.exe" -FileName "$nppFileName"
|
|
|
|
}
|
2021-09-04 19:29:29 +00:00
|
|
|
if ("$env:platform/$env:configuration" -eq "x64/Debug") {
|
2021-07-27 19:27:24 +00:00
|
|
|
Push-AppveyorArtifact "PowerEditor\visual.net\x64\Debug\Notepad++.exe" -FileName "$nppFileName"
|
2016-07-12 07:19:56 +00:00
|
|
|
}
|
2022-11-25 19:10:45 +00:00
|
|
|
|
|
|
|
- matrix:
|
|
|
|
only:
|
|
|
|
- compiler: MSC
|
|
|
|
platform: arm64
|
|
|
|
skip_commits:
|
|
|
|
message: /\[xml\]/
|
|
|
|
build:
|
|
|
|
parallel: true
|
|
|
|
project: PowerEditor\visual.net\notepadPlus.sln
|
|
|
|
after_build:
|
|
|
|
# artifacts
|
|
|
|
- ps: |
|
|
|
|
$nppFileName = "Notepad++.$env:platform.$env:configuration.exe"
|
2021-09-04 19:29:29 +00:00
|
|
|
if ("$env:platform/$env:configuration" -eq "arm64/Release") {
|
|
|
|
Push-AppveyorArtifact "PowerEditor\binarm64\Notepad++.exe" -FileName "$nppFileName"
|
2016-07-12 07:19:56 +00:00
|
|
|
}
|
2021-09-04 19:29:29 +00:00
|
|
|
if ("$env:platform/$env:configuration" -eq "arm64/Debug") {
|
|
|
|
Push-AppveyorArtifact "PowerEditor\visual.net\arm64\Debug\Notepad++.exe" -FileName "$nppFileName"
|
|
|
|
}
|
2021-02-28 00:45:09 +00:00
|
|
|
|
2021-09-04 19:29:29 +00:00
|
|
|
- matrix:
|
|
|
|
only:
|
|
|
|
- compiler: GCC
|
2022-11-25 19:10:45 +00:00
|
|
|
skip_commits:
|
|
|
|
message: /\[xml\]/
|
|
|
|
build_script:
|
2022-11-02 12:09:11 +00:00
|
|
|
- set PATH=C:\msys64\usr\bin;%PATH%
|
|
|
|
- if "%platform%" EQU "i686" set MSYSTEM=MINGW32 && set PATH=C:\msys64\mingw32\bin;%PATH%
|
|
|
|
- if "%platform%" EQU "x86_64" set MSYSTEM=MINGW64 && set PATH=C:\msys64\mingw64\bin;%PATH%
|
2022-05-20 13:00:57 +00:00
|
|
|
- if "%configuration%" EQU "Debug" set DEBUG=1
|
2022-10-06 12:57:46 +00:00
|
|
|
# uncomment lines below to update packages to use latest gcc
|
|
|
|
#- bash -lc "pacman --noconfirm -Syuu"
|
|
|
|
#- bash -lc "pacman --noconfirm -Syuu"
|
|
|
|
#- if "%platform%" EQU "i686" bash -lc "pacman --noconfirm -S mingw-w64-i686-gcc mingw-w64-i686-make"
|
|
|
|
#- if "%platform%" EQU "x86_64" bash -lc "pacman --noconfirm -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make"
|
2022-11-02 12:09:11 +00:00
|
|
|
- ps: |
|
|
|
|
Write-Output "Tools version:"
|
|
|
|
Write-Output (((gcc --version) | select-object -first 1) + " " + (gcc -dumpmachine))
|
2022-11-09 22:44:15 +00:00
|
|
|
Write-Output (make --version) | select-object -first 1
|
2022-11-02 12:09:11 +00:00
|
|
|
Write-Output (sh --version) | select-object -first 1
|
|
|
|
Write-Output ""
|
|
|
|
- make -f PowerEditor\gcc\makefile
|
2021-09-04 19:29:29 +00:00
|
|
|
after_build:
|
|
|
|
# artifacts
|
|
|
|
- ps: |
|
|
|
|
$nppFileName = "Notepad++.$env:compiler.$env:platform.$env:configuration.exe"
|
|
|
|
if ("$env:platform/$env:configuration" -eq "i686/Release") {
|
|
|
|
Push-AppveyorArtifact "bin.i686\notepad++.exe" -FileName "$nppFileName"
|
2018-02-01 22:05:41 +00:00
|
|
|
}
|
2022-05-26 18:52:29 +00:00
|
|
|
if ("$env:platform/$env:configuration" -eq "i686/Debug") {
|
|
|
|
Push-AppveyorArtifact "bin.i686-debug\notepad++.exe" -FileName "$nppFileName"
|
|
|
|
}
|
2021-09-04 19:29:29 +00:00
|
|
|
if ("$env:platform/$env:configuration" -eq "x86_64/Release") {
|
|
|
|
Push-AppveyorArtifact "bin.x86_64\notepad++.exe" -FileName "$nppFileName"
|
2021-08-07 18:56:14 +00:00
|
|
|
}
|
2022-05-26 18:52:29 +00:00
|
|
|
if ("$env:platform/$env:configuration" -eq "x86_64/Debug") {
|
|
|
|
Push-AppveyorArtifact "bin.x86_64-debug\notepad++.exe" -FileName "$nppFileName"
|
|
|
|
}
|