kopia lustrzana https://github.com/projecthorus/horusdemodlib
Add in cross compiling and github releases
rodzic
9dd4eafb27
commit
b6f7e6d503
51
.travis.yml
51
.travis.yml
|
@ -1,33 +1,36 @@
|
||||||
env:
|
env:
|
||||||
global:
|
|
||||||
- GCC_BASE=gcc-arm-none-eabi-8-2018-q4-major
|
|
||||||
- GCC_SHORT=8-2018q4
|
|
||||||
sudo: required
|
sudo: required
|
||||||
language: generic
|
language: generic
|
||||||
dist: xenial
|
dist: xenial
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages: libc6-i386 sox python3-numpy valgrind fonts-freefont-otf
|
packages: libc6-i386 sox python3-numpy valgrind fonts-freefont-otf libspeexdsp-dev
|
||||||
libspeexdsp-dev libsamplerate0-dev portaudio19-dev
|
libsamplerate0-dev portaudio19-dev libasound2-dev libao-dev libgsm1-dev libsndfile-dev
|
||||||
libasound2-dev libao-dev libgsm1-dev libsndfile-dev
|
mingw-w64
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- "$HOME/$GCC_BASE"
|
|
||||||
install:
|
install:
|
||||||
- export GCC_DIR=$HOME/$GCC_BASE
|
- export HABLIBDIR=${PWD}
|
||||||
- export GCC_ARCHIVE=$HOME/$GCC_BASE-linux.tar.bz2
|
- export MAKEFLAGS=-j2
|
||||||
- export GCC_URL=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/$GCC_SHORT/$GCC_BASE-linux.tar.bz2
|
|
||||||
- if [ ! -e $GCC_DIR/bin/arm-none-eabi-g++ ]; then wget -q $GCC_URL -O $GCC_ARCHIVE;
|
|
||||||
tar xfj $GCC_ARCHIVE -C $HOME; fi
|
|
||||||
- export HABLIBDIR=${PWD}
|
|
||||||
- export MAKEFLAGS=-j2
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- cd ${HABLIBDIR} && mkdir -p build_linux && cd build_linux
|
||||||
|
- cmake $HABLIBDIR && make -j4
|
||||||
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install sox; fi
|
||||||
|
- ctest --output-on-failure
|
||||||
|
- cd ${HABLIBDIR} && mkdir -p build_windows/src && cd build_windows
|
||||||
|
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then cmake $HABLIBDIR -DCMAKE_TOOLCHAIN_FILE=$HABLIBDIR/mingw-w64-x86_64.cmake && make -j4 ; fi
|
||||||
|
|
||||||
# build hablib -------------------------
|
before_deploy:
|
||||||
- cd ${HABLIBDIR} && mkdir -p build_linux && cd build_linux
|
- cd ${HABLIBDIR}
|
||||||
- cmake $HABLIBDIR && make -j4
|
deploy:
|
||||||
# Now run all the ctests
|
provider: releases
|
||||||
- ctest --output-on-failure
|
api_key:
|
||||||
|
secure: #Use travis setup releases to configure this
|
||||||
|
file:
|
||||||
|
- build_linux/src/libhorus.so # we might want to cross compile an arm version as well :)
|
||||||
|
- build_linux/src/libhorus.dylib
|
||||||
|
- build_windows/src/libhorus.dll
|
||||||
|
on:
|
||||||
|
repo: projecthorus/horusdemodlib
|
||||||
|
skip_cleanup: 'true'
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
|
||||||
|
|
||||||
|
# cross compilers to use for C, C++ and Fortran
|
||||||
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
|
||||||
|
set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
|
||||||
|
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
|
||||||
|
|
||||||
|
# target environment on the build host system
|
||||||
|
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
||||||
|
|
||||||
|
# modify default behavior of FIND_XXX() commands
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
Ładowanie…
Reference in New Issue