|
1 | | -# Build image. |
2 | | -image: Visual Studio 2017 |
| 1 | +# Build image. Creates 4 build jobs |
| 2 | +image: |
| 3 | + - Visual Studio 2017 |
3 | 4 |
|
4 | | -# XXX - add output of git describe instead? v-2-10-0-rc-36-g04af0b4 |
5 | 5 | # XXX isn't it 2.11.0? |
6 | | -version: 2.10.0-{build} |
| 6 | +version: -v2.10.0-{build} |
| 7 | + |
| 8 | +# Only build the 'privat' branch. |
| 9 | +branches: |
| 10 | + only: |
| 11 | + - privat |
7 | 12 |
|
8 | | -# |
9 | 13 | # Skipping commits affecting these files |
10 | | -# |
11 | 14 | # XXX - add all the others |
12 | 15 | skip_commits: |
13 | 16 | files: |
14 | 17 | - '**/*.README.*' |
15 | 18 | - '**/*.md' |
| 19 | + - '**/*.txt' |
16 | 20 | - '**/*.png' |
17 | 21 | - '**/*.jpg' |
18 | 22 | - '**/*.html' |
19 | 23 |
|
| 24 | +environment: |
| 25 | + global: |
| 26 | + CL: -nologo |
| 27 | + LINK: -nologo |
| 28 | + URL: "https://ci.appveyor.com/api/projects/%APPVEYOR_ACCOUNT_NAME%/pthreads-win32/artifacts/PTHREADS-BUILT%APPVEYOR_BUILD_VERSION%.zip" |
| 29 | + |
| 30 | + matrix: |
| 31 | + - TOOLSET: MSVC1910 #-1919 = Visual Studio 15.0/2017 (v141 toolset) |
| 32 | + ARCH: x86 |
| 33 | + - TOOLSET: MSVC1910 |
| 34 | + ARCH: x86_amd64 |
| 35 | + - TOOLSET: MSVC1900 # Visual Studio 14.0/2015 (v140 toolset) |
| 36 | + ARCH: x86 |
| 37 | + - TOOLSET: MSVC1900 |
| 38 | + ARCH: x86_amd64 |
| 39 | + - TOOLSET: MSVC1900 |
| 40 | + ARCH: x86_arm |
| 41 | + - TOOLSET: MSVC1900 |
| 42 | + ARCH: amd64_arm |
| 43 | + |
| 44 | +matrix: |
| 45 | + # |
| 46 | + # Immediately finish build if one of the above jobs fails. |
| 47 | + # |
| 48 | + fast_finish: true |
| 49 | + # allow_failures: |
| 50 | + # - TOOLSET: MSVC1900 |
| 51 | + # ARCH: x86_arm |
| 52 | + # - TOOLSET: MSVC1900 |
| 53 | + # ARCH: amd64_arm |
| 54 | +# don't bother building these... |
| 55 | + exclude: |
| 56 | + - TOOLSET: MSVC1900 |
| 57 | + ARCH: x86_arm |
| 58 | + - TOOLSET: MSVC1900 |
| 59 | + ARCH: amd64_arm |
| 60 | + |
| 61 | +init: |
| 62 | +# Carriage returns can be bad |
| 63 | + - cmd: git config --global core.autocrlf input |
| 64 | + |
| 65 | +clone_folder: 'c:\%APPVEYOR_PROJECT_NAME%' |
| 66 | + |
| 67 | +# XXX - this will be the root prebuild output folder |
| 68 | +# Preserve "PTHREADS-BUILT%APPVEYOR_BUILD_VERSION%" directory in the root of build folder |
| 69 | +cache: PTHREADS-BUILT%APPVEYOR_BUILD_VERSION% |
| 70 | + |
| 71 | +install: |
| 72 | +# If there's a newer build queued for the same PR, cancel this one |
| 73 | +# XXX - change this to "If there's a newer build queued at all" |
| 74 | + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` |
| 75 | + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` |
| 76 | + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` |
| 77 | + throw "There are newer queued builds for this pull request, failing early." } |
| 78 | + |
| 79 | + # - ps: $url="https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/pthreads-win32/artifacts/PTHREADS-BUILT$env:APPVEYOR_BUILD_VERSION.zip" |
| 80 | + # - ps: if ($env:ARCH -eq "x86_amd64") {Invoke-WebRequest $env:URL} |
| 81 | + # - ps: if ($env:ARCH -eq "x86_amd64") {7z.exe x "PTHREADS-BUILT$env:APPVEYOR_BUILD_VERSION.zip"} |
| 82 | +# XXX - fix me! |
| 83 | + - cmd: 'if "%ARCH%"=="x86_amd64" appveyor DownloadFile "%URL%" && 7z.exe x PTHREADS-BUILT%APPVEYOR_BUILD_VERSION%.zip > NUL' |
| 84 | + |
| 85 | +# set compiler environment |
| 86 | + - cmd: if "%TOOLSET%"=="MSVC1910" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% |
| 87 | + - cmd: if not "%TOOLSET%"=="MSVC1910" call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %ARCH% |
| 88 | + |
20 | 89 | build_script: |
21 | | - - cmd: nmake all |
22 | | - - cmd: nmake install |
| 90 | + - cmd: nmake /nologo install DEPLOY=1 |
| 91 | + |
| 92 | +test_script: |
| 93 | + - cmd: cd tests |
| 94 | + - cmd: nmake /nologo clean VC |
| 95 | + - cmd: nmake /nologo VC NO_DEPS=1 BUGGY=1 TESTS="exception1 exception2 exception3_0 exception3 sequence1" & exit /b 0 |
| 96 | + # - cmd: nmake /nologo clean all-tests |
| 97 | + # - cmd: nmake /nologo -DEXHAUSTIVE clean all-tests |
| 98 | +# Warning: MORE_EXHAUSTIVE takes a few hours to complete! |
| 99 | + # - cmd: nmake /nologo -DEXHAUSTIVE clean all-tests MORE_EXHAUSTIVE=1 |
| 100 | + |
| 101 | +after_test: |
| 102 | + - ps: | |
| 103 | + $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH |
| 104 | + Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh |
| 105 | + bash codecov.sh -f "coverage.xml" -t 1eef4895-a479-44ae-aade-af4d1c5dc286 |
| 106 | +
|
| 107 | +artifacts: |
| 108 | +# IMPORTANT! If the artifact path starts with * surround the value with single quotes. |
| 109 | + |
| 110 | +# WIP: Push the entire PTHREADS-BUILT-{APPVEYOR_BUILD_NUMBER} folder as a single zip archive. |
| 111 | + - path: 'PTHREADS-BUILT%APPVEYOR_BUILD_VERSION%' |
| 112 | + |
| 113 | + |
| 114 | +notifications: |
| 115 | + - provider: GitHubPullRequest |
| 116 | + auth_token: |
| 117 | + secure: VwyaJwle6Sl0AuOebFpGCIXiPyC2aOZjH0MZe+i8YlFib7AcqvDkbZQUqKbVuHK5 |
| 118 | + template: "{{#passed}}:white_check_mark:{{/passed}}{{#failed}}:x:{{/failed}} [Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}} by @{{&commitAuthorUsername}})" |
| 119 | + |
| 120 | +# |
| 121 | +# One day... |
| 122 | +# |
| 123 | +# deploy: |
| 124 | +# Deploying to NuGet feed |
| 125 | +# - provider: NuGet |
| 126 | +# server: https://my.nuget.server/feed |
| 127 | +# api_key: |
| 128 | +# secure: FYWX6NfjZIVw== |
| 129 | +# skip_symbols: false |
| 130 | +# symbol_server: https://your.symbol.server/feed |
| 131 | +# artifact: MyPackage.nupkg |
| 132 | + |
| 133 | +# Deploy to GitHub Releases |
| 134 | +# - provider: GitHub |
| 135 | +# artifact: /.*\.nupkg/ # upload all NuGet packages to release assets |
| 136 | +# draft: false |
| 137 | +# prerelease: false |
| 138 | +# on: |
| 139 | +# branch: master # release from master branch only |
| 140 | +# appveyor_repo_tag: true # deploy on tag push only |
0 commit comments