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

Appveyor: Build and package the application #1514

Merged
merged 3 commits into from
Dec 20, 2016

Conversation

ericwa
Copy link
Collaborator

@ericwa ericwa commented Nov 20, 2016

and upload the resulting packaged application to Appveyor, in addition to running the tests. Unlike travis-ci, appveyor will host the build artifacts. e.g. for this pull request:
https://ci.appveyor.com/project/kduske/trenchbroom/build/2.0.0-appveyor-65/artifacts

  • In cmake/TrenchBroomApp.cmake, move FIND_PACKAGE(Git) to the correct location. This fixes GIT_EXECUTABLE and APP_BUILD_ID being empty in builds done with msbuild.
  • Change appveyor.yml to do a RelWithDebInfo build, otherwise the resulting TrenchBroom executable would be too slow to be usable.

@kduske
Copy link
Collaborator

kduske commented Dec 6, 2016

I'm wondering if we couldn't somehow have the artifacts uploaded elsewhere. That would allow us to use this for travis as well. I'm thinking about changing the release model to frequent nightlies and regular stable builds after 2.0 is out (aka never, haha).

@kduske
Copy link
Collaborator

kduske commented Dec 6, 2016

There's a conflict in appveyor.yml. Would you look into it?

@ericwa
Copy link
Collaborator Author

ericwa commented Dec 6, 2016

Yep, I'll fix the merge conflict right now

Move FIND_PACKAGE(Git) to the correct location, so APP_BUILD_ID
gets set.
@ericwa
Copy link
Collaborator Author

ericwa commented Dec 7, 2016

I'm wondering if we couldn't somehow have the artifacts uploaded elsewhere

Both travis-ci and appveyor have ways of storing variables in the .yml file in an encrypted form, so it's probably possible to have the CI build scripts upload the files somewhere.

https://docs.travis-ci.com/user/encryption-keys/
https://www.appveyor.com/docs/build-configuration/#secure-variables

For tyrutils-ericw, I have travis-ci and appveyor both setup to use GitHub Releases. It's pretty nice: whenever I push a tag to the git repository, a release gets created on GitHub, and the Windows and macOS binaries are uploaded automatically, and I have Windows builds available for every commit via appveyor.

@kduske
Copy link
Collaborator

kduske commented Dec 7, 2016

What kind of tag do you push? And how do you deal with version numbers?

@ericwa
Copy link
Collaborator Author

ericwa commented Dec 7, 2016

What kind of tag do you push?

Ordinary tags (annotated tags). e.g. the last few releases here, I created by doing:

git tag -a -m "version 0.15.9" ericw-v0.15.9
git push origin ericw-v0.15.9

Then I manually pasted in the release notes on the GitHub release.

And how do you deal with version numbers?

I use the tag name as the version number. My CMakeLists.txt reads it with git describe so the tools can print the version number in their output.

@kduske
Copy link
Collaborator

kduske commented Dec 7, 2016

are-you-wizard

@ericwa
Copy link
Collaborator Author

ericwa commented Dec 8, 2016

Haha. It should be possible to set up for TB if you want.
Aside from configuring the appveyor.yml/travis.yml with the credentials / settings for uploading to github, the only thing missing is setting up the travis.yml to run cpack, similar to what this PR does for appveyor. I'm attempting that (setting up the travis scripts to run cpack) in my fork.

https://docs.travis-ci.com/user/deployment/releases/
https://www.appveyor.com/docs/deployment/github/

@ericwa
Copy link
Collaborator Author

ericwa commented Dec 8, 2016

Ok - I think the GitHub releases deployment should be set up... the only thing is, I'm not sure if my encrypted GitHub OAuth tokens will work properly when your travis/appveyor accounts are building the repo.

I tested it out in my fork by creating a tag, here's what it looks like: https://github.com/ericwa/TrenchBroom/releases/tag/testrelease2

@kduske
Copy link
Collaborator

kduske commented Dec 8, 2016

Holy crap. That means I can remove all those scripts I wrote to create and upload the releases myself. That's great!

@kduske
Copy link
Collaborator

kduske commented Dec 8, 2016

So, any tag that I push to the repository gets turned into a release?

@ericwa
Copy link
Collaborator Author

ericwa commented Dec 8, 2016

So, any tag that I push to the repository gets turned into a release?

Yes, as long as the tag is a descendant of these commits (so the tagged version has these appveyor.yml / .travis.yml settings in it).

@ericwa
Copy link
Collaborator Author

ericwa commented Dec 20, 2016

@kduske can I merge this?

I'd like to get @muk0r / @PritchardGSD , who are using the build I made in November, to help test the latest release/v2.0.0 changes, and this will make it a lot easier.

The encrypted github access keys should be change from mine to yours at some point, but I think that can be done later as it only affects the uploads for tags.

@kduske kduske merged commit f7fe54e into TrenchBroom:release/v2.0.0 Dec 20, 2016
@kduske
Copy link
Collaborator

kduske commented Dec 20, 2016

Done. Sorry for dragging my feet here.

@ericwa
Copy link
Collaborator Author

ericwa commented Dec 20, 2016

Thanks! no problem :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants