-
Notifications
You must be signed in to change notification settings - Fork 46
/
.travis.yml
160 lines (159 loc) · 7.45 KB
/
.travis.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
152
153
154
155
156
157
158
159
160
language: c
compiler:
- gcc
before_cache:
- |-
case $TRAVIS_OS_NAME in
osx)
brew cleanup;;
windows)
# https://unix.stackexchange.com/a/137322/107554
$msys2 pacman --sync --clean --noconfirm;
rm -f C:\tools\msys64\update.log;
rm -rf C:\tools\msys64\var\log;;
esac
os: linux
dist: bionic
addons:
apt:
packages:
- libfftw3-dev
- libcunit1-dev
env:
- WINDOW=kaiserbessel PRECISION=
- WINDOW=kaiserbessel PRECISION=--enable-float
- WINDOW=kaiserbessel PRECISION=--enable-long-double
jobs:
include:
- os: osx
osx_image: xcode12u
env: WINDOW=kaiserbessel PRECISION= BUILD_OCTAVE=1 BUILD_JULIA=1
addons: { homebrew: { packages: ["fftw", "cunit", "gcc@9", "octave"], casks: ["julia"] } }
cache: { directories: ["$HOME/Library/Caches/Homebrew"] }
- os: windows
compiler: gcc
env: WINDOW=kaiserbessel PRECISION= BUILD_JULIA=1
cache: { directories: ["$HOME/AppData/Local/Temp/chocolatey", "/C/tools/msys64"] }
git: { autocrlf: input, symlinks: true }
- os: windows
compiler: clang
env: WINDOW=kaiserbessel PRECISION= BUILD_JULIA=1
cache: { directories: ["$HOME/AppData/Local/Temp/chocolatey", "/C/tools/msys64"] }
git: { autocrlf: input, symlinks: true }
- dist: focal
compiler: gcc
env: WINDOW=kaiserbessel PRECISION= BUILD_OCTAVE=1 BUILD_JULIA=1
addons: { apt: { packages: ["libfftw3-dev", "libcunit1-dev", "liboctave-dev", "julia"] } }
- dist: bionic
compiler: clang
env: WINDOW=kaiserbessel PRECISION= BUILD_OCTAVE=1 BUILD_JULIA=1
addons: { apt: { packages: ["libfftw3-dev", "libcunit1-dev", "liboctave-dev"] } }
- compiler: gcc
env: WINDOW=kaiserbessel PRECISION= DIST=distcheck
addons: { apt: { packages: ["libfftw3-dev", "libcunit1-dev", "doxygen", "doxygen-latex", "graphviz"] } }
- compiler: clang
env: WINDOW=kaiserbessel PRECISION= DIST=distcheck
addons: { apt: { packages: ["libfftw3-dev", "libcunit1-dev", "doxygen", "doxygen-latex", "graphviz"] } }
- dist: focal
compiler: gcc
env: WINDOW=kaiserbessel PRECISION=--enable-float BUILD_OCTAVE=1
addons: { apt: { packages: ["libfftw3-dev", "libcunit1-dev", "liboctave-dev"] } }
- compiler: clang
env: WINDOW=kaiserbessel PRECISION=--enable-float BUILD_OCTAVE=1
addons: { apt: { packages: ["libfftw3-dev", "libcunit1-dev", "liboctave-dev"] } }
- compiler: clang
env: WINDOW=kaiserbessel PRECISION=--enable-long-double
- env: WINDOW=gaussian PRECISION=
- env: WINDOW=bspline PRECISION=
- env: WINDOW=sinc PRECISION=
- env: WINDOW=gaussian PRECISION=--enable-long-double
- env: WINDOW=bspline PRECISION=--enable-long-double
- env: WINDOW=sinc PRECISION=--enable-long-double
- env: WINDOW=gaussian PRECISION=--enable-float
- env: WINDOW=bspline PRECISION=--enable-float
- env: WINDOW=sinc PRECISION=--enable-float
before_install:
- |-
case $TRAVIS_OS_NAME in
windows)
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
choco uninstall -y mingw
choco upgrade --no-progress -y msys2 julia
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
export msys2+=" -msys2 -c "\"\$@"\" --"
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-fftw mingw-w64-x86_64-cunit autoconf perl libtool automake make
if [ "$CC" == "clang" ]; then $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-clang mingw-w64-x86_64-openmp; fi
## Install more MSYS2 packages from https://packages.msys2.org/base here
taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
export PATH=/C/tools/msys64/mingw64/bin:$PATH
export MAKE=mingw32-make # so that Autotools can find it
;;
*)
export mingw64=
;;
esac
before_script:
cat /proc/cpuinfo;
case $TRAVIS_OS_NAME in
linux)
if [ "$CC" == "clang" ]; then export LD_LIBRARY_PATH='/usr/local/clang/lib'; fi;
if [ "$BUILD_OCTAVE" = "1" ]; then
export OCTAVEDIR=/usr;
export OCTAVE=octave;
fi;
if [ "$BUILD_JULIA" = "1" ] && [ "$TRAVIS_DIST" = "bionic" ]; then
wget -q https://julialang-s3.julialang.org/bin/linux/x64/1.3/julia-1.3.1-linux-x86_64.tar.gz && tar -xf julia-*-linux-x86_64.tar.gz;
export julia=$(pwd)/julia-1.3.1/bin/julia;
fi;;
windows)
if [ "$CC" == "clang" ]; then export OPENMP_CFLAGS=-fopenmp=libomp; export LDFLAGS=-lomp; fi;
if [ "$BUILD_OCTAVE" = "1" ]; then
wget -q https://ftp.gnu.org/gnu/octave/windows/octave-5.2.0-w64.7z && 7z x octave-*.7z;
export OCTAVEDIR=$(pwd)/octave-5.2.0-w64;
rm $OCTAVEDIR/lib/octave/5.2.0/lib*.la;
export OCTAVE=$OCTAVEDIR/bin/octave-cli.exe;
fi;;
osx)
export CC=gcc-9;
export CPPFLAGS=-I/usr/local/include;
export LDFLAGS=-L/usr/local/lib;
export OCTAVEDIR=/usr/local;
export OCTAVE=octave-cli;;
esac;
if [ "x$TRAVIS_TAG" != "x" ]; then
NFFT_TRAVIS_TAG=$(sed -e 's/\([0-9]*\.[0-9]*\.[0-9]*\)\(.*\)/\1.\2/' <<< "$TRAVIS_TAG");
a=( ${NFFT_TRAVIS_TAG//./ } );
if [ ${#a[@]} -gt 2 ]; then
sed -e "s/\(m4_define(\[nfft_version_major\], \[\).*\(\])\)/\1${a[0]}\2/" -e "s/\(m4_define(\[nfft_version_minor\], \[\).*\(\])\)/\1${a[1]}\2/" -e "s/\(m4_define(\[nfft_version_patch\], \[\).*\(\])\)/\1${a[2]}\2/" -e "s/\(m4_define(\[nfft_version_type\], \[\).*\(\])\)/\1${a[3]}\2/" configure.ac > configure.ac.modified;
mv configure.ac.modified configure.ac;
fi;
fi;
script: $mingw64 ./bootstrap.sh
&& $mingw64 ./configure --with-window=$WINDOW $PRECISION --enable-all --enable-openmp
$(if [ "$BUILD_OCTAVE" = "1" ]; then echo "--with-octave=$OCTAVEDIR"; else echo ""; fi)
$(if [ "$BUILD_JULIA" = "1" ]; then echo "--enable-julia"; else echo ""; fi)
&& $mingw64 make
&& $mingw64 make check && $mingw64 make $DIST
&& if test "$BUILD_JULIA" = "1"; then for DIR in julia/nf*t julia/fastsum; do cd $DIR; for NAME in simple_test*.jl; do julia "$NAME"; done; cd ../..; done; fi
&& if test "$BUILD_OCTAVE" = "1"; then for DIR in matlab/nf*t matlab/fastsum; do cd $DIR; for NAME in simple_test*.m; do $OCTAVE --eval="run('$NAME')"; done; cd ../..; done; fi
after_failure: cat config.log && cat tests/test-suite.log && if test "$BUILD_OCTAVE" = "1"; then cat matlab/tests/test-suite.log; fi
notifications:
email: false
before_deploy:
- export NFFT_DISTRO=$(ls *.tar.gz)
- echo "Deploying $NFFT_DISTRO to GitHub releases..."
deploy:
provider: releases
prerelease: true
api_key:
secure: RzoI1Acp6lZncLnsINrEByZlL2EecIi9IygLFAklyF4YlMWRNhnu+ePW3AovFI7jU8v0H9LmSM0KYi3dIEUpQbQd46IVErihD2dZmICyxqpn1HUrfmpd3EQ1wFBA3wkCmvOWXcN3n8bCDDDV4HX6d/AQtRCp7G6HK+na8fG7JJqkBah50PytU9rcUCHIvzywg6HKQn1rbYOXhDcJs64Ns2F+z5iMlOHA02lRJgmO+5oU3Q2Bhk1V+JypEmMQ8u7zI9/TOVjMzIA0VVz68GiRHBShSRb5VPsGqhWZqqx0shpQqYVd7S9S50AURaqsSGTMmxM3pgWltkx8kUBGwessuX4uB5MdjyZwa1EJV0qIqCVxkxdX925P1zqR/0CBcbwRl9hIB6NytKodraoUbK7B3SaRF64a+l8h5gYBQfhZZEp5itkdvf+hOKQknCPiULS0yhzFLKYTui3h6iVToA2ncYzsesJdcO3vGRFWFyeFPHR/miuWMU4ZVJPKtyEU2A4SBTUIvaDIac1wvNns1fXXHuG7kiCUuZXRHjKQIhIpTahTy5/1RWolt0UlRo/SrKoW0ZDQF8NWwUy/+trdK9Ksr0aZHUo+q0rLSuJO82lJIs3mZpAGuM1a5rtQO9p7aPnuJy7Df4/1xhygig+00Mxw+D4u+HKsvgeJH01cz1rlybE=
file_glob: true
file: ${NFFT_DISTRO}
skip_cleanup: true
on:
condition: $DIST = distcheck && $CC = clang
tags: true
repo: NFFT/nfft