amethyst / evoli

An ecosystem-simulation game made with Amethyst
https://community.amethyst.rs/t/evoli-introduction/770
Other
217 stars 33 forks source link

Add Automated Builds With Drone #89

Open zicklag opened 5 years ago

zicklag commented 5 years ago

Adds automated builds with Drone. I just saw that you use Jenkins, and if you would like to use that instead feel free to close this PR. I had just finished learning how to build for all platforms from Drone for my own project so I figured I'd dump it here if you were interested.

This configuration will automatically compile Evoli for 64bit Windows, Linux, and Mac and publish the built assets to a GitHub release whenever you create a new tag that starts with v.

There are a couple of optional things in the Drone config, such as the draft deployments on the release-draft tag and ignoring feature/* branches so that you don't double-build feature branch pull requests. If you have any questions just ask. I can tweak the configuration for whatever you need.

Also Drone is hosted for free for Open Source projects. :smiley:

zicklag commented 5 years ago

Windows and Linux builds successfully compile, you can download them from here.

khskarl commented 5 years ago

Wow nice! Thanks for the contribution :). I tried compiling it in my macOS 10.13.6 + Rust 1.35 with no success.

   Compiling amethyst_core v0.5.0
   Compiling amethyst_assets v0.6.0
   Compiling amethyst_network v0.3.0
error[E0283]: type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
   --> /Users/khskarl/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_assets-0.6.0/src/prefab/mod.rs:372:22
    |
372 |                 name.as_ref(),
    |                      ^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0283`.
error: Could not compile `amethyst_assets`.

Currently we are in the middle of migrating Evoli to Amethyst 0.11, which I'm able to compile (without the DebugLines pass). So we will probably finish the migration before merging this :).

erlend-sh commented 5 years ago

In light of this finding by @azriel91 that Drone doesn’t support Vulkan tests, where does that put us?

zicklag commented 5 years ago

It would mean you would either have to use a different CI provider for testing or that you would have to install Drone on a server that has the graphics device necessary to run the tests. Drone could still produce the automated builds that users can download, if you wanted to use it for that, but if you end up using something else for running the tests, then you might just want to use whatever that is to do the release builds as well.

azriel91 commented 5 years ago

The reason I check if CI supports Vulkan is:

Alternatives to using CI agents with Vulkan support:

The last option is cheap if you haven't built an asset hierarchy already.


That's so tangential to the topic, but essentially Drone looks good; none of the other CI providers likely have Vulkan support for free either.

erlend-sh commented 5 years ago

Wait: gfx-hal has been having development to getting GL as a backend

That honestly sounds like a pretty good option to me. I believe @zicklag is dependent on this anyway in order to upgrade to Amethyst latest.

zicklag commented 5 years ago

OK, I've got mac builds working now. You can download and test builds for all platforms here.

As a warning, to get the mac builds to cross-compile from linux I have to use a fork of coreaudio-sys that supports it. This means running a cargo update which will update the dependencies and make the mac build slightly different than the other platforms. Once my PR is merged, that won't be necessary.