Skip to content

Commit 8ce6443

Browse files
committed
Enable publishing of built artifacts via github releases.
Upload binaries of the translator to the github repo.
1 parent 4d62009 commit 8ce6443

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,30 @@ script:
109109
else
110110
make $MAKE_TARGETS && make $MAKE_TEST_TARGET && if [ $BUILD_EXTERNAL == "1" ]; then make install; fi
111111
fi
112+
113+
after_success:
114+
# Create tarball for deployment
115+
- if [[ "${BUILD_EXTERNAL}" == "1" && "${SHARED_LIBS}" == "ON" && "${repo_token}" != "" ]]; then
116+
export TAG=7.0.1-1;
117+
export TARBALL=SPIRV-LLVM-Translator-${TAG}-${TRAVIS_OS_NAME}-${BUILD_TYPE}.zip;
118+
cd ../install && find . -print | zip -@ ${TARBALL};
119+
fi
120+
121+
before_deploy:
122+
# Travis CI relies on the tag name to push to the correct release.
123+
- git config --global user.name "Travis CI"
124+
- git config --global user.email "builds@travis-ci.org"
125+
- git tag -f ${TAG}
126+
- git push https://${repo_token}@github.com/${TRAVIS_REPO_SLUG} --tags
127+
128+
deploy:
129+
provider: releases
130+
api_key: ${repo_token}
131+
on:
132+
branch: llvm_release_70
133+
condition: ${BUILD_EXTERNAL} == 1 && ${SHARED_LIBS} == ON && ${repo_token}
134+
file: ${TARBALL}
135+
skip_cleanup: true
136+
overwrite: false
137+
prerelease: false
138+

0 commit comments

Comments
 (0)