This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 319
/
appveyor.yml
96 lines (82 loc) · 3.12 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
#
# AppVeyor CI build script.
# https://ci.appveyor.com/project/kyamagu/mexopencv
#
# Note:
# We use prepared opencv binaries built using the same MinGW/Octave config,
# see: https://github.com/amroamroamro/opencv/blob/tag_3.4.1/appveyor.yml
#
# version format
version: 3.4.1.{build}
# clone directory
clone_folder: c:\dev\mexopencv
shallow_clone: true
# whitelisted branches to build
branches:
only:
- master
# disable automatic build/test/deploy phases
build: off
test: off
deploy: off
# build artifacts to keep
artifacts:
- path: mexopencv.7z
- path: .ci\*.log
- path: .ci\*.xml
# global environment variables
environment:
# OpenCV options
# (Note: the makefile calls pkg-config which needs to locate opencv.pc)
OPENCV_DIR: c:\dev\build\install
PKG_CONFIG_PATH: /c/dev/build/install
# Octave options
OCTAVE_HOME: c:\dev\octave-4.4.1-w32
OCTAVE_OPTS: --no-gui --no-window-system --no-init-file --quiet
# mexopencv options
# (build choices: mexopencv.make() in Octave, or Makefile in shell)
# (Note: Make 3.81 included has poor jobs support, we use Make 4.2 instead)
MCV_ROOT: c:\dev\mexopencv
WITH_MAKE: yes
MAKE_OPTS: MATLABDIR='/c/dev/octave-4.4.1-w32' WITH_OCTAVE=true WITH_CONTRIB=true
MAKE_EXTRA: -j2
BUILD_CMD: cvsetup(true); mexopencv.make('opencv_path',getenv('OPENCV_DIR'), 'opencv_contrib',true, 'progress',false, 'verbose',1);
TEST_CMD: cvsetup(true); [~,pass] = UnitTest('ContribModules',true,'Verbosity',2); exit(~pass);
WITH_DOXY: yes
install:
# install dependencies (Doxygen, Make, OpenCV, Octave)
- cd "c:\dev"
- if "%WITH_DOXY%" == "yes" ( choco install doxygen.portable -y -r )
- ps: Start-FileDownload "https://github.com/amroamroamro/opencv/releases/download/3.2.0/mingw32-make.exe"
- ps: Start-FileDownload "https://github.com/amroamroamro/opencv/releases/download/3.4.1/cv341_x86_mingw.7z"
- ps: Start-FileDownload "https://ftp.gnu.org/gnu/octave/windows/octave-4.4.1-w32.7z"
- 7z x "c:\dev\cv341_x86_mingw.7z" -o"c:\dev\build" -y > nul
- 7z x "c:\dev\octave-4.4.1-w32.7z" -o"c:\dev" -y > nul
- copy /y "%OCTAVE_HOME%\bin\libopenblas.dll" "%OCTAVE_HOME%\bin\libblas.dll" > nul
- set "PATH=%OCTAVE_HOME%\bin;%OPENCV_DIR%\x86\mingw\bin;c:\dev;%PATH%"
build_script:
# compile mexopencv
- if "%WITH_MAKE%" == "yes" (
sh --login -c "cd \"$MCV_ROOT\" && mingw32-make $MAKE_OPTS $MAKE_EXTRA all contrib"
) else (
cd "%MCV_ROOT%\.ci" && octave-cli %OCTAVE_OPTS% --eval "%BUILD_CMD%"
)
# package MEX-files
- cd "%MCV_ROOT%" && 7z a -t7z "%MCV_ROOT%\mexopencv.7z" *.mex -r -y > nul
# build docs
- if "%WITH_DOXY%" == "yes" ( doxygen Doxyfile )
test_script:
# run test suite
- if "%WITH_MAKE%" == "yes" (
sh --login -c "cd \"$MCV_ROOT\" && mingw32-make $MAKE_OPTS test"
) else (
cd "%MCV_ROOT%\.ci" && octave-cli %OCTAVE_OPTS% --eval "%TEST_CMD%"
)
after_test:
# upload xUnit test results
- ps: |
$xUnitFile = "$env:MCV_ROOT\.ci\tests.xml"
$url = "https://ci.appveyor.com/api/testresults/junit/$env:APPVEYOR_JOB_ID"
if (Test-Path -Path $xUnitFile) {
(New-Object System.Net.WebClient).UploadFile($url, $xUnitFile)
}