-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
151 lines (129 loc) · 6.78 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
environment:
matrix:
- MSYSTEM : MINGW64
MBITS: 64
MARCH: x86_64
- MSYSTEM : MINGW32
MBITS: 32
MARCH: i686
platform:
- x64
skip_commits:
files:
- .travis.yml
- '*.md'
cache:
# cache pacman packages
# max cache size is 1 GB, which should be enough
# but in case we could cache only mingw-w64-*-qt4-*
- C:\msys64\var\cache\pacman\pkg\ -> .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 --needed --sync pacman-mirrors"
- bash -lc "pacman --noconfirm --needed -S autoconf automake bison flex"
#- bash -lc "pacman --noconfirm --needed -S mingw-w64-$MARCH-qt4"
# Qt4 was removed from MSYS2, see
# https://github.com/msys2/MINGW-packages/issues/3881
# and https://github.com/slowphil/texmacs-win-builder/issues/3 for the "fix"
# copied below
# pacman no longer finds qt4 probably because of https://github.com/msys2/MINGW-packages/issues/3881
# nevertheless the binary still exists in the repo (for the moment)
# https://msys2.duckdns.org/repos
# https://wiki.archlinux.org/index.php/offline_installation_of_packages
#
# download package directly into the local pacman packages directory, cached by AppVeyor
# make sure pacman packages directory exists (may not be there if no packages downloaded yet)
- bash -lc "mkdir -p /var/cache/pacman/pkg"
# use "no-clobber" option for wget since the file could/should already be in the cache
- bash -lc "cd /var/cache/pacman/pkg && wget -nc http://repo.msys2.org/mingw/$MARCH/mingw-w64-$MARCH-qt4-4.8.7-4-any.pkg.tar.xz && pacman --noconfirm --needed -U mingw-w64-$MARCH-qt4-4.8.7-4-any.pkg.tar.xz"
# 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 Qucsator and install
- git submodule init qucsator
- git submodule update qucsator
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucsator && ./bootstrap"
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/qucsator && ./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/qucsator && 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 }