This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
68 lines (62 loc) · 2.98 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
build: false
platform:
- x64
- x86
clone_depth: 1
clone_folder: C:\projects\skeleton-generators
environment:
matrix:
- dependencies: high
PHP_VERSION: 7.3
- dependencies: lowest
PHP_VERSION: 7.3
matrix:
fast_finish: true
# cache is cleared when linked file is modified
cache:
# Cache chocolatey packages
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
# Cache php install
- C:\tools\php -> .appveyor.yml
# Cache composer
- C:\projects\skeleton-generators\vendor -> composer.json
- '%LOCALAPPDATA%\Composer\files -> composer.json'
init:
- SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH%
- SET ANSICON=121x90 (121x90)
- SET COMPOSER_NO_INTERACTION=1
- SET COMPOSER_UP=php composer.phar update --no-interaction --prefer-dist --no-progress --profile --no-suggest --ansi
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($Env:APPVEYOR_PULL_REQUEST_NUMBER -and $Env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$Env:APPVEYOR_ACCOUNT_NAME/$Env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $Env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# Install PHP
- appveyor DownloadFile "https://raw.githubusercontent.com/prisis/ps-install-php/master/Install-PHP.ps1"
- ps: if (-not (Test-Path C:\tools\php)) {.\Install-PHP.ps1 -InstallPath C:\tools\php -Version $Env:PHP_VERSION -Highest -Arch $Env:PLATFORM -Extensions mbstring,intl,openssl,fileinfo,curl}
# PHP settings and extensions
- cd C:\tools\php
- echo zend_extension=php_opcache.dll >> php.ini
- echo max_execution_time=1200 >> php.ini
- echo date.timezone="Europe/Berlin" >> php.ini
- echo opcache.enable_cli=1 >> php.ini
- echo apc.enable_cli=1 >> php.ini
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
- cd C:\projects\skeleton-generators
- php -r "readfile('https://getcomposer.org/installer');" | php
# Matrix
- php composer.phar global require narrowspark/automatic-composer-prefetcher:dev-master
- IF %dependencies%==lowest appveyor-retry %COMPOSER_UP% --prefer-lowest --prefer-stable
- IF %dependencies%==high appveyor-retry %COMPOSER_UP%
- cd build/appveyor
- appveyor DownloadFile https://cdn.rawgit.com/prisis/43a2a7b137998ac92e24ee4daaa8e296/raw/681b89b8e156750de46558ead661509c468fb9a2/try_catch.sh
test_script:
- cd C:\projects\skeleton-generators
- sh ./build/appveyor/script.sh