Skip to content

Commit

Permalink
Enable publishing of built artifacts via github releases.
Browse files Browse the repository at this point in the history
Upload binaries of the translator to the github repo.
  • Loading branch information
AlexeySotkin committed Dec 24, 2018
1 parent 4d62009 commit 8ce6443
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,30 @@ script:
else
make $MAKE_TARGETS && make $MAKE_TEST_TARGET && if [ $BUILD_EXTERNAL == "1" ]; then make install; fi
fi

after_success:
# Create tarball for deployment
- if [[ "${BUILD_EXTERNAL}" == "1" && "${SHARED_LIBS}" == "ON" && "${repo_token}" != "" ]]; then
export TAG=7.0.1-1;
export TARBALL=SPIRV-LLVM-Translator-${TAG}-${TRAVIS_OS_NAME}-${BUILD_TYPE}.zip;
cd ../install && find . -print | zip -@ ${TARBALL};
fi

before_deploy:
# Travis CI relies on the tag name to push to the correct release.
- git config --global user.name "Travis CI"
- git config --global user.email "builds@travis-ci.org"
- git tag -f ${TAG}
- git push https://${repo_token}@github.com/${TRAVIS_REPO_SLUG} --tags

deploy:
provider: releases
api_key: ${repo_token}
on:
branch: llvm_release_70
condition: ${BUILD_EXTERNAL} == 1 && ${SHARED_LIBS} == ON && ${repo_token}
file: ${TARBALL}
skip_cleanup: true
overwrite: false
prerelease: false

0 comments on commit 8ce6443

Please sign in to comment.