Build for Android and Windows in the same YAML file

noxalus's Avatar

noxalus

29 Apr, 2018 08:41 PM

Hello everyone,

I'm trying to make a build of my project for both Android and Windows using a single *appveyor.yml* file, but I don't know how I can achieve this for now.

Make a build for Windows only works as expected with the `build` tag and it's the same thing for Android only using `build_script` tag, but if I use them both at the same time, it will only build for Android.

Here is my *appveyor.yml* file: https://github.com/Noxalus/BulletMLI-Editor/blob/38c386bdaf924de690340c3b0393f1c755ac74f8/appveyor.yml

Do you know how I can do what I want?

Thanks in advance.

  1. Support Staff 1 Posted by Owen McDonnell on 30 Apr, 2018 04:09 PM

    Owen McDonnell's Avatar

    Have you read this part of the docs?
    If you already have, you might want to give this blog post, which explains more advanced matrix configuration, a look.

  2. 2 Posted by noxalus on 01 May, 2018 02:26 PM

    noxalus's Avatar

    Thank you for your quick answer McDonnell, but even with the provided links, I'm still struggling to do what I want.

    The problem is I want to build for 2 different target platforms, but for the same configuration. From what I understood from the documentation, the "matrix" keyword won't be useful for me exactly for that reason. However, the "for" keyword one could be what I was looking for, but it doesn't seem to work as I expected, building only for the first element of the list (here is the appveyor file with these changes: https://github.com/Noxalus/BulletMLI-Editor/blob/4b254708d839a40b9d91f0813db1dd40d0886af0/appveyor.yml#L19).

    Did I do something wrong?

  3. Support Staff 3 Posted by Owen McDonnell on 01 May, 2018 04:11 PM

    Owen McDonnell's Avatar

    When you are making your configuration file, first ignore the for: node and determine what jobs your build matrix will consist of. In the example you last linked to there is only one job. That is because, before the for: node, you have only the version: key (not a matrix dimension) and some environment variables (also not a matrix dimension unless subkeyed with matrix:).

    After you have multiple jobs in the build matrix, the for node is used to identify a job or jobs (therefore first key should define which job/s) and then make specific overrides to it.

    If you are still confused it might be helpful to define two distinct configuration yaml files and i could go over how to combine them into one.

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:28 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac