Enable LTO on Linux builds, general Travis fixes
This commit is contained in:
parent
80c879032d
commit
96079cdebd
5 changed files with 10 additions and 8 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- INSTALL_DIR="sfizz-$(git describe --tags)-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,14 @@ cmake_dir="cmake-3.13.0-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
||||||
cmake_arc="${cmake_dir}.tar.gz"
|
cmake_arc="${cmake_dir}.tar.gz"
|
||||||
cmake_url="https://github.com/sfztools/cmake/releases/download/${TRAVIS_OS_NAME}/${cmake_arc}"
|
cmake_url="https://github.com/sfztools/cmake/releases/download/${TRAVIS_OS_NAME}/${cmake_arc}"
|
||||||
|
|
||||||
if [ ${TRAVIS_OS_NAME} = "linux" ]; then
|
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||||
wget -q ${cmake_url}
|
wget -q ${cmake_url}
|
||||||
tar xzf ${cmake_arc}
|
tar xzf ${cmake_arc}
|
||||||
cd ${TRAVIS_BUILD_DIR}/${cmake_dir}
|
cd ${TRAVIS_BUILD_DIR}/${cmake_dir}
|
||||||
sudo cp bin/* /usr/local/bin/
|
sudo cp bin/* /usr/local/bin/
|
||||||
sudo cp -r share/* /usr/local/share/
|
sudo cp -r share/* /usr/local/share/
|
||||||
export PATH="/usr/local/bin:$PATH" # FIXME
|
export PATH="/usr/local/bin:$PATH" # FIXME
|
||||||
elif [ ${TRAVIS_OS_NAME} = "osx" ]; then
|
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
||||||
sudo ln -s /usr/local /opt/local
|
sudo ln -s /usr/local /opt/local
|
||||||
brew update
|
brew update
|
||||||
brew upgrade cmake
|
brew upgrade cmake
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||||
sudo apt-get install libasound2-dev libjack-jackd2-dev libsndfile1-dev lv2-dev
|
sudo apt-get install libasound2-dev libjack-jackd2-dev libsndfile1-dev lv2-dev
|
||||||
|
|
||||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
mkdir -p build/${INSTALL_DIR} && cd build
|
mkdir -p build/${INSTALL_DIR} && cd build
|
||||||
|
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/${INSTALL_DIR} ..
|
||||||
|
|
||||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||||
# FIXME: lto error in build when enabled
|
|
||||||
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=OFF -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/${INSTALL_DIR} ..
|
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
||||||
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/${INSTALL_DIR} ..
|
|
||||||
make -j$(sysctl -n hw.ncpu)
|
make -j$(sysctl -n hw.ncpu)
|
||||||
|
|
||||||
# Xcode not currently supported, see https://gitlab.kitware.com/cmake/cmake/issues/18088
|
# Xcode not currently supported, see https://gitlab.kitware.com/cmake/cmake/issues/18088
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
set -x # No fail, we need to go back to the original branch at the end
|
set -x # No fail, we need to go back to the original branch at the end
|
||||||
|
|
||||||
# Build documentation only from Linux x86_64 builds
|
# Build documentation only from Linux x86_64 builds
|
||||||
if [[ ${TRAVIS_CPU_ARCH} != "amd64" ]]; then exit 0; fi
|
if [[ ${TRAVIS_CPU_ARCH} != "amd64" && ${TRAVIS_OS_NAME} != "linux" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
doxygen Doxyfile
|
doxygen Doxyfile
|
||||||
git fetch --depth=1 https://github.com/${TRAVIS_REPO_SLUG}.git refs/heads/gh-pages:refs/remotes/origin/gh-pages
|
git fetch --depth=1 https://github.com/${TRAVIS_REPO_SLUG}.git refs/heads/gh-pages:refs/remotes/origin/gh-pages
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue