forked from skui-org/skui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
115 lines (100 loc) · 4.96 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
environment:
matrix:
- TOOLCHAIN: "Visual Studio 2019 x64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
GENERATOR: Visual Studio 16 2019
VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
VCVARSARG: amd64
CMAKE_ARGS: -A x64
BUILD_ARGS: /verbosity:quiet /clp:PerformanceSummary;Summary;ShowCommandLine;ForceNoAlign
PACKAGE_ID: vs2019_x86_64
- TOOLCHAIN: "Visual Studio 2019 ClangCL x64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
GENERATOR: Visual Studio 16 2019
VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
VCVARSARG: amd64
CMAKE_ARGS: -A x64 -T ClangCL
BUILD_ARGS: /verbosity:minimal
PACKAGE_ID: vs2019clang9_x86_64
# Mingw-w64
- TOOLCHAIN: "MinGW-w64 GCC"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
GENERATOR: Ninja
PACMAN_PACKAGES: "mingw-w64-x86_64-{headers,crt,gcc,ninja,binutils}"
PATH: C:\msys64\mingw64\bin;%PATH%
CMAKE_ARGS: -DGC_SECTIONS=OFF
PACKAGE_ID: mingw_x86_64
# Clang 10.0.0 targeting MSVC 2019
- TOOLCHAIN: "Visual Studio 2019 Clang/LLVM 10.0.1"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
GENERATOR: Ninja
PACMAN_PACKAGES: "mingw-w64-x86_64-ninja"
PATH: C:\Program Files\LLVM\bin;C:\msys64\mingw64\bin;%PATH%
VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
VCVARSARG: amd64
CMAKE_ARGS: -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
CLANG_URL: https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/LLVM-10.0.1-win64.exe
PACKAGE_ID: vs2019clang10_x86_64
# Clang 11.0.0 targeting MSVC 2019
- TOOLCHAIN: "Visual Studio 2019 Clang/LLVM 11.1.0"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
GENERATOR: Ninja
PACMAN_PACKAGES: "mingw-w64-x86_64-ninja"
PATH: C:\Program Files\LLVM\bin;C:\msys64\mingw64\bin;%PATH%
VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
VCVARSARG: amd64
CMAKE_ARGS: -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
CLANG_URL: https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/LLVM-11.1.0-win64.exe
PACKAGE_ID: vs2019clang10_x86_64
# Clang targeting mingw-w64
- TOOLCHAIN: "MinGW-w64 Clang"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
GENERATOR: Ninja
PACMAN_PACKAGES: "mingw-w64-x86_64-{headers,crt,clang,ninja,binutils}"
PATH: C:\msys64\mingw64\bin;%PATH%
CMAKE_ARGS: -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DGC_SECTIONS=OFF
PACKAGE_ID: mingwclang_x86_64
configuration:
- Release
matrix:
allow_failures:
- TOOLCHAIN: "MinGW-w64 Clang"
install:
- if defined VCVARS call "%VCVARS%" %VCVARSARG%
- if DEFINED PACMAN_PACKAGES C:\msys64\usr\bin\bash.exe -lc "yes | pacman -Rd --noconfirm mingw-w64-i686-gcc-ada mingw-w64-x86_64-gcc-ada mingw-w64-i686-gcc-objc mingw-w64-x86_64-gcc-objc"
- if DEFINED PACMAN_PACKAGES C:\msys64\usr\bin\bash.exe -lc "yes | pacman --needed --noconfirm -Syu"
- if DEFINED PACMAN_PACKAGES C:\msys64\usr\bin\bash.exe -lc "yes | pacman --needed --noconfirm -Syu"
- if DEFINED PACMAN_PACKAGES C:\msys64\usr\bin\bash.exe -lc "yes | pacman --needed --noconfirm -S %PACMAN_PACKAGES%"
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- if defined CLANG_URL appveyor DownloadFile %CLANG_URL% -FileName llvm-installer.exe
- if defined CLANG_URL START /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM"
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule -q update --init --recursive
before_build:
- set DEPLOY_FILE_NAME=skui_windows-%PACKAGE_ID%_%APPVEYOR_REPO_TAG_NAME%
- git rev-parse --short=10 @:./3rdparty > 3rdparty_hash.txt
- set /p PREBUILT_3RDPARTY_HASH=<3rdparty_hash.txt
- set PREBUILT_3RDPARTY_PACKAGE=3rdparty_windows-%PACKAGE_ID%_%PREBUILT_3RDPARTY_HASH%
- echo %PREBUILT_3RDPARTY_PACKAGE%
- appveyor DownloadFile https://github.com/skui-org/3rdparty/releases/download/%PREBUILT_3RDPARTY_HASH%/%PREBUILT_3RDPARTY_PACKAGE%.7z
- 7z x %PREBUILT_3RDPARTY_PACKAGE%.7z
build_script:
- mkdir build
- cd build
- cmake %CMAKE_ARGS% -G"%GENERATOR%" -DCMAKE_BUILD_TYPE="%CONFIGURATION%" -DSKUI_USE_PREBUILT_3RDPARTY=ON -DSKUI_PREBUILT_3RDPARTY_PATH=%CD%/../%PREBUILT_3RDPARTY_PACKAGE% -DCPACK_PACKAGE_FILE_NAME=%DEPLOY_FILE_NAME% -DCPACK_GENERATOR=7Z .. || (echo CMAKEERROR && type CMakeFiles\CMakeError.log && echo CMAKEOUTPUT && type CMakeFiles\CMakeOutput.log && exit 1)
- cmake --build . --config %CONFIGURATION% --target package -- %BUILD_ARGS%
test_script:
- ctest --output-on-failure -C %CONFIGURATION%
artifacts:
- path: build/$(DEPLOY_FILE_NAME).7z
name: package
deploy:
- provider: GitHub
release: $(APPVEYOR_REPO_TAG_NAME)
tag: $(APPVEYOR_REPO_TAG_NAME)
force_update: true
artifact: package
auth_token:
secure: MLSAQ6y/jIxgGwKzO1/LIoG7hueJzhunmBHCIb3c/MbvP64eeY6py4Xqk39k8Gwc
on:
APPVEYOR_REPO_TAG: true