-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
96 lines (77 loc) · 2.9 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
image:
- Ubuntu
- Visual Studio 2017
services:
- docker
max_jobs: 2
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
init:
# Windows
- cmd: set GENERATOR=Ninja
- cmd: set VCVARS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat
- cmd: set PLATFORM=
- cmd: set VER_SUFFIX=win64
- cmd: set QT_DIR=C:\Qt\5.12\msvc2017_64
- cmd: call "%QT_DIR%\bin\qtenv2.bat"
- cmd: set PATH=C:\msys64\bin;C:\msys64\usr\bin;C:\Qt\Tools\QtCreator\bin;C:\Program Files\CMake\bin;%PATH%
- cmd: call "%VCVARS%" %PLATFORM%
- cmd: cd /D "%APPVEYOR_BUILD_FOLDER%"
# Linux
- sh: export CC=gcc
install:
# Linux
- sh: docker build -t rhd2000intf -f contrib/ci/Dockerfile .
- sh: if [ "$CC" = "clang" ]; then export CVENDOR="clang" CXX="clang" CC="clang"; fi
- sh: if [ "$CC" = "gcc" ]; then export CVENDOR="gcc" CXX="g++" CC="gcc"; fi
# Windows
- cmd: choco upgrade cmake ninja
- cmd: cd /D "%APPVEYOR_BUILD_FOLDER%"
before_build:
# Windows
- cmd: if defined APPVEYOR_REPO_TAG_NAME (for /F %%I in ('git rev-list --count HEAD') do set VERSION=%APPVEYOR_REPO_TAG_NAME%+git%%I) else for /F %%I in ('git rev-list --count HEAD') do set VERSION=git%%I
- cmd: set DEPLOY_DIR=RHD2000Electroplating-%VERSION%
- cmd: mkdir build
- cmd: cd build
- cmd: cmake -B.
-S..
-G "%GENERATOR%"
-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%"
-DMORE_WARNINGS=OFF # Clang can't distinguish system from our headers on Windows, so we get flooded with errors
- cmd: cd ..
build_script:
# Linux
- sh: docker run --security-opt seccomp:unconfined -t -e COMPILER_VENDOR=$CVENDOR -e CC=$CC -e CXX=$CXX -v `pwd`:/build rhd2000intf
./contrib/ci/cibuild.sh
# Windows
- cmd: cmake --build build
after_build:
# Windows
- cmd: cmake --build build --target install
- cmd: cd build
- ps: |
git clone https://github.com/bothlab/intan-okfrontpanel.git --depth 1
windeployqt `
--no-translations `
--no-quick-import `
--no-system-d3d-compiler `
--no-webkit2 `
--no-angle `
--no-opengl-sw `
$env:DEPLOY_DIR\bin\rhd2000electroplating.exe
rm -r $env:DEPLOY_DIR\bin\imageformats
rm -r $env:DEPLOY_DIR\share
cp ".\intan-okfrontpanel\libraries\Windows 64-bit\okFrontPanel.dll" $env:DEPLOY_DIR\bin\
cp $env:APPVEYOR_BUILD_FOLDER\data\rhythm\main.bit $env:DEPLOY_DIR\bin\
cp $env:APPVEYOR_BUILD_FOLDER\LICENSE $env:DEPLOY_DIR\LICENSE.txt
cp $env:APPVEYOR_BUILD_FOLDER\README.md $env:DEPLOY_DIR
- cmd: 7z a RHD2000Electroplating-%VERSION%-%VER_SUFFIX%.zip "%DEPLOY_DIR%"
- cmd: cd ..
test: off
artifacts:
- name: Debian Package
path: rhd2000electroplating_*.deb
- name: Win64 Executable
path: build/RHD2000Electroplating*.zip