Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Switch to Xenial for Releases (#29) (Fix #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
thestr4ng3r authored Sep 13, 2019
1 parent 57418e5 commit c9401aa
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 3 deletions.
1 change: 1 addition & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ artifacts:
deploy:
description: 'Chiaki Binaries'
provider: GitHub
draft: true
auth_token:
secure: Amvzm3PMM5nv+iFsqaU7TZ9fgyYt/YIrOLV0QMiCyOoUlLRIaiYxWiJ7maTpxhZ9
artifact: "Chiaki"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ appdir
/SDL2-*
/opus*
/ffmpeg*
/sdl2-*
/protoc*
/openssl*
.vs
Expand Down
34 changes: 31 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ branches:

matrix:
include:
- name: Linux
- name: Linux (Bionic)
os: linux
dist: bionic
addons:
apt:
sources:
- sourceline: "ppa:beineri/opt-qt-5.12.0-bionic"
packages:
- libprotoc-dev
- protobuf-compiler
- python3-protobuf
- libopus-dev
Expand All @@ -29,7 +28,33 @@ matrix:
env:
- CMAKE_PREFIX_PATH="$TRAVIS_BUILD_DIR/ffmpeg-prefix;/opt/qt512"
- CMAKE_EXTRA_ARGS="-DCMAKE_INSTALL_PREFIX=/usr"
- DEPLOY=0

- name: Linux (Xenial, Deploy)
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: "ppa:beineri/opt-qt-5.12.3-xenial"
packages:
- python3-pip
- libopus-dev
- qt512base
- qt512multimedia
- qt512svg
- libgl1-mesa-dev
- nasm
env:
- CMAKE_PREFIX_PATH="$TRAVIS_BUILD_DIR/ffmpeg-prefix;$TRAVIS_BUILD_DIR/sdl2-prefix;/opt/qt512"
- CMAKE_EXTRA_ARGS="-DCMAKE_INSTALL_PREFIX=/usr"
- DEPLOY_FILE="Chiaki-x86_64.AppImage"
- SDL2_FROM_SRC=1
- DEPLOY=1
before_install:
- sudo pip3 install protobuf
- scripts/fetch-protoc.sh
- export PATH="$TRAVIS_BUILD_DIR/protoc/bin:$PATH"
after_success:
- make install DESTDIR=../appdir
- cd ..
Expand All @@ -54,6 +79,7 @@ matrix:
env:
- CMAKE_PREFIX_PATH="$TRAVIS_BUILD_DIR/ffmpeg-prefix;/usr/local/opt/openssl@1.1;/usr/local/opt/qt"
- CMAKE_EXTRA_ARGS=""
- DEPLOY=1
after_success:
- cd ..
- cp -a build/gui/chiaki.app Chiaki.app
Expand All @@ -73,6 +99,7 @@ matrix:

install:
- scripts/build-ffmpeg.sh
- if [ ! -z "$SDL2_FROM_SRC" ]; then scripts/build-sdl2.sh || exit 1; fi

before_script:
- export CHIAKI_VERSION="$TRAVIS_TAG"
Expand All @@ -82,7 +109,6 @@ script:
- mkdir build && cd build
- cmake
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH
-DCHIAKI_ENABLE_TESTS=ON
-DCHIAKI_ENABLE_CLI=OFF
Expand All @@ -96,8 +122,10 @@ script:
deploy:
skip_cleanup: true
provider: releases
draft: true
api_key:
secure: R7RjLOuGFda05EJeNX2lNG135xKU2w9IQn7p1H1P2zw4zlQMgSBpNRaW8hE408x5KJUjptJTF6QaYYmPWbHlf9VEPFVIcVzSp8YSd2Cdr+GKhmFgWF+fJPBj5y9NNqohwxvK3Nrugh0v6yVQiEYEGF7WArU6dvymSNNTw/EqXtfrOvwUgSf1bDAzQAsXn3E6Ptzf9DrQU8+mOgMSqT/3Wy5207KLmWTtwBWDgkskKwS9OEXk3tDd6U4uT7NFHHmcw+ZjQXRD+yHSHUWYs1oKR4IfgPFxQfEK0Txhkxdf3yj1aNweuk7GGC3cfRaarUfRQpoYqYYCxhTfGZ2b4rVgX3XpssMY7ZmSZHRi/SX08ETXF/c7PZGzr0RPFXZLgAGjgN6O2Dbb9agc3tOUGDUuqKEWX9sALm82WS0FRAFrFLENgMFsj5hu+DKIIkAU2yEsadYKjjhC+q+mTAEkxKKknvM50Xpx3tE1TlP/31Z53v4/NydHIHXPJ72V3mnuoTacwhG2SkGtjMbLCnEZDCtu9C4556oa7Z29cqafv90ZD7lTQMV+ijKvjxgOC9u1GeemmZLofRGDFyYSqKxOpYxxxXGOhs+7FMAdKP00h++MTLwRwIebKQs0fW0XiNKmwushWOUU8sXI1jxTbwe9dPQsspxHRv/mVo6l2vUcBjC19K0=
file: $DEPLOY_FILE
on:
tags: true
condition: $DEPLOY = 1
1 change: 1 addition & 0 deletions cmake/FindSDL2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if(SDL2_FOUND AND (NOT TARGET SDL2::SDL2))
endif()
find_library(SDL2_LIBRARY SDL2 PATHS "${SDL2_LIBDIR}" NO_DEFAULT_PATH)
if(SDL2_LIBRARY)
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
set_target_properties(SDL2::SDL2 PROPERTIES
IMPORTED_LOCATION "${SDL2_LIBRARY}"
IMPORTED_LINK_INTERFACE_LIBRARIES "${SDL2_LIBRARIES}"
Expand Down
41 changes: 41 additions & 0 deletions scripts/build-sdl2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

cd $(dirname "${BASH_SOURCE[0]}")/..
ROOT="`pwd`"

URL=https://www.libsdl.org/release/SDL2-2.0.10.tar.gz
FILE=SDL2-2.0.10.tar.gz
DIR=SDL2-2.0.10

if [ ! -d "$DIR" ]; then
wget "$URL" || exit 1
tar -xf "$FILE" || exit 1
fi

cd "$DIR" || exit 1

mkdir -p build && cd build || exit 1
cmake \
-DCMAKE_INSTALL_PREFIX="$ROOT/sdl2-prefix" \
-DSDL_ATOMIC=OFF \
-DSDL_AUDIO=OFF \
-DSDL_CPUINFO=OFF \
-DSDL_EVENTS=ON \
-DSDL_FILE=OFF \
-DSDL_FILESYSTEM=OFF \
-DSDL_HAPTIC=ON \
-DSDL_JOYSTICK=ON \
-DSDL_LOADSO=OFF \
-DSDL_RENDER=OFF \
-DSDL_SHARED=ON \
-DSDL_STATIC=OFF \
-DSDL_TEST=OFF \
-DSDL_THREADS=ON \
-DSDL_TIMERS=OFF \
-DSDL_VIDEO=OFF \
.. || exit 1
# SDL_THREADS is not needed, but it doesn't compile without

make -j4 || exit 1
make install || exit 1

10 changes: 10 additions & 0 deletions scripts/fetch-protoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

cd $(dirname "${BASH_SOURCE[0]}")/..
ROOT="`pwd`"

URL=https://github.com/protocolbuffers/protobuf/releases/download/v3.9.1/protoc-3.9.1-linux-x86_64.zip

wget "$URL" -O protoc.zip || exit 1
unzip protoc.zip -d protoc || exit 1

0 comments on commit c9401aa

Please sign in to comment.