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 AppVeyor.yml for Windows contious integration #1292

Merged
merged 5 commits into from
Nov 21, 2016

Conversation

BurtHarris
Copy link

@BurtHarris BurtHarris commented Sep 26, 2016

This adds a simple configuration file to the root directory which enables use of appveyor.com for Windows-based integration testing. See a sample build from my fork at https://ci.appveyor.com/project/BurtHarris/antlr4

@BurtHarris
Copy link
Author

@parrt, I think you asked for integration with AppVeyor.com.

It was easier than I thought. While I don't understand all the log spew, it seems like a step in the right direction.

You'll need to configure an account on AppVeyor.com pointing to the official repository, but that also seems easy.

@KvanTTT
Copy link
Member

KvanTTT commented Sep 26, 2016

Can you try to use verbosity: minimal in build section option to decrease log size?
Add build status badge to README.

@BurtHarris
Copy link
Author

BurtHarris commented Sep 26, 2016

@KvanTTT, I'm not sure where you are suggesting I would add the verbosity: minimal, but it sounds like a very good idea. It appears adding a -q to the mvn command line can reduce the spew. The new output seems like an improvement, but still leaves unclear why riving the majority of the lines from testing are needed..

I think we want the badge to reflect the builds on the official fork rather than mine, so I don't think I can propose an edit for this until that's set-up.

@KvanTTT
Copy link
Member

KvanTTT commented Sep 26, 2016

build:
  verbosity: quiet|minimal|normal|detailed

See also an official appveyor.yml reference. Maybe it does not affect result log because here is not a MSBuild system.

@BurtHarris
Copy link
Author

BurtHarris commented Sep 26, 2016

@KvanTTT, adding verbosity:minimal to appveyor.yml doesn't have any effect on the log spew.

That seems to be because it's maven & the antlr4 runtime-testsuite are controlling all the output. The integration approach used by runtime-testsuite with the target-speific languages, c# in particular, is generating much of the output by building and running the tests one-at-a-time rather than in a large batch (which would run much faster.) @ericvergnaud seem to know the most about these tests, perhaps he can review confirm: https://ci.appveyor.com/project/BurtHarris/antlr4/build/4.5.4-SNAPSHOT+AppVeyor.21

@@ -0,0 +1,9 @@
version: '4.5.4-SNAPSHOT+AppVeyor.{build}'
Copy link
Member

Choose a reason for hiding this comment

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

💡 This will quickly become incorrect. You can improve on this by moving the version handling to the build script like this. To determine the specific build number for the call to Update-AppveyorBuild, you can extract it from the pom.xml file.

version: '4.5.4-SNAPSHOT+AppVeyor.{build}'
os: Windows Server 2012
build_script:
- mvn compile -q --batch-mode
Copy link
Member

Choose a reason for hiding this comment

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

❓ Does AppVeyor come with Maven installed? If not, you can install it using Chocolatey like this followed by setting M2_HOME like this.

Copy link
Member

@KvanTTT KvanTTT Sep 26, 2016

Choose a reason for hiding this comment

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

- mvn install -q -Dantlr-python2-python="C:\Python27\python.exe" -Dantlr-python3-python="C:\Python35\python.exe" -Dantlr-javascript-nodejs="C:\Program Files (x86)\nodejs\node.exe" --batch-mode
build:
verbosity: minimal

Copy link
Member

Choose a reason for hiding this comment

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

💡 I would prefer to see the file end with a trailing newline character

build_script:
- mvn compile -q --batch-mode
test_script:
- mvn install -q -Dantlr-python2-python="C:\Python27\python.exe" -Dantlr-python3-python="C:\Python35\python.exe" -Dantlr-javascript-nodejs="C:\Program Files (x86)\nodejs\node.exe" --batch-mode
Copy link
Member

Choose a reason for hiding this comment

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

💭 I have no experience with the dependencies listed here (w.r.t. AppVeyor). Do you know if they come pre-installed on AppVeyor?

Copy link
Member

Choose a reason for hiding this comment

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

All AppVeyor preinstalled tools listed here: Build Worker installed software.

from last line of appvayor.yml
@BurtHarris
Copy link
Author

Thank you @sharwell & @KvanTTT I've pushed a change to eliminate the trailing whitespace on the last line. I found Maven was already installed on the default appveyor worker image part way through working on this. How convinent. 👍

@parrt
Copy link
Member

parrt commented Sep 27, 2016

hiya. so does this correctly build antlr on a windows machine? that would be nice.

@BurtHarris
Copy link
Author

BurtHarris commented Sep 27, 2016

Yes, it seems to. The tests say they are passing, but I'd still like an expert to review.
It works well on appveyor because their worker machines have all the prerequisites pre-installed.

@parrt
Copy link
Member

parrt commented Nov 21, 2016

@BurtHarris How would i know if this stuff works? Do i need to become member of AppVeyor etc...? How can I test?

@KvanTTT
Copy link
Member

KvanTTT commented Nov 21, 2016

@parrt, yes, you should sign up to AppVeyor, link your account with GitHub account, select ANTLR repository and setup build config manually via Web UI or add appveyor.yml file to the repository. After it you will be able to build ANTLR project and run unit-tests as you can do it with Travis-CI.

@parrt
Copy link
Member

parrt commented Nov 21, 2016

@KvanTTT ok, created account. Will investigate

@parrt parrt added this to the 4.6 milestone Nov 21, 2016
@parrt parrt merged commit 6818011 into antlr:master Nov 21, 2016
@KvanTTT
Copy link
Member

KvanTTT commented Nov 23, 2016

I also suggest to add AppVeyor build status on README page.

@parrt
Copy link
Member

parrt commented Nov 25, 2016

added badge.

@BurtHarris BurtHarris deleted the addAppveyor branch March 6, 2017 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants