Skip to content

Allow multiple build for different type of OS. #47

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

Closed
wants to merge 4 commits into from

Conversation

irvifa
Copy link

@irvifa irvifa commented Apr 2, 2020

No description provided.

@irvifa irvifa force-pushed the allow-build-for-multiple-os branch 2 times, most recently from c4ae577 to 05bc34e Compare April 2, 2020 18:55
@kevmoo
Copy link
Member

kevmoo commented Apr 2, 2020

@jakemac53 – is there a way to set this up w/ mono_repo?

@irvifa
Copy link
Author

irvifa commented Apr 2, 2020

If it’s possible then will be good since we don’t need to create an explicit matrix. Expect we of course still can exclude several things that don’t need to be build inside of the job.

@jakemac53
Copy link
Contributor

mono_repo does support os config yes. It looks just like normal travis config, so inside of a mono_pkg.yml file you would do for instance:

os:
  - linux
  - windows
  - osx

@irvifa irvifa force-pushed the allow-build-for-multiple-os branch from 05bc34e to d9ab820 Compare April 3, 2020 00:57
@irvifa
Copy link
Author

irvifa commented Apr 3, 2020

For travis I guess there's also a problem for the Windows dll build, for FFI samples. However I can't test it on my PC. Please see https://travis-ci.org/github/dart-lang/samples/jobs/670278306?utm_medium=notification&utm_source=github_status

As for mono_repo I try to change the following:

travis:
  addons:
    apt:
      packages:
        - cmake

  os:
    - linux
    - osx
    - windows

But seems like the expansion didn't work for all of the os. https://travis-ci.org/github/dart-lang/samples/builds/670381077?utm_source=github_status&utm_medium=notification. Let me know if there's still something off with the config. Thank you..

@domesticmouse
Copy link
Member

I believe this is the start of a fix for #46

@irvifa
Copy link
Author

irvifa commented Apr 3, 2020

@domesticmouse Yes it is.. the build config that managed to fix this is writing all of the possible combination for all of the build stages. But this is really inefficient, in the term of lines addition. The goal is since this is something like "Hello World" I hope people can easily look at the working example. Any documentation on how mono_repo config works? I'm never use that before. Example of fixes related to FFI is including #44.

@domesticmouse
Copy link
Member

Hey @kevmoo, can you help out with configuring mono_repo?

@jakemac53
Copy link
Contributor

@irvifa The os config is a top level thing that you put in each mono_pkg.yaml file - it doesn't go under the travis section.

You can see an example here https://github.com/dart-lang/build/blob/280cd60d74fe24e5a2f01032f4c5ffe3e9c4c5a6/_test/mono_pkg.yaml#L4 which also has examples of overriding specific tasks to run only on a certain os.

@irvifa
Copy link
Author

irvifa commented Apr 6, 2020

@jakemac53 I think that's because of the fact that top level mono_repo is https://github.com/dart-lang/build/blob/280cd60d74fe24e5a2f01032f4c5ffe3e9c4c5a6/mono_repo.yaml So the mono_repo you mentioned before linked to the top level mono_repo, please cmiiw..

@jakemac53
Copy link
Contributor

@irvifa I am not sure what you are asking exactly - but what you need to do is put the os configuration in each nested mono_pkg.yaml file - you configure that per package even if its the same for every package. It is not supported in the mono_repo.yaml file as a global option.

@irvifa irvifa force-pushed the allow-build-for-multiple-os branch from 766e646 to ef32f19 Compare April 6, 2020 15:18
@irvifa irvifa force-pushed the allow-build-for-multiple-os branch from ef32f19 to 18d04cc Compare April 6, 2020 15:27
@irvifa
Copy link
Author

irvifa commented Apr 7, 2020

@jakemac53 Can you help me review this PR? I exclude the windows as allowed to fail since I can't exactly test the .dl lib in windows for FFI. Wondering if opening .dl is allowed in Windows by default.

@jakemac53
Copy link
Contributor

I can send an alternate PR here to show what I mean about the config, give me a minute.

You can also choose which jobs should run on which OS instead of allowing all failures on osx/windows.

@jakemac53
Copy link
Contributor

see #48

@irvifa irvifa closed this Apr 10, 2020
@irvifa irvifa deleted the allow-build-for-multiple-os branch April 10, 2020 15:05
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.

4 participants