Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Travis & Travis Build Stages #133

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

Merged
frozencemetery merged 3 commits into master from infra/travis-releases-build-stages
Nov 29, 2017

Conversation

Copy link
Member

@DirectXMan12 DirectXMan12 commented Nov 29, 2017

This fixes our Travis auto-deployment mechnanisms, and switches
over to making use of Travis build stages along the way.

There are now three stages:

  1. verify: this just runs the verification suite, which currently
    consists of the flake8 tests. The verification is run under
    both Python 2 and Python 3, using the fedora:rawhide image

  2. test: this runs all of non-verification tests, under the full
    test matrix we were using before

  3. deploy: this runs our deployements, as before

The deploy phase now precompiles the sdist, and asks for that to be
uploaded instead of regenerating the code before upload. This is a bit
of a hack.

Finally, the actual Travis scripts themselves were refactored into
a series of smaller files and utility functions, which makes the code
a bit more readable in some cases, and allows individual functions
to be called separately (useful in testing stuff out, and in creating
new build stages).

This PR also fixes a verification failure, and switches the tox verification
over to using the lib-verify functions created for Travis.

This fixes our Travis auto-deployment mechnanisms, and switches
over to making use of Travis build stages along the way.
There are now three stages:
1. verify: this *just* runs the verification suite, which currently
 consists of the flake8 tests. The verification is run under
 both Python 2 and Python 3, using the fedora:rawhide image
2. test: this runs all of non-verification tests, under the full
 test matrix we were using before
3. deploy: this runs our deployements, as before
The deploy phase now precompiles the sdist, and asks for that to be
uploaded instead of regenerating the code before upload. This is a bit
of a hack.
Finally, the actual Travis scripts themselves were refactored into
a series of smaller files and utility functions, which makes the code
a bit more readable in some cases, and allows individual functions
to be called separately (useful in testing stuff out, and in creating
new build stages).
Flake8 (somewhat correctly) was complaining that we had ambiguous
variable names (both named simply `l`). This fixes the names to
be more descriptive.
Copy link
Member Author

@frozencemetery 🎉

this should work, I believe. There's one last thing to verify, once you review this.

Also, I have some docker-related optimizations in the wings that go on top of this code, but I wasn't able to quite finish them tonight (the gist is that we'd build Docker images on a nightly basis using Travis cron jobs for each item in our build matrix, so that we only have to install the project dependencies in the docker container, which could speed things up a bit)

frozencemetery reacted with hooray emoji

tox.ini Outdated
@@ -9,10 +9,9 @@ envlist = py27,py33,py34,py35
[testenv]
# NB(sross): disabling E225,E226,E227,E901 make pep8 think Cython is ok
# NB(sross): disable E402 because of the GSSAPI="blah" lines needed by Cython
Copy link
Member

@frozencemetery frozencemetery Nov 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments should be moved to where they live now. (They're duplicated there, so I think they should go away entirely.)

Copy link
Member Author

@DirectXMan12 DirectXMan12 Nov 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, I just forgot to remove them.


setup::install() {
if [ -f /etc/debian_version ]; then
setup::debian::install
Copy link
Member

@frozencemetery frozencemetery Nov 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sold on these being their own functions, but if you are then it's fine.

@@ -0,0 +1,25 @@
#!/bin/bash

verify::flake8() {
Copy link
Member

@frozencemetery frozencemetery Nov 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to move all the lib-*.sh functions into one file? I'm not sold on having this many files, especially when a few of them only have a single function in them.

Copy link
Member Author

@DirectXMan12 DirectXMan12 Nov 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just like splitting things up logically (I almost prefer smaller bash files anyway -- they're easier to manage)

The tox config previously had a copy of the same set of skipped checks
as the Travis verify functions. In order to avoid issues in the future,
it now just calls into that.
@DirectXMan12 DirectXMan12 force-pushed the infra/travis-releases-build-stages branch from 11c9634 to 88a5db2 Compare November 29, 2017 18:49
@frozencemetery frozencemetery deleted the infra/travis-releases-build-stages branch November 29, 2017 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@frozencemetery frozencemetery frozencemetery approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /