-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy path.travis.yml
47 lines (39 loc) · 1.98 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
language: c
os:
- linux
- osx
dist: bionic
osx_image: xcode11.6
compiler:
- gcc
- clang
cache: ccache
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libao-dev libfftw3-dev librtlsdr-dev mingw-w64 python3-pyaudio; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask install wine-stable; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libao fftw librtlsdr mingw-w64 portaudio ccache; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; ln -s /usr/local/bin/ccache /usr/local/opt/ccache/libexec/i686-w64-mingw32-gcc; ln -s /usr/local/bin/ccache /usr/local/opt/ccache/libexec/x86_64-w64-mingw32-gcc; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install pyaudio; fi
before_script:
- mkdir build
- cd build
- cmake ..
- make -j3
- sudo make install
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ldconfig; fi
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then CC= ../support/win-cross-compile 32 -j3; fi
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then CC= ../support/win-cross-compile 64 -j3; fi
script:
- xz -d < ../support/sample.xz > sample
- nrsc5 -r sample -o sample.wav 0 2> sample.log
- cat sample.log
- grep -q "You're Listening to Q" sample.log
- cat sample | nrsc5 -r - -o sample.wav 0 2> sample.log
- grep -q "You're Listening to Q" sample.log
- ../support/cli.py -r sample 0
- cat sample | ../support/cli.py -r - 0
- if [[ "TRAVIS_OS_NAME" == "osx" && "$TRAVIS_COMPILER" == "gcc" ]]; then wine ../build-win32/bin/nrsc5.exe -r sample -o sample.wav 0 2> sample.log && grep -q "You're Listening to Q" sample.log; fi
- if [[ "TRAVIS_OS_NAME" == "osx" && "$TRAVIS_COMPILER" == "gcc" ]]; then wine ../build-win64/bin/nrsc5.exe -r sample -o sample.wav 0 2> sample.log && grep -q "You're Listening to Q" sample.log; fi