Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix eigen directory link #1

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
81 changes: 62 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,72 @@
language: c
os:
- linux
- osx
language: cpp
#
# language: c
# os:
# - linux
# - osx
#
sudo: required
dist: trusty
osx_image: xcode8.2
#
# osx_image: xcode8.2
#
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/install-debian.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/install-macos.sh; fi
- sudo apt-get -y install git build-essential cmake zlib1g-dev libpng-dev libcairo2-dev libfreetype6-dev
- sudo apt-get -y install libjson-c-dev libfontconfig1-dev libgtkmm-3.0-dev libpangomm-1.4-dev libgl1-mesa-dev libglu-dev libspnav-dev
- # sudo add-apt-repository -y ppa:ondrej/autotools
- # sudo apt-get -y update
- # sudo apt-get -y install automake-1.15
#
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/install-debian.sh; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/install-macos.sh; fi
#
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/build-debian.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/build-macos.sh; fi
deploy:
- provider: releases
api_key:
secure: dDlkIawHcODlW9B/20/cQCtzeoocvs0hKuNngRKXKqzXLWTRq33oq/B7+39tAixWbmv6exTpijiKrRNFiSCW5Z4iwHLwaRD4XJznxw63e/Hus/dxg2Tvqx7XFpkCz8mT1Z+gZQE5YxAngeZPpI/sZbZtF1UO3yH5eLeeokZ15p26ZskQUPoYuzrTgTzYL3XfpG3F+20rNBawH1ycsCTVD/08/n31d2m3CrKAsbW7er92ek6w4fzKr7NW8WeXjrPJETVpw5fQg1Od3pRGW8dPQaJcvKQEogMp8Mm0ETYd0qigg89/giBz7QwOgmAWQ4dH+DfZH4Ojl//127QztBolMvyDMQBykWrtJoGcij05sT6K2IJr2FHeUBO12MAEdjiVvhQj3DtTzjPiZAHHDBSLWxLKWWhlhHE4pq7g1MQhqXkaAHI2BLNzwLmaowbMT0bECf9yfz6xx18h6XPQFX44oOktraobVALFlyHqeKa8zdcUt22LF6uAL1m5dxL0tny3eXCIPE4UH/RZgua/cHV9G3cUvKQa/QnFSLRhvWVSbGB+7YsHouBJcsUOOW1gmd5442XuC7mpppccRldh+GSxUk6TBJRAx7TeQ0ybDUaoco9MUqp2twv3KreR2+8Q12PDaAhfQVNEGdF3wTm1sShImjCN4VN3eSLlBEbve1QRQXM=
skip_cleanup: true
file: build/solvespace.dmg
on:
repo: solvespace/solvespace
tags: true
condition: "$TRAVIS_OS_NAME == osx"
- git clone https://github.com/symbian9/solvespace-appimage
- cd solvespace
- git submodule update --init extlib/libdxfrw
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release
- make
- make install DESTDIR=$(readlink -f appdir) ; find appdir/
- wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- chmod a+x linuxdeployqt*.AppImage
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage
#
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/build-debian.sh; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/build-macos.sh; fi
# deploy:
# - provider: releases
# api_key:
# secure: dDlkIawHcODlW9B/20/cQCtzeoocvs0hKuNngRKXKqzXLWTRq33oq/B7+39tAixWbmv6exTpijiKrRNFiSCW5Z4iwHLwaRD4XJznxw63e/Hus/dxg2Tvqx7XFpkCz8mT1Z+gZQE5YxAngeZPpI/sZbZtF1UO3yH5eLeeokZ15p26ZskQUPoYuzrTgTzYL3XfpG3F+20rNBawH1ycsCTVD/08/n31d2m3CrKAsbW7er92ek6w4fzKr7NW8WeXjrPJETVpw5fQg1Od3pRGW8dPQaJcvKQEogMp8Mm0ETYd0qigg89/giBz7QwOgmAWQ4dH+DfZH4Ojl//127QztBolMvyDMQBykWrtJoGcij05sT6K2IJr2FHeUBO12MAEdjiVvhQj3DtTzjPiZAHHDBSLWxLKWWhlhHE4pq7g1MQhqXkaAHI2BLNzwLmaowbMT0bECf9yfz6xx18h6XPQFX44oOktraobVALFlyHqeKa8zdcUt22LF6uAL1m5dxL0tny3eXCIPE4UH/RZgua/cHV9G3cUvKQa/QnFSLRhvWVSbGB+7YsHouBJcsUOOW1gmd5442XuC7mpppccRldh+GSxUk6TBJRAx7TeQ0ybDUaoco9MUqp2twv3KreR2+8Q12PDaAhfQVNEGdF3wTm1sShImjCN4VN3eSLlBEbve1QRQXM=
# skip_cleanup: true
# file: build/solvespace.dmg
# on:
# repo: solvespace/solvespace
# tags: true
# condition: "$TRAVIS_OS_NAME == osx"
#
after_success:
- find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
- curl --upload-file ./SolveSpace*.AppImage https://transfer.sh/SolveSpace-git.$(git rev-parse --short HEAD)-x86_64.AppImage
- ls -lh out/* # Assuming you have some files in out/ that you would like to upload
- chmod a+x .travis/upload.sh
- bash ./.travis/upload.sh ./SolveSpace*.AppImage

branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/

notifications:
email: false
irc:
channels:
- "chat.freenode.net#solvespace"
use_notice: true
skip_join: true
template:
- "%{repository_slug} (%{commit}) : %{message} %{foo} "
- "Build details: %{build_url}"
131 changes: 131 additions & 0 deletions .travis/upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
#!/bin/bash

set +x # Do not leak information

RELEASE_NAME="continuous" # Do not use "latest" as it is reserved by GitHub

if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ] ; then
echo "Release uploading disabled for pull requests, uploading to transfer.sh instead"
for FILE in $@ ; do
BASENAME="$(basename "${FILE}")"
curl --upload-file $FILE https://transfer.sh/$BASENAME
echo ""
done
sha256sum $@
exit 0
fi

if [ ! -z "$TRAVIS_REPO_SLUG" ] ; then
# We are running on Travis CI
echo "Running on Travis CI"
echo "TRAVIS_COMMIT: $TRAVIS_COMMIT"
REPO_SLUG="$TRAVIS_REPO_SLUG"
if [ -z "$GITHUB_TOKEN" ] ; then
echo "\$GITHUB_TOKEN missing, please set it in the Travis CI settings of this project"
echo "You can get one from https://github.com/settings/tokens"
exit 1
fi
else
# We are not running on Travis CI
echo "Not running on Travis CI"
if [ -z "$REPO_SLUG" ] ; then
read -s -p "Repo Slug (GitHub and Travis CI username/reponame): " REPO_SLUG
fi
if [ -z "$GITHUB_TOKEN" ] ; then
read -s -p "Token (https://github.com/settings/tokens): " GITHUB_TOKEN
fi
fi

tag_url="https://api.github.com/repos/$REPO_SLUG/git/refs/tags/$RELEASE_NAME"
tag_infos=$(curl -XGET --header "Authorization: token ${GITHUB_TOKEN}" "${tag_url}")
echo "tag_infos: $tag_infos"
tag_sha=$(echo "$tag_infos" | grep '"sha":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1)
echo "tag_sha: $tag_sha"

release_url="https://api.github.com/repos/$REPO_SLUG/releases/tags/$RELEASE_NAME"
echo "Getting the release ID..."
echo "release_url: $release_url"
release_infos=$(curl -XGET --header "Authorization: token ${GITHUB_TOKEN}" "${release_url}")
echo "release_infos: $release_infos"
release_id=$(echo "$release_infos" | grep "\"id\":" | head -n 1 | tr -s " " | cut -f 3 -d" " | cut -f 1 -d ",")
echo "release ID: $release_id"
upload_url=$(echo "$release_infos" | grep '"upload_url":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1)
echo "upload_url: $upload_url"
release_url=$(echo "$release_infos" | grep '"url":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1)
echo "release_url: $release_url"

if [ "$TRAVIS_COMMIT" != "$tag_sha" ] ; then

echo "TRAVIS_COMMIT != tag_sha, hence deleting $RELEASE_NAME..."

if [ x"$release_id" != "x" ]; then
delete_url="https://api.github.com/repos/$REPO_SLUG/releases/$release_id"
echo "Delete the release..."
echo "delete_url: $delete_url"
curl -XDELETE \
--header "Authorization: token ${GITHUB_TOKEN}" \
"${delete_url}"
fi

# echo "Checking if release with the same name is still there..."
# echo "release_url: $release_url"
# curl -XGET --header "Authorization: token ${GITHUB_TOKEN}" \
# "$release_url"

echo "Delete the tag..."
delete_url="https://api.github.com/repos/$REPO_SLUG/git/refs/tags/$RELEASE_NAME"
echo "delete_url: $delete_url"
curl -XDELETE \
--header "Authorization: token ${GITHUB_TOKEN}" \
"${delete_url}"

echo "Create release..."

if [ -z "$TRAVIS_BRANCH" ] ; then
TRAVIS_BRANCH="master"
fi

if [ ! -z "$TRAVIS_JOB_ID" ] ; then
BODY="Travis CI build log: https://travis-ci.org/$REPO_SLUG/builds/$TRAVIS_BUILD_ID/"
else
BODY=""
fi

release_infos=$(curl -H "Authorization: token ${GITHUB_TOKEN}" \
--data '{"tag_name": "'"$RELEASE_NAME"'","target_commitish": "'"$TRAVIS_BRANCH"'","name": "'"Continuous build"'","body": "'"$BODY"'","draft": false,"prerelease": true}' "https://api.github.com/repos/$REPO_SLUG/releases")

echo "$release_infos"

unset upload_url
upload_url=$(echo "$release_infos" | grep '"upload_url":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1)
echo "upload_url: $upload_url"

unset release_url
release_url=$(echo "$release_infos" | grep '"url":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1)
echo "release_url: $release_url"

fi # if [ "$TRAVIS_COMMIT" != "$tag_sha" ]

echo "Upload binaries to the release..."

for FILE in $@ ; do
FULLNAME="${FILE}"
BASENAME="$(basename "${FILE}")"
curl -H "Authorization: token ${GITHUB_TOKEN}" \
-H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/octet-stream" \
--data-binary @$FULLNAME \
"$upload_url?name=$BASENAME"
echo ""
done

sha256sum $@

if [ "$TRAVIS_COMMIT" != "$tag_sha" ] ; then
echo "Publish the release..."

release_infos=$(curl -H "Authorization: token ${GITHUB_TOKEN}" \
--data '{"draft": false}' "$release_url")

echo "$release_infos"
fi # if [ "$TRAVIS_COMMIT" != "$tag_sha" ]
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ message(STATUS "Using in-tree libdxfrw")
add_subdirectory(extlib/libdxfrw)

message(STATUS "Using in-tree eigen")
INCLUDE_DIRECTORIES(extlib/eigen/eigen)
INCLUDE_DIRECTORIES(extlib/eigen)

if(WIN32)
include(FindVendoredPackage)
Expand Down