ccontainermain icon indicating copy to clipboard operation
ccontainermain copied to clipboard

Travis build not providing a new executable

Open zrml opened this issue 8 years ago • 2 comments
trafficstars

Travis took ages to go through all the Github projects (I think it was all the private ones linked to the company) ... I left it overnight.

This morning I created a push and the build was successful. I can see it has used the makefile and the .travis.yml.

However, I do not see a new compiled exe where we told it to put. It's still the old one from September :-(

I have a feeling that the new executable is indeed created in the DIR we specify in the Makefile: distribution/linux/executable file name but it just creates it where it's building it, or in the Travis container :)

I think we would like to have it here in Github

Do we need any other command or trick in the Makefile or other directives in the Travis YML file?

Thanks

zrml avatar Nov 25 '16 11:11 zrml

Yes, travis used the makefile to build an executable file. But current version needs to only check if a build is successful. But to deploy the result we should make a release, and again some additions to our .travis.yml

deploy:
  provider: releases
  skip_cleanup: true
  file: distrib/linux/ccontainermain
  on:
    tags: true
  api_key:
    secure: YOUR_GITHUB_API_KEY_SECURED_BY_TRAVIS

More details here After that deploy will work only for tags, and as an example you can look at my releases https://github.com/daimor/ccontainermain/releases I've added version 0.1. And travis built new release and deployed there. It means that we should release new versions from time to time. But download link will be fixed for chosen version.

API_KEY you can get by generating the new access token, in settings of your GitHub account, with a scope public_repo. After save, you will get a string, which you should encrypt by travis cli tool. travis encrypt YOUR_TOKEN --add deploy.api_key should be executed at root of the current repository, after execute will add secured token to .travis.yml file. Example in my repository

daimor avatar Nov 25 '16 15:11 daimor

Thanks @daimor - precious info.

zrml avatar Nov 25 '16 16:11 zrml