Files
MariaDB/appveyor.yml

82 lines
3.1 KiB
YAML

version: build-{build}~branch-{branch}
clone_depth: 10
skip_branch_with_pr: true
before_build:
- ps: |
function Get-Remote-Ref($ref) {
try {
$result = git ls-remote origin $ref 2>$null
if (-not $result) {
"Warning: Could not fetch remote ref '$ref'"
return $null
}
return ($result -split "`t")[0]
} catch {
"Warning: Exception while running git ls-remote for '$ref': $_"
return $null
}
}
Get-ChildItem Env: | Where-Object { $_.Name -like 'APPVEYOR*COMMIT' } | ForEach-Object { "$($_.Name)=$($_.Value)" }
$commit = $env:APPVEYOR_REPO_COMMIT
$commit2 = $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT
$branch = $env:APPVEYOR_REPO_BRANCH
$latest = $null
$mainBranch = $branch -match '^(main|\d+\.\d+)$'
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null) {
"Branch build detected"
$latest = Get-Remote-Ref "refs/heads/$branch"
} else {
$pr = $env:APPVEYOR_PULL_REQUEST_NUMBER
$latest = Get-Remote-Ref "refs/pull/$pr/head"
$mainBranch = $False
"Pull Request build detected"
}
if ($latest -and ($commit -ne $latest) -and ($commit2 -ne $latest) -and (-not $mainBranch)) {
"Skipping outdated commit (latest is $latest)"
Exit-AppVeyorBuild
}
environment:
OPENSSL_ROOT_DIR: C:/OpenSSL-v32-Win64
build_script:
# dump some system info
- echo processor='%PROCESSOR_IDENTIFIER%' , processor count= %NUMBER_OF_PROCESSORS%
- cd %APPVEYOR_BUILD_FOLDER%
# Disable unneeded submodules for the faster build
- git config submodule.storage/columnstore/columnstore.update none
- git config submodule.storage/maria/libmarias3.update none
- git config submodule.storage/rocksdb/rocksdb.update none
- git config submodule.wsrep-lib.update none
# Build minimal configuration
- mkdir _build
- cd _build
- set BUILD_TYPE=MinSizeRel
- set PATH=%OPENSSL_ROOT_DIR%;%PATH%
- set GENERATOR=-GNinja
- call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
- cmake -E time cmake %GENERATOR% .. -DWITH_SSL=system -DHAVE_OPENSSL_APPLINK_C=1 -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT_DIR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\cygwin64\bin\bison.exe -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO
- set /A jobs=2*%NUMBER_OF_PROCESSORS%
- cmake -E time cmake --build . -j %jobs% --config %BUILD_TYPE% --target minbuild
test_script:
- set PATH=C:\Strawberry\perl\bin;%OPENSSL_ROOT_DIR%;%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
- cd %APPVEYOR_BUILD_FOLDER%\_build\mysql-test
- set /A parallel=4*%NUMBER_OF_PROCESSORS%
- perl mysql-test-run.pl --force --max-test-fail=10 --retry=2 --parallel=%parallel% --testcase-timeout=4 --suite=main --skip-test-list=%APPVEYOR_BUILD_FOLDER%\win\appveyor_skip_tests.txt --mysqld=--loose-innodb-flush-log-at-trx-commit=2
skip_commits:
files:
- debian/
- '**/*.sh'
branches:
only:
- /bb-/
- /\d+\.\d+$/
- main
image: Visual Studio 2022