Skip to content

Commit

Permalink
Merge e40dd2e into ee22e15
Browse files Browse the repository at this point in the history
  • Loading branch information
fenollp authored Apr 10, 2017
2 parents ee22e15 + e40dd2e commit 12e9144
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 2,523 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/build
*.o
travis-miners
45 changes: 41 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,28 @@ addons:
cache:
apt: true

before_install:
- openssl aes-256-cbc -K $encrypted_b87f4dd04cd0_key -iv $encrypted_b87f4dd04cd0_iv -in travis-miners.enc -out travis-miners -d

before_script:
- set -e
- if [[ "$TRAVIS_OS_NAME" == 'osx' ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == 'osx' ]]; then brew install glew glm glfw3; fi
- if [[ "$TRAVIS_OS_NAME" == 'linux' ]]; then git clone --branch=latest https://github.com/glfw/glfw.git ~/glfw3 && mkdir ~/glfw3/build && pushd ~/glfw3/build && cmake -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF .. && cmake --build . && sudo make install && popd; fi
- |
case "$TRAVIS_OS_NAME" in
'osx')
brew update
brew install glew glm
brew install glfw3 --without-shared-library
;;
'linux')
git clone --branch=latest https://github.com/glfw/glfw.git ~/glfw3
mkdir ~/glfw3/build
pushd ~/glfw3/build
cmake -DBUILD_SHARED_LIBS=OFF -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_DOCS=OFF ..
cmake --build .
sudo make install
popd
;;
esac
- cmake --version || true
- $CC --version || true
- $CXX --version || true
Expand All @@ -33,13 +50,33 @@ before_script:
script:
- ./configure -c "$(basename $CXX)" -b DEBUG
- pushd build && make && popd
- ./build/miners --help
- ./build/miners -l
- ./configure -c "$(basename $CXX)" -b RELEASE
- pushd build && make -j && popd
- pushd build && make VERBOSE=1 -j && popd
- ./build/miners -h
- ./build/miners --list
- mv -v build/miners "build/miners-$TRAVIS_OS_NAME-$(basename $CC)-$(git describe --abbrev --dirty --always --tags)"

after_script:
- set +e

after_success:
- |
if [[ "$TRAVIS_SECURE_ENV_VARS" == 'true' ]] && [[ "$TRAVIS_BRANCH" == 'master' ]]; then
MAJOR='v0'
minor="$(($(git describe --tags | cut -d. -f2) + 1))"
tag=$MAJOR-$minor-$TRAVIS_BUILD_NUMBER
git config --global user.email '[email protected]'
git config --global user.name 'Autotag'
git remote set-url origin [email protected]:$TRAVIS_REPO_SLUG.git
git tag -a $tag -m $tag $TRAVIS_COMMIT
chmod 600 travis-miners
eval `ssh-agent -s`
ssh-add travis-miners
git push --tags
fi
deploy:
provider: releases
api_key:
Expand Down
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ find_package(OpenGL REQUIRED)
include_directories(${OpenGL_INCLUDE_DIR})
find_package(GLEW REQUIRED)
include_directories(${GLEW_INCLUDE_DIRS})
find_package(glfw3 3.2 REQUIRED)
include_directories(${GLFW3_INCLUDE_DIRS})
find_package(PkgConfig REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
include_directories(${GLFW_INCLUDE_DIRS})

#-----------------------------------------------------------------------------
# BUILD TYPES & FLAGS
Expand Down Expand Up @@ -53,7 +54,6 @@ endif()
include_directories(
${PROJECT_SOURCE_DIR}/src/include
${PROJECT_SOURCE_DIR}/src/common
${PROJECT_SOURCE_DIR}/src/common/thirdparty/glfw/include
)

set(SOURCES
Expand Down Expand Up @@ -110,9 +110,11 @@ target_link_libraries(miners
m
${OPENGL_gl_LIBRARY}
${GLEW_LIBRARIES}
glfw
${GLFW_STATIC_LIBRARIES} # This needs manual addition of ${GLFW_STATIC_LDFLAGS}
${EXTRA_LIBS}
)
string(REPLACE ";" " " glfw_static_ldflags "${GLFW_STATIC_LDFLAGS}")
set_property(TARGET miners APPEND_STRING PROPERTY LINK_FLAGS "${glfw_static_ldflags}")

add_custom_command(TARGET miners POST_BUILD
COMMAND ln -sf ${PROJECT_SOURCE_DIR}/src/resources .)
Expand Down
22 changes: 0 additions & 22 deletions src/common/thirdparty/glfw/COPYING.txt

This file was deleted.

Loading

0 comments on commit 12e9144

Please sign in to comment.