Reduce CI (AppVeyor) build time
Reduce traslation PR validation time. Fix #12457, close #12454
This commit is contained in:
parent
bd4c323d75
commit
785b3417b6
139
appveyor.yml
139
appveyor.yml
|
@ -34,11 +34,99 @@ before_build:
|
|||
Write-Output "Platform : $env:platform"
|
||||
Write-Output "Configuration : $env:configuration"
|
||||
Write-Output ""
|
||||
# XML validation mode
|
||||
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
|
||||
$files_modified = @(git diff --name-only HEAD~1)
|
||||
$files_notmached = @($files_modified | Where-Object {$_ -notmatch "\.xml$"})
|
||||
if (($files_modified.length -gt 0 -and $files_notmached.length -eq 0) -or $env:APPVEYOR_REPO_COMMIT_MESSAGE -match "\[force xml\]") {
|
||||
Write-Output "XML validation mode`n"
|
||||
if ("$env:platform/$env:configuration" -eq "Win32/Debug") {
|
||||
if (@($files_modified | Where-Object {$_ -match "/functionList/"}).length -eq 0) {
|
||||
$env:Path = "C:\Python310;C:\Python310\Scripts;" + $env:Path
|
||||
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
|
||||
}
|
||||
}
|
||||
elseif ($env:APPVEYOR_REPO_COMMIT_MESSAGE -match "\[xml\]" -and $env:APPVEYOR_REPO_COMMIT_MESSAGE -notmatch "\[force compile\]") {
|
||||
throw "Changed files on this pull request require full build."
|
||||
}
|
||||
}
|
||||
|
||||
for:
|
||||
|
||||
- matrix:
|
||||
only:
|
||||
- compiler: MSC
|
||||
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
|
||||
- set PATH=C:\Python310;C:\Python310\Scripts;%PATH%
|
||||
- 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\
|
||||
.\unitTestLauncher.ps1
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
cd ..\UrlDetection
|
||||
.\verifyUrlDetection.ps1
|
||||
|
||||
cd "$env:APPVEYOR_BUILD_FOLDER"
|
||||
|
||||
- matrix:
|
||||
only:
|
||||
- compiler: MSC
|
||||
platform: x64
|
||||
skip_commits:
|
||||
message: /\[xml\]/
|
||||
build:
|
||||
parallel: true
|
||||
project: PowerEditor\visual.net\notepadPlus.sln
|
||||
|
@ -46,55 +134,39 @@ for:
|
|||
# artifacts
|
||||
- ps: |
|
||||
$nppFileName = "Notepad++.$env:platform.$env:configuration.exe"
|
||||
if ("$env:platform/$env:configuration" -eq "Win32/Release") {
|
||||
Push-AppveyorArtifact "PowerEditor\bin\Notepad++.exe" -FileName "$nppFileName"
|
||||
}
|
||||
if ("$env:platform/$env:configuration" -eq "Win32/Debug") {
|
||||
Push-AppveyorArtifact "PowerEditor\visual.net\Debug\Notepad++.exe" -FileName "$nppFileName"
|
||||
}
|
||||
if ("$env:platform/$env:configuration" -eq "x64/Release") {
|
||||
Push-AppveyorArtifact "PowerEditor\bin64\Notepad++.exe" -FileName "$nppFileName"
|
||||
}
|
||||
if ("$env:platform/$env:configuration" -eq "x64/Debug") {
|
||||
Push-AppveyorArtifact "PowerEditor\visual.net\x64\Debug\Notepad++.exe" -FileName "$nppFileName"
|
||||
}
|
||||
|
||||
- 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"
|
||||
if ("$env:platform/$env:configuration" -eq "arm64/Release") {
|
||||
Push-AppveyorArtifact "PowerEditor\binarm64\Notepad++.exe" -FileName "$nppFileName"
|
||||
}
|
||||
if ("$env:platform/$env:configuration" -eq "arm64/Debug") {
|
||||
Push-AppveyorArtifact "PowerEditor\visual.net\arm64\Debug\Notepad++.exe" -FileName "$nppFileName"
|
||||
}
|
||||
# xml files syntax checks
|
||||
- if "%platform%/%configuration%" EQU "Win32/Debug" set PATH=C:\Python310;C:\Python310\Scripts;%PATH%
|
||||
- if "%platform%/%configuration%" EQU "Win32/Debug" python -m pip install requests rfc3987 pywin32 lxml
|
||||
- if "%platform%/%configuration%" EQU "Win32/Debug" python PowerEditor\Test\xmlValidator\validator_xml.py
|
||||
# tests
|
||||
- ps: |
|
||||
if ("$env:platform/$env:configuration" -eq "Win32/Debug") {
|
||||
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\
|
||||
.\unitTestLauncher.ps1
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
cd ..\UrlDetection
|
||||
.\verifyUrlDetection.ps1
|
||||
|
||||
cd "$env:APPVEYOR_BUILD_FOLDER"
|
||||
}
|
||||
|
||||
- matrix:
|
||||
only:
|
||||
- compiler: GCC
|
||||
install:
|
||||
skip_commits:
|
||||
message: /\[xml\]/
|
||||
build_script:
|
||||
- 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%
|
||||
|
@ -110,7 +182,6 @@ for:
|
|||
Write-Output (make --version) | select-object -first 1
|
||||
Write-Output (sh --version) | select-object -first 1
|
||||
Write-Output ""
|
||||
build_script:
|
||||
- make -f PowerEditor\gcc\makefile
|
||||
after_build:
|
||||
# artifacts
|
||||
|
|
Loading…
Reference in New Issue