-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
132 lines (110 loc) · 5.6 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
environment:
matrix:
- MSYSTEM : MINGW64
MBITS: 64
MARCH: x86_64
- MSYSTEM : MINGW32
MBITS: 32
MARCH: i686
platform:
- x64
skip_commits:
files:
- .travis.yml
- '*.md'
#cache:
# - C:\msys64\var\cache\pacman\pkg\mingw-w64-x86_64-qt4* -> .appveyor.yml
install:
# Take a look at the environment
- set
# a couple of convenience variables
- set QTDIR=c:\msys64\mingw%MBITS%\
- set QUCSDIR=c:\qucs-win%MBITS%\
- set MSYSHOME=C:\msys64\home\appveyor\
- set "PATH=C:\msys64\usr\bin;%QTDIR%\bin;%PATH%"
- bash -lc ""
- bash -lc "pacman --version"
- bash -lc "pacman -Q"
# Switch from SF to msys2.org (default, much faster)
- bash -lc "pacman --noconfirm --sync pacman-mirrors"
- bash -lc "pacman --noconfirm -S autoconf automake bison flex"
- bash -lc "pacman --noconfirm -S mingw-w64-$MARCH-qt4"
# Set compiler (64bit)
- set "CC=/c/msys64/mingw%MBITS%/bin/gcc.exe"
- set "CXX=/c/msys64/mingw%MBITS%/bin/g++.exe"
- bash -lc "awk --version | head -n1"
build_script:
## Notes
# * The "exec 0</dev/null" opens a dummy file descriptor to fix error: ./configure: line 560: 0: Bad file descriptor
## Other dependencies
# Download, build and install ADMS
- bash -lc "exec 0</dev/null && wget.exe http://sourceforge.net/projects/mot-adms/files/adms-source/2.3/adms-2.3.6.tar.gz"
- bash -lc "exec 0</dev/null && tar xvfz adms-2.3.6.tar.gz"
- bash -lc "exec 0</dev/null && cd adms-2.3.6/ && ./configure --prefix=/c/qucs-win$MBITS && make install && cd -"
- bash -lc "exec 0</dev/null && cd /c/qucs-win$MBITS/bin && ./admsXml -h"
## Build Qucs-GUI applications and install
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucs && ./bootstrap"
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucs && export QTDIR=/c/msys64/mingw$MBITS && ./configure --prefix=/c/qucs-win$MBITS --disable-dependency-tracking"
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucs && make -j2 install"
- bash -lc "exec 0</dev/null && cd /c/qucs-win$MBITS/bin && ./qucs -v"
## Build Qucs-core and install
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucs-core && ./bootstrap"
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucs-core && ./configure --prefix=/c/qucs-win$MBITS --with-mkadms=/c/qucs-win$MBITS/bin/admsXml --disable-dependency-tracking"
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucs-core && make -j2 install"
- bash -lc "exec 0</dev/null && cd /c/qucs-win$MBITS/bin && ./qucsator -v"
## Check
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucs && make check || :"
# Download, patch build and install ASCO
- bash -lc "exec 0</dev/null && wget.exe https://sourceforge.net/projects/asco/files/asco/0.4.10/ASCO-0.4.10.tar.gz"
- bash -lc "exec 0</dev/null && tar xvfz ASCO-0.4.10.tar.gz || true"
# expand Autotools.tar.gz to get a small patch for de36.c
- bash -lc "exec 0</dev/null && cd ASCO-0.4.10/ && tar xvfz Autotools.tar.gz"
# add patch for selecting the Qucs simulator name
- bash -lc "exec 0</dev/null && cd ASCO-0.4.10/ && patch -p1 < $APPVEYOR_BUILD_FOLDER/contrib/ASCO-Qucs_simulator_name.patch"
# build using the provided Makefile
- bash -lc "exec 0</dev/null && cd ASCO-0.4.10/ && make -f Makefile.win32"
# check if ASCO is working (it exits with a non-zero code, hence the '|| true' )
- bash -lc "exec 0</dev/null && cd ASCO-0.4.10/ && ./asco || true"
# copy the compiled programs to the Qucs binaries directory (not all may be needed)
- bash -lc "exec 0</dev/null && cygpath -w `pwd` && set"
- copy %MSYSHOME%\ASCO-0.4.10\asco.exe %QUCSDIR%\bin
- copy %MSYSHOME%\ASCO-0.4.10\asco-test.exe %QUCSDIR%\bin
- copy %MSYSHOME%\ASCO-0.4.10\tools\alter\alter.exe %QUCSDIR%\bin
- copy %MSYSHOME%\ASCO-0.4.10\tools\monte\monte.exe %QUCSDIR%\bin
- copy %MSYSHOME%\ASCO-0.4.10\tools\log\log.exe %QUCSDIR%\bin
- copy %MSYSHOME%\ASCO-0.4.10\tools\postp\postp.exe %QUCSDIR%\bin
## Prepare simple redistributable package (no qucs-doc)
# Qucs UI and core are already installed in /c/qucs-win$MBITS
# Copy required libraries, make binaries usable from command line, Windows Explorer
- copy %QTDIR%\bin\Qt3Support4.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\QtCore4.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\QtGui4.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\QtNetwork4.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\QtXml4.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\QtSql4.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\QtSvg4.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\QtScript4.dll %QUCSDIR%\bin
- copy "%QTDIR%\bin\libstdc++-6.dll" %QUCSDIR%\bin
- copy %QTDIR%\bin\libwinpthread-1.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\libpng16-16.dll %QUCSDIR%\bin
- copy %QTDIR%\bin\zlib1.dll %QUCSDIR%\bin
- if "%MSYSTEM%" == "MINGW32" (copy %QTDIR%\bin\libgcc_s_dw2-1.dll %QUCSDIR%\bin) else (copy %QTDIR%\bin\libgcc_s_seh-1.dll %QUCSDIR%\bin)
# Run from windows cmd
- cd %QUCSDIR%\bin
- qucs.exe -v
- qucsator.exe -v
# ignore exit code from ASCO
- asco || ver>nul
# TODO
# * one could zip the %QUCSDIR% and use it for testing
# * perhaps it is best we finish the top level 'make dist',
# doing so it is easier to create tarballs, build the binaries from it and distribute both.
after_build:
- 7z a %APPVEYOR_BUILD_FOLDER%\qucs-win%MBITS%.zip %QUCSDIR%
artifacts:
# variables here must use the PowerShell syntax
- path: qucs-win$(MBITS).zip
name: qucs-win$(MBITS).zip
#on_failure:
# - bash -lc "exec 0</dev/null && cat $APPVEYOR_BUILD_FOLDER/qucs/config.log"
# - ps: Get-ChildItem .\*.log -Recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }