-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.appveyor.yml
87 lines (76 loc) · 3.26 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
image:
- macos-monterey
- Ubuntu2004
- Visual Studio 2022
platform:
- x64
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
for:
- matrix:
only:
- image: Ubuntu2004
environment:
CC_CLANG: clang-14
CXX_CLANG: clang++-14
CXXFLAGS_CLANG_LIBCPP: -stdlib=libc++
CC_GCC: gcc-11
CXX_GCC: g++-11
install:
- curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-add-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main'
- sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update
- sudo apt-get -y --allow-change-held-packages remove mssql-server
- sudo apt-get -y install clang-14 libc++-14-dev libc++abi-14-dev g++-11 libstdc++-11-dev
# on_finish:
# - sh: export APPVEYOR_SSH_BLOCK=true
# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
- matrix:
only:
- image: macos-monterey
environment:
CC_CLANG: /usr/local/opt/llvm/bin/clang
CXX_CLANG: /usr/local/opt/llvm/bin/clang++
CXXFLAGS_CLANG_LIBCPP: -stdlib=libc++
CC_GCC: gcc-12
CXX_GCC: g++-12
install:
- brew install ninja llvm@13 gcc@12
# on_finish:
# - sh: export APPVEYOR_SSH_BLOCK=true
# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
- matrix:
only:
- image: Visual Studio 2022
before_build:
# ---- Mac & Linux ----
# install Vcpkg
- sh: /bin/bash .ci/install-vcpkg.sh
# ---- Windows ----
# install Vcpkg
- ps: .ci\install-vcpkg.ps1
build_script:
# ---- Mac & Linux ----
# build project with Clang (libc++ and libstdc++)
- sh: CC="$CC_CLANG" CXX="$CXX_CLANG" CXXFLAGS="$CXXFLAGS_CLANG_LIBCPP" /bin/bash .ci/build-project.sh build-clang-libcpp
- sh: ./build-clang-libcpp/src/show_info/show_info
- sh: ./build-clang-libcpp/src/example/example
# build project with GCC
- sh: CC="$CC_GCC" CXX="$CXX_GCC" /bin/bash .ci/build-project.sh build-gcc
- sh: ./build-gcc/src/show_info/show_info
- sh: ./build-gcc/src/example/example
# ---- Windows ----
# build project with MSVC
- ps: .ci\build-project.ps1 build-msvc
- ps: .\build-msvc\src\show_info\Debug\show_info.exe
- ps: .\build-msvc\src\example\Debug\example.exe
test_script:
# ---- Mac & Linux ----
- sh: ctest --output-on-failure --output-junit test-results-clang-libcpp.xml --test-dir build-clang-libcpp
- sh: ctest --output-on-failure --output-junit test-results-gcc.xml --test-dir build-gcc
- sh: find "$APPVEYOR_BUILD_FOLDER" -type f -name 'test-results*.xml' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/junit/$APPVEYOR_JOB_ID"
# ---- Windows ----
- ps: ctest --output-on-failure --output-junit test-results-msvc.xml --test-dir build-msvc -C Debug
- ps: $wc = New-Object 'System.Net.WebClient'
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($Env:APPVEYOR_JOB_ID)", (Resolve-Path .\build-msvc\test-results-msvc.xml))