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

Makefile package command and travis github releases #416

Merged
merged 9 commits into from
Dec 30, 2019

Conversation

Korijn
Copy link
Contributor

@Korijn Korijn commented Dec 24, 2019

Closes #414

Approach mostly mimicked from gfx-portability as recommended to me by @kvark. I needed a number of commits to iron out some kinks for the Windows builds, so I would recommend using squash merge when accepting this PR.

Note that the Windows rust=nightly build fails, but it's also broken on master, so it's unrelated to the changes in this PR.

/cc @almarklein

Questions

  • Would it make sense to also regenerate the ffi/wgpu.h and wgpu-remote.h header files and include them in the zip archive?

Todo for maintainers

  • Configure encrypted api_key
    As in gfx-portability you will need to create an API key and commit it to the .travis.yml file. I've checked "allow edits from maintainers" so you should be able to commit to this branch directly. You may want to reference the Travis instructions as well.

  • Tag revisions
    Previous versions (v0.1 - v0.4) have not been tagged on the master branch, you will want to do so retroactively. Also, when releasing in the future, make sure to tag the commit before pushing. Alternatively, you can schedule a travis build manually after applying the tag retroactively.

@kvark
Copy link
Member

kvark commented Dec 26, 2019

Would it make sense to also regenerate the ffi/wgpu.h and wgpu-remote.h header files and include them in the zip archive?

They are versioned, so no need to re-generate. But they definitely need to be included in the archive!

Makefile Outdated
lib-remote: Cargo.lock wgpu-remote/Cargo.toml $(WILDCARD_WGPU_REMOTE)
cargo build --manifest-path wgpu-remote/Cargo.toml

lib-remote-release: Cargo.lock wgpu-remote/Cargo.toml $(WILDCARD_WGPU_REMOTE)
Copy link
Member

Choose a reason for hiding this comment

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

Let's not bother with packaging the "lib-remote" thing, at least for now. It's not clear how this will be evolving for now.

Copy link
Contributor Author

@Korijn Korijn Dec 26, 2019

Choose a reason for hiding this comment

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

Alright, I'll take it out. I wasn't really sure about that. Merry xmas btw!

@kvark
Copy link
Member

kvark commented Dec 26, 2019

@grovesNL can we use the same API key that you set up for gfx-portability?

@Korijn
Copy link
Contributor Author

Korijn commented Dec 27, 2019

Just pushed two commits to address your review comments.

I think the binaries have a different naming scheme on Windows, so I think the expression ./target/$$RELEASE/libwgpu_*.$(LIB_EXTENSION) is not matching anything right now... I won't have access to a Windows machine with Rust installed until later next week. If anyone knows the right filename I can fix it sooner.

We still need the API key as well.

@almarklein
Copy link
Contributor

If anyone knows the right filename I can fix it sooner.

On my (Windows 10) machine it's target\release\wgpu_native.dll

Correct filename expression for binaries on Windows
@Korijn
Copy link
Contributor Author

Korijn commented Dec 28, 2019

That fixed it, thanks @almarklein! All packages now contain the right files.

@kvark
Copy link
Member

kvark commented Dec 30, 2019

Blocked on @grovesNL and #425

@grovesNL
Copy link
Collaborator

@kvark Yeah, using the same API key as portability should be fine

@Korijn
Copy link
Contributor Author

Korijn commented Dec 30, 2019

Done. Then I think we're just about done here, aside from #425 and adding tags to the master branch

@almarklein I'll do a nightly release on my fork once this PR is merged, so we can start consuming the github release archives, while we wait for the next release of this official repo

@kvark
Copy link
Member

kvark commented Dec 30, 2019 via email

bors bot added a commit that referenced this pull request Dec 30, 2019
416: Makefile package command and travis github releases r=kvark a=Korijn

Closes #414

Approach mostly mimicked from [gfx-portability](https://github.com/gfx-rs/portability) as recommended to me by @kvark. I needed a number of commits to iron out some kinks for the Windows builds, so I would recommend using squash merge when accepting this PR.

Note that the Windows rust=nightly build fails, but it's also broken on master, so it's unrelated to the changes in this PR.

/cc @almarklein

# Questions

- [x] Would it make sense to also regenerate the `ffi/wgpu.h` and `wgpu-remote.h` header files and include them in the zip archive?

# Todo for maintainers

- [x] Configure encrypted `api_key`
As in [gfx-portability](https://github.com/gfx-rs/portability/blob/master/.travis.yml#L61) you will need to create an API key and commit it to the `.travis.yml` file. I've checked "allow edits from maintainers" so you should be able to commit to this branch directly. You may want to reference the [Travis instructions](https://docs.travis-ci.com/user/deployment/releases/#authenticating-with-an-oauth-token) as well.

- [ ] Tag revisions
Previous versions (`v0.1` - `v0.4`) have not been tagged on the master branch, you will want to do so retroactively. Also, when releasing in the future, make sure to tag the commit before pushing. Alternatively, you can schedule a travis build manually after applying the tag retroactively.

420: Make Origin3d::{x,y,z} all have type u32 r=kvark a=fintelia

Fixes #419 

424: swapchain creation: check if selected present mode is supported r=kvark a=Veykril

Implements a simple check as talked about in #350 to fallback to `FIFO` should the selected present mode not be available on the system.

Co-authored-by: Korijn van Golen <k.vangolen@clinicalgraphics.com>
Co-authored-by: Korijn van Golen <korijn@gmail.com>
Co-authored-by: Jonathan Behrens <fintelia@gmail.com>
Co-authored-by: Veykril <lukastw97@gmail.com>
@bors
Copy link
Contributor

bors bot commented Dec 30, 2019

Build succeeded

@bors bors bot merged commit 52de829 into gfx-rs:master Dec 30, 2019
@Korijn Korijn deleted the binary-release branch December 30, 2019 20:04
@kvark
Copy link
Member

kvark commented Dec 30, 2019

@Korijn @grovesNL would it be possible to avoid making any "mozilla-xxx" tags to be triggering packaged builds?

@Korijn
Copy link
Contributor Author

Korijn commented Dec 31, 2019

I figured that was what this line is for:

condition: $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_BRANCH == $TRAVIS_TAG

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

TRAVIS_BRANCH:
for push builds, or builds not triggered by a pull request, this is the name of the branch.
for builds triggered by a pull request this is the name of the branch targeted by the pull request.
for builds triggered by a tag, this is the same as the name of the tag (TRAVIS_TAG)

I just tried this on my fork, it definitely works. I added a tag v0.5dev to the latest commit on master and ran git push --tags and that triggered a build + deploy to github releases.

@Korijn
Copy link
Contributor Author

Korijn commented Jan 2, 2020

@kvark updated my post above to explain how it works. Tried it on my fork with success:

https://github.com/Korijn/wgpu/releases

Build here:
https://travis-ci.org/Korijn/wgpu/builds/631764157

kvark pushed a commit to kvark/wgpu that referenced this pull request Jun 3, 2021
416: Allow trailing comma in vertex_attr_array! r=cwfitzgerald a=benfrankel



Co-authored-by: Ben Frankel <ben.frankel7@gmail.com>
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.

Publish binaries via github releases?
4 participants