File: appveyor.yml

package info (click to toggle)
libedlib 1.2.7-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,520 kB
  • sloc: cpp: 2,002; sh: 304; python: 131; makefile: 89; ansic: 7
file content (53 lines) | stat: -rw-r--r-- 2,002 bytes parent folder | download | duplicates (2)
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
platform:
  - x64

branches:
  only:
    - master # This will still build PRs.

image:
  - Visual Studio 2017
  - Visual Studio 2019

environment:
  matrix:
    - arch: x86
    - arch: x64

install:
  # Configuration for Meson
  - cmd: if %arch%==x86 (set PYTHON_ROOT=C:\python37) else (set PYTHON_ROOT=C:\python37-x64)
  - cmd: echo Using Python at %PYTHON_ROOT%
  - cmd: set PATH=%cd%;%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%
  - cmd: pip install ninja meson

  # Enable using MSVC through command line.
  - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch% )
  - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch% )

build_script:
  - cmd: echo Building on image %APPVEYOR_BUILD_WORKER_IMAGE%, arch %arch%.

  # Build with CMake (builds both static and shared library).
  - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( SET "GENERATOR_VS_VERSION=Visual Studio 15 2017" )
  - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( SET "GENERATOR_VS_VERSION=Visual Studio 16 2019" )
  - cmd: if "%arch%"=="x86" ( SET "GENERATOR_VS_ARCH=Win32" )
  - cmd: if "%arch%"=="x64" ( SET "GENERATOR_VS_ARCH=x64" )
  - cmd: cmake -G "%GENERATOR_VS_VERSION%" -A %GENERATOR_VS_ARCH% .
  - cmd: cmake --build . --config Release

  # Build with Meson.
  # Static library.
  - cmd: meson setup --backend=ninja -Ddefault_library=static meson-build-static .
  - cmd: meson compile -v -C meson-build-static
  # Shared library.
  - cmd: meson setup --backend=ninja -Ddefault_library=shared meson-build-shared .
  - cmd: meson compile -v -C meson-build-shared

test_script:
  # Test what CMake built.
  - cmd: bin\Release\runTests.exe

  # Test what Meson built.
  - cmd: meson test -C meson-build-static
  - cmd: meson test -C meson-build-shared