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 CI #623

Merged
merged 1 commit into from Jul 11, 2016
Merged

Add appveyor.yml for Windows CI #623

merged 1 commit into from Jul 11, 2016

Conversation

ghost
Copy link

@ghost ghost commented Jul 8, 2016

  • Added jobs for MinGW (64 bit) and MSVC (32 and 64 bits) with Release
    configurations as well as MSVC (64 bit) with Debug configuration.
  • Added badge to README.

Commit 005929e build status: https://ci.appveyor.com/project/jasonwilliams200OK/binaryen/build/1.0.37

@kripken, to set it up, please login to AppVeyor with your GitHub account and chose WebAssembly org from the drop down (post login). Then add binaryen project from top menu and press build.

I have also added ctest command (doing nothing atm) which would function if we configure the tests in CMakeLists with ctest runner (aka cross-platform tests,: https://cmake.org/cmake/help/v3.0/manual/ctest.1.html). Examples can be found here: https://github.com/search?l=cmake&q=cmake+ENABLE_TESTING&type=Code&utf8=✓

@@ -67,7 +67,11 @@ ELSE()
ADD_COMPILE_FLAG("-Wextra")
ADD_COMPILE_FLAG("-Wno-unused-parameter")
ADD_COMPILE_FLAG("-fno-omit-frame-pointer")
ADD_COMPILE_FLAG("-fPIC")
IF(WIN32)
ADD_COMPILE_FLAG("-D_GNU_SOURCE")
Copy link
Author

Choose a reason for hiding this comment

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

@kripken
Copy link
Member

kripken commented Jul 8, 2016

Ok, I logged into appveyor, but I'm not sure where to find the dropdown you mention?

@ghost
Copy link
Author

ghost commented Jul 8, 2016

When you log on with GitHub Account, it would show a dropdown menu to select organization before proceeding to dashboard (given you are a member of WebAssembly org on GitHub).

@ghost
Copy link
Author

ghost commented Jul 8, 2016

@kripken
Copy link
Member

kripken commented Jul 8, 2016

Hmm, I logged in with my github account, but I just get sent to what I guess is the dashboard (a big mostly empty page with "Welcome to your new AppVeyor account!"

If I try to create a new project it asks for more oath permissions (admin access to webhooks etc.) and has a bunch of options there. Is that the right thing?

@ghost
Copy link
Author

ghost commented Jul 8, 2016

This is how it appears to me:

Before login:

image

After login with GitHub account:

image

When I select the organization name from the drop down menu and press GitHub button again on the second screen, it takes me to https://ci.appveyor.com/projects where it lists the projects of this organization which are being monitored by AppVeyor. If it is some existing project which hasn't been configured yet, then we press the New Project button on top and list GitHub, BitBucket and so on in the left menu and the available projects in the right.

Did you grant it access to your public repositories and organizations? Had you opted for no, then you can change it again by going to https://ci.appveyor.com/account, where you can revoke the github access and reauthorize .. this time permissively. 😄

@kripken
Copy link
Member

kripken commented Jul 8, 2016

Ok, it might be those extra auths. I granted them now.

However while granting them it said that for the webassembly org in particular I can just ask for access. So I asked for it, it said it emailed the owners.

@kripken
Copy link
Member

kripken commented Jul 8, 2016

Ok, all that should be ok now. But after I logging in I still get sent straight to the dashboard. Should I just create a new project? When I do that I get https://ci.appveyor.com/project/kripken/binaryen which looks empty

@ghost
Copy link
Author

ghost commented Jul 8, 2016

I think your issue seems to be related to appveyor/ci#801 (comment) and appveyor/ci#802. What I have gathered from this situation (which the issues probably don't list yet) is that if you are a collaborator to an organization and your membership is not visible publicly (GitHub profile such as in your profile WebAssembly is not listed to public), then AppVeyor doesn't recognize the membership. If you make the membership to WebAssembly visible and Revoke->then->Authorize again, does it then land you to the second-step login screen?

you can make your membership back to invisible after configuring the repo :)

@kripken
Copy link
Member

kripken commented Jul 8, 2016

Yeah, I thought it might be that earlier so I edited myself to public. That was almost an hour ago but I still don't see the WebAssembly group among my public groups on my profile though...

@dschuff, maybe you can try to do this? (you have equal collaborator status as I do on this repo) It should just be logging in as per the first comment in this PR, so just a few seconds to see if you don't hit whatever weirdness is blocking me.

@dschuff
Copy link
Member

dschuff commented Jul 8, 2016

I wonder if it's not the status on the repo but on the WebAssembly organization that makes a difference. Neither of us is actually an owner of that organization.

@dschuff
Copy link
Member

dschuff commented Jul 8, 2016

I was able to make a build ( https://ci.appveyor.com/project/dschuff/binaryen ) that seems to be from the WebAssembly binaryen repo. I don't know if it matters that it's project/dschuff rather than project/WebAssembly or some such?

@ghost
Copy link
Author

ghost commented Jul 8, 2016

Great, then it probably doesn't matter if it is observing the upstream rather than the fork (which is another kind of weirdness since that is suppose to only happen at https://ci.appveyor.com/project/WebAssembly/binaryen).

You can also view the settings page of this repo to find AppVeyor generic webhook: https://github.com/WebAssembly/binaryen/settings/hooks (just to validate everything is fine). It should be something like https://ci.appveyor.com/api/github/webhook (pull_request and push). If that is there, then I will update README in this PR to point to dschuff/binaryen since that is configured. Whenever the upstream account will be setup, only the badge URL in README would be good to change.

Please let me know if the webhook is there so i can amend the commit. :)

@ghost
Copy link
Author

ghost commented Jul 8, 2016

@kripken, regarding the publicly visible membership, there seems to be a profile setting on GitHub, which lists the organizations under the display picture on profile page (https://github.com/kripken) for public. For example I can only see Unity3D logo on your profile. Probably AppVeyor is relying on the same kind of scope.

@dschuff
Copy link
Member

dschuff commented Jul 8, 2016

I don't appear to have access to the settings of WebAssembly/binaryen. I might be some kind of contributor or commiter rather than an owner.

@ghost
Copy link
Author

ghost commented Jul 8, 2016

@dschuff, I googled the issue again and found this: http://help.appveyor.com/discussions/questions/1154-appveyor-account-for-github-organizations. This probably translates to our scenario like this:

If that works then we will have https://ci.appveyor.com/project/WebAssembly/binaryen and this PR is good to go as is. :)

Would you give it a try? Otherwise i will update the URL in readme.

@dschuff
Copy link
Member

dschuff commented Jul 8, 2016

https://ci.appveyor.com/project/WebAssembly/binaryen

Seems to work.
The only problem now is that I accidentally signed up for a trial of the private-project account instead of the free OSS account, and I don't see a way to convert it from the account config (I can only buy the ugprades). I'll look into that.

@dschuff
Copy link
Member

dschuff commented Jul 8, 2016

Actually it looks like that's not a problem according to http://help.appveyor.com/discussions/questions/1118-how-to-change-my-plan-to-free-for-open-source-projects so we should be good.

@ghost
Copy link
Author

ghost commented Jul 8, 2016

Great! Thanks @dschuff. Then this PR as is ready. :)

I have re-pushed the commit to see if AppVeyor shows up on the PR, but it does not. Seems like this solution might work: http://stackoverflow.com/questions/32607885/appveyor-doesnt-update-github-pull-request-with-the-build-status.

@dschuff
Copy link
Member

dschuff commented Jul 8, 2016

OK, I tried revoking and re-authorizing.

@dschuff
Copy link
Member

dschuff commented Jul 8, 2016

Also tried a test PR: #624 but it doesn't appear to have triggered a build.

@ghost
Copy link
Author

ghost commented Jul 8, 2016

@FeodorFitsner (from AppVeyor) could you please suggest what steps need to be taken in this case to make AppVeyor build trigger in PR? Here is the account setup https://ci.appveyor.com/project/WebAssembly/binaryen and this PR is adding appveyor.yml but it is not triggering the build.

@FeodorFitsner
Copy link

Make sure AppVeyor's webhook is added to the repo. You can see webhook URL on General tab of AppVeyor project settings.

@ghost
Copy link
Author

ghost commented Jul 9, 2016

Thanks Feodor. I think we need someone with access to https://github.com/WebAssembly/binaryen/settings/hooks to verify if the appveyor webhook "Payload URL" value is same as the value of "Webhook URL" at https://ci.appveyor.com/project/WebAssembly/binaryen/settings. This normally gets added automatically and we never have to visit the settings page, but in this case we might have different URL.
@dschuff, can you ping the owner of repo? Note that the full payload URL gets visible in edit mode; on list view it just shows https://ci.appveyor.com/api/github/webhook (pull_request and push) (not the ?id part) clicking on it will open the edit view.

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

IIRC @kripken is the owner of the repo. (If not, then @jfbastien should be able to check).

@kripken
Copy link
Member

kripken commented Jul 11, 2016

No, I'm just a collaborator like you, @dschuff. The owners are I guess the WebAssembly group owners that created the repo for us.

@jfbastien
Copy link
Member

I think I just installed the hook properly. LMK if that's not the case.

@jfbastien
Copy link
Member

Also, @kripken and @dschuff should already be admins for the binaryen repo.

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

Cool. Things seem to be happening now on my test PR: #624

@ghost
Copy link
Author

ghost commented Jul 11, 2016

Thanks. I pushed a test commit, apparently it didn't triggered. :(

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

The hook only included 'push' but not 'pull request'. since my PR was on a branch in the WebAssembly repo itself, and yours was on a forked repo, maybe that explains the different. I added the 'pull_request' event too. try again?

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

Actually, hold off 1 sec.

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

oh it did work that time. cool.

@ghost
Copy link
Author

ghost commented Jul 11, 2016

Yay, it worked! Thanks Derek. :)

The whole job matrix takes about an hour to build. We may want to remove the Debug builds or fast_finish+allow_failure (https://www.appveyor.com/docs/appveyor-yml line 105). What do you think?

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

So right now we have Debug/Release x (Msys x 32/64 + VS2015 x 32/64)?
Do we expect a lot of people to be doing Windows 32 builds? My guess is that almost all devs doing Linux and Windows-hosted builds will be using 64. I would guess that emscripten/wasm itself will be the most common 32-bit target :).

@ghost
Copy link
Author

ghost commented Jul 11, 2016

Oh wow, it is taking 12 mins! I guess its a paid account thing (since the account is in trial period). So it spawns one VM per job on Azure cloud. For regular account it probably builds on their local servers using some first-come-first-serve / merry-go-round protocol. 😄

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

Maybe for now let's drop the debug builds for Msys and 32-bit VS. (I would expect users wanting to debug would prefer VS and be using 64-bit). We can always tweak later.

@ghost
Copy link
Author

ghost commented Jul 11, 2016

We have: { mingw64, msvcr32 and msvcr64 } x { Debug, Release } configurations.

* Added jobs for MinGW (64 bit) and MSVC (32 and 64 bits) with Release
  configurations as well as MSVC (64 bit) with Debug configuration.
* Added badge to README.
@ghost
Copy link
Author

ghost commented Jul 11, 2016

Amended; now we have mingw64 and msvcr{32,64} in Release, as well as msvc64 in Debug. Total of four jobs.

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

Great! I think this can go now, we can tweak as needed.

@dschuff dschuff merged commit 7f4c129 into WebAssembly:master Jul 11, 2016
@ghost ghost deleted the feature/ci/appveyor branch July 11, 2016 19:46
@ghost
Copy link
Author

ghost commented Jul 11, 2016

@FeodorFitsner, the badge URL https://ci.appveyor.com/api/projects/status/github/WebAssembly/binaryen?svg=true (public repo format) is rendering failure Windows CI, while the build on master head is passing. Given that this account is trail and considered paid until the account expired while the repo is public, would we have to wait until the trail expired to get green status from badge using public URL format?

@FeodorFitsner
Copy link

I guess there is another project using the same GitHub repo. To use this format the repo should be unique in AppVeyor database.

@dschuff
Copy link
Member

dschuff commented Jul 11, 2016

I'll switch it to use the unique one from the appveyor project: #626

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.

None yet

4 participants