Skip to content
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

Add batch files to execute Dotty commands on Windows #5444

Closed
wants to merge 93 commits into from
Closed

Add batch files to execute Dotty commands on Windows #5444

wants to merge 93 commits into from

Conversation

michelou
Copy link
Contributor

@michelou michelou commented Nov 14, 2018

  1. Batch files present in directory dist\bin\ will be copied unchanged to the gz/zip archives (see sbt dist-bootstrapped/packArchive).
  2. Batch files added to project\scripts\ (ie. build.bat, cmdTests.bat and bootstrapCmdTests.bat) are adapted from .drone.yml (executed on the Dotty CI server) and can generate the documentation and the gz/zip archives (depending on bootstrap and tests results).

NB. Point 1 is ready to be tested on a Windows machine, but point 2 requires my changes in compiler\src\*.scala and compiler\test\*.scala to be committed in a new branch (and submitted as a separate PR). Points 1 and 2 have been tested on a Windows machine and are used in PR #5531.

@michelou michelou changed the title add batch files to execute Dotty commands on Windows Add batch files to execute Dotty commands on Windows Nov 14, 2018
@liufengyun
Copy link
Contributor

Thanks a lot @michelou !

I created a test here: lampepfl/packtest#18

It seems there is some error when running the batch files. As I've very little experience with batch scripts. Could you please have a look? Thanks a lot.

https://ci.appveyor.com/project/liufengyun/packtest-s6xq2/builds/20551431/job/mdakdmt9m9pp6jlr

@liufengyun liufengyun self-requested a review November 26, 2018 16:09
@liufengyun liufengyun self-assigned this Nov 26, 2018
@liufengyun
Copy link
Contributor

Thanks @michelou , the CI now is green: lampepfl/packtest#18

echo arch[ives]-only generate ONLY gz/zip archives
echo boot[strap]-only generate ONLY compiler bootstrap
echo compile-only generate ONLY compiler 1st stage
echo doc[umentation]-only] generate ONLY documentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the motivation to have both tests and some utility in the same batch?

@@ -0,0 +1,458 @@
@echo off
setlocal enabledelayedexpansion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern with this file is that we need CI for windows. Related issue: #4588

We can try to integrate appveyor and run build.bat, but NOT the whole test set.

@michelou
Copy link
Contributor Author

michelou commented Nov 26, 2018

I wrote projets/scripts/build.bat to mimic the phases executed on Dotty IC on a Windows workstation, not to be run on an AppVeyor server. For instance I added advanced subcommands - you call them "utility" - to reduce execution times while fixing Windows related issues on my laptop (still 2 issues).

@michelou
Copy link
Contributor Author

michelou commented Nov 26, 2018

I assume your configuration file .appveyor.yml (adapted from sbt's appveyor.yml) will be added to this repo in the same way as .drone.yml. So yes project/scripts/build.bat needs to be removed and the logic in .drone.yml has to be ported to .appveyor.yml using sbt calls, PowerShell code or (as last choice) calls to batch files (see AppVeyor guide).

@liufengyun
Copy link
Contributor

@michelou Thanks for the clarification. My only concern is about maintainability -- if we don't run project/scripts/build.bat in some CI, then it's highly likely it will break unnoticed in the long run. If we can run some check on windows, it's always a win regardless of the coverage (no need to be the same as .drone.yml).

@smarter
Copy link
Member

smarter commented Nov 27, 2018

@liufengyun Note that apparently the latest version of drone supports Windows, and we'd like to add Windows to our CI eventually.

@michelou michelou closed this Dec 18, 2019
@michelou michelou deleted the batch-files branch December 18, 2019 19:30
@michelou
Copy link
Contributor Author

Batch files are still available from my project michelou/dotty-examples (see file BUILD.md).

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.

5 participants