Closed liushuyu closed 5 years ago
i didn't know travis can build for windows. Why didn't we use it for citra?
And could you provide some short rational for each change you made? As I am still noob in CI, I can't decide which is better or why. Like, release build vs debug build looks no difference to me.
As for the test sample binary, I want to put it to a different PR (if you want). The problem is not just about CI. I also want to integrate it into Catch2, but are really not sure what a good way is to do it.
Why didn't we use it for citra?
Because… It just came out recently, still in beta testing stage, problems may arise randomly.
And could you provide some short rational for each change you made? As I am still noob in CI, I can't decide which is better or why. Like, release build vs debug build looks no difference to me.
Sure thing. I will make a detailed explanation, and it may take a while for me to compile the information here.
As for the test sample binary, I want to put it to a different PR (if you want).
I can totally agree on this. I can open a new PR on this later.
Okay, here is the detailed explanation.
I will try to address your questions first:
Like, release build vs debug build looks no difference to me.
It depends. If you use CI for delivering final binary (that's CD, Continuous Delivery), you will need to make release builds and optimize as much as you can; if you are just testing the changes you and your fellow contributors made, then debug build is more preferable. Some CI services don't destroy the VM or container after build, and you can even request an ssh
connection to the VM/container in question to debug your project if you want.
Now. I will explain what I did in this PR and why:
.travis.yml
:
trusty
to xenial
. This is straightforward, as you are using C++ 17 (1z), a newer base image will work better. sudo: false
: You may not believe this, but sometimes without this directive, Travis CI might launch a full VM of macOS
instead of Linux container you want (I encountered this issue before).build scripts:
cmake --build . -- -j"$(nproc)"
cmake
actually can automatically launch the build tools for you. Anything after --
is passed to that build tool.-maxcpucount
This is to use all available CPU cores for the build, equivalent in Appveyor is parallel: true
... and add Travis Windows Agent
And BTW you mentioned you would like to include a large test sample binary in CI. Do you also want me to include (a stub) in this PR?
Thanks
This change is![Reviewable](https://reviewable.io/review_button.svg)