Set up CI with that checks fmt, runs `cargo check` and runs the tests

(Marco Fruhwirth) #1

We should set up a basic CI that runs

  • cargo fmt -- --check
  • cargo check
  • cargo test --all

My knowledge here is very limited. Imo we should use the same stack as Amethyst. Would that be possible?

1 Like
(Erlend Sogge Heggen) #2

@fletcher could you assist here? We probably ought to have a general purpose “How to set up CI with a new Amethyst project” doc anyhow.

(Fletcher) #3

Sure. Would you like to do it and I’ll show you how?

1 Like
(Marco Fruhwirth) #4

Yes, please. I’ll document the steps along the way.

To be sure that we are on the same page, we need to set up a Jenkins pipeline and then link it to the github repository, right?

(Fletcher) #5

@marot Yup! We have the Jenkins server all set up. I’ll just have to show you how to connect it to the GH repo

(Alti) #6

I feel like if the doc is to be made for new amethyst project CI in general it should be as service-independent (no ties to Jenkins, Travis, etc), and possibly even feature a way to produce binary artifacts.

(Marco Fruhwirth) #7

As far as I’m aware this documentation is for internal Amethyst projects, so it should be specific to the current stack.

1 Like
(Fletcher) #8

The commonality between them would be the various cargo commands that Jenkins/Travis/etc execute. Are you wanting a document that shows how to build an Amethyst manually?

(Alti) #9

Ideally I would love a page in the book or the wiki, which documents what commands/scripts are necessary for a brand new project using Amethyst to run all the tests and generate cross-platform artifacts/releases.
But I understand if that would be out of scope for this thread.

(Fletcher) #10

We actually build and test on linux, windows and macOS boxes, so it shouldn’t be too difficult to extract them into a document. Cross-compilation from one box though can be a bit tricky depending on what your OS is. Are you on Windows, Linux, or Mac?

(Zicklag) #11

I setup a Drone script that gives fully reproducible example of how to cross-compile Amethyst projects for all platforms using Docker:

That might be something that we could put in docs.