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

Travis CI not deploying wheels to GitHub Releases #295

Closed
hugovk opened this issue May 18, 2022 · 2 comments · Fixed by #296
Closed

Travis CI not deploying wheels to GitHub Releases #295

hugovk opened this issue May 18, 2022 · 2 comments · Fixed by #296

Comments

@hugovk
Copy link
Member

hugovk commented May 18, 2022

Travis CI is meant to upload the aarch64 wheels it builds to GitHub Releases:

# Upload wheels to GitHub Releases
deploy:
  provider: releases
  api_key: $GITHUB_RELEASE_TOKEN
  file_glob: true
  file: "${TRAVIS_BUILD_DIR}/${WHEEL_SDIR}/*.whl"
  on:
    repo: python-pillow/pillow-wheels
  skip_cleanup: true

For the past few releases, it's not worked.

For example yesterday's 9.1.1:

Skipping a deployment with the releases provider because this branch is not permitted: 9.1.1

As a workaround yesterday, I pushed a branch called build-aarch64 with this:

diff --git a/.travis.yml b/.travis.yml
index 98f9cb4..a6771bd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,4 +55,5 @@ deploy:
   file: "${TRAVIS_BUILD_DIR}/${WHEEL_SDIR}/*.whl"
   on:
     repo: python-pillow/pillow-wheels
+    branch: build-aarch64
   skip_cleanup: true

Which built the branch, plus three others:

image

https://app.travis-ci.com/github/python-pillow/pillow-wheels/builds

And deployed the wheels into 3 untagged* tags:

image

I think what happened is the first one made a deploy, and then those 3 "tags" triggered builds which didn't deploy:

  1. https://app.travis-ci.com/github/python-pillow/pillow-wheels/builds/250775961
  2. https://app.travis-ci.com/github/python-pillow/pillow-wheels/builds/250776267
  3. https://app.travis-ci.com/github/python-pillow/pillow-wheels/builds/250776270
  4. https://app.travis-ci.com/github/python-pillow/pillow-wheels/builds/250776274

Anyway, this was just a workaround to get the release finished.


Maybe we need an explicit tags: true for the deploy trigger:

tags can be true, false or any other string:

  • tags: true: deployment is triggered if and only if $TRAVIS_TAG is set. Depending on your workflow, you may set $TRAVIS_TAG explicitly, even if this is a non-tag build when it was initiated. This causes the branch condition to be ignored.
    ...

https://docs.travis-ci.com/user/deployment/#conditional-releases-with-on

Where:

TRAVIS_TAG: If the current build is for a git tag, this variable is set to the tag’s name, otherwise it is empty ("").

https://docs.travis-ci.com/user/environment-variables/


I'll try it out with a 9.1.1.post1 tag, just for testing purposes.

@hugovk
Copy link
Member Author

hugovk commented May 18, 2022

Okay, looks like the tag build released now:

https://app.travis-ci.com/github/python-pillow/pillow-wheels/builds/250790183

image

https://github.com/python-pillow/pillow-wheels/releases/tag/9.1.1.post1

And a branch build did not:

https://app.travis-ci.com/github/python-pillow/pillow-wheels/builds/250790192


Scrolling back at https://github.com/python-pillow/pillow-wheels/releases, looks like earlier we were doing deploys for normal main builds.

Do we need those, or is it okay to only build on a tag?

For one-off builds, we can change tags: true to branch: my-branch-name.

@hugovk
Copy link
Member Author

hugovk commented May 18, 2022

(As an aside, I noticed Travis ran 2 builds at the same time, each with 4 jobs in parallel. I thought the concurrency limit was 5, but it's at least 8. I couldn't find anything in the docs.)

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 a pull request may close this issue.

1 participant