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

Precompiled binary support #407

Merged
merged 1 commit into from
Jan 11, 2017
Merged

Precompiled binary support #407

merged 1 commit into from
Jan 11, 2017

Conversation

rchipka
Copy link
Member

@rchipka rchipka commented May 11, 2016

This pull request addresses issue #395 by uploading Windows binaries to GitHub Releases. If a user installs libxmljs on Windows, node-pre-gyp will use one of the precompiled binaries.

This also fixes issue #392 and adds AppVeyor CI testing for Windows builds.

@rchipka
Copy link
Member Author

rchipka commented May 11, 2016

Updated to libxmljs 0.17.1 and everything compiles fine on Windows.

The issue now is that the baseurl_xml test fails on Node 0.12+ and the test process completely exits on Node 0.10.

The doctype base URL issue should be easy to debug. For some reason libxml is having trouble resolving the relative path to the doctype declaration file.

I'm not sure why Node 0.10 abruptly exits at some point during the test. Something must be causing a segfault. This issue might be harder to solve.

@rchipka
Copy link
Member Author

rchipka commented May 11, 2016

Note: Prior to updating my branch to 0.17.1, libxmljs compiled fine on all versions of Node and all tests ran successfully.

@defunctzombie
Copy link
Collaborator

squash commits

@defunctzombie
Copy link
Collaborator

@polotek can you setup appveyor? or add us as administrators on this repo so we can do it? or move the repo to one of our accounts?

@rchipka
Copy link
Member Author

rchipka commented May 12, 2016

@defunctzombie @polotek I put all the configuration info that AppVeyor needs to build libxmljs into the config file, so it should be as simple as creating an AppVeyor account and pointing it to this GitHub Repo.

Before we merge this PR in, I'd like to see all the AppVeyor builds/tests passing first. Maybe I should create a separate pull request that fixes the original build problem on windows (#ifdef _WIN32) and just merge that for now.

I thought that this PR was good to go before I updated to 0.17.1 and ran into these issues. Other Windows users may have the same issues I mentioned earlier about the tests not passing and crashing in early versions of Node. That being said, libxmljs would at least build on Windows with the correct #ifdef's merged in a separate PR.

@rchipka
Copy link
Member Author

rchipka commented May 12, 2016

Also, if the libxml version bump is causing the instability issues on Windows, then it will probably take more time solve these issues. Alternatively, we could disable the unit testing on AppVeyor and just use the Windows build status/binary uploading as-is.

@gagern
Copy link
Contributor

gagern commented May 12, 2016

Is this discrepancy intentional?

image: Visual Studio 2015

build_script:
  - npm install --msvs_version=2013

Should this be 2015 in the install call as well?

@rchipka
Copy link
Member Author

rchipka commented May 13, 2016

@gagern It's there to ensure that it will compile on older versions as well. I've changed the config to do this via an environment variable instead.

The issue where the test suite seemed to be crashing was actually this. All the tests are working fine, it's just that there's an issue with nodeunit in Windows where the output can be cut off.

Now I just need to resolve the failing DTD baseUrl test.

@@ -56,6 +56,12 @@ module.exports.recoverable_parse = function(assert) {
};

module.exports.baseurl_xml = function(assert) {
if (/^win/.test(process.platform)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

NOTE: Ignoring the baseurl_xml test on Windows until we find out why libxml isn't resolving the relative path.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a bug report to track this? If so it would be nice to see its number cross referenced, perhaps both here in the discussion and in the source code comment.

@rchipka
Copy link
Member Author

rchipka commented May 13, 2016

The baseurl_xml test is now skipped on Windows until we find out why libxml isn't resolving relative paths for XML doctype declarations.

@defunctzombie @gagern I just need to squash the commits and make sure the builds all succeed. Then this PR should be ready for review and possible release into 0.17.2.

@@ -1,6 +1,8 @@
# Libxmljs
[![Build Status](https://secure.travis-ci.org/polotek/libxmljs.svg?branch=master)](http://travis-ci.org/polotek/libxmljs)

[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/cf862a98w7qsajpl?svg=true)](https://ci.appveyor.com/project/rchipka/libxmljs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

will need to reference this repo url right?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the link to the polotek/libxmljs builds on my account. You, or anyone else for that matter, can create an AppVeyor account, point it to this repo, and it'll build and test exactly the same.

So it doesn't really matter which or how many different AppVeyor accounts point to this repo, as long as we link to one of them we'll have a badge and a link to the build/test logs.

You or I could create an AppVeyor account named "libxmljs" or "polotek" and then email the credentials to @polotek. That way he owns the AppVeyor account in the Readme.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome. As long as it works, good with me. Will it automatically build when we push new code?

@rchipka
Copy link
Member Author

rchipka commented May 14, 2016

As soon as @polotek adds an AppVeyor webhook, it will build for all branches and only upload binaries when there's tagged commit on the master branch. The badge shows the current build status of the master branch.

The webhook URL for "polotek/libxmljs" on my account is https://ci.appveyor.com/api/github/webhook?id=cf862a98w7qsajpl

@defunctzombie
Copy link
Collaborator

@rchipka we've moved the repo to a new libxmljs organization. This will let us all manage it better. Let me know what I need to setup on the repo webhook wise to get the builds going.

@rchipka
Copy link
Member Author

rchipka commented May 15, 2016

@defunctzombie Should be the same process. Project settings -> Webhooks -> Add Webhook. From there just put in the previously mentioned webhook URL and then you can choose which messages it will receive (commits, etc.)

@defunctzombie
Copy link
Collaborator

@rchipka which messages should it receive?

@rchipka
Copy link
Member Author

rchipka commented May 15, 2016

@defunctzombie I believe it works fine if you check "Just the push event"

@defunctzombie
Copy link
Collaborator

@rchipka added

"module_name" : "xmljs",
"module_path" : "./build/Release/",
"host" : "https://github.com",
"remote_path" : "./polotek/libxmljs/releases/download/v{version}/",
Copy link
Collaborator

Choose a reason for hiding this comment

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

probably should be updated or org path now

Copy link
Collaborator

Choose a reason for hiding this comment

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

update the repo and bugs url while you're in here since we moved the repo

@defunctzombie
Copy link
Collaborator

LGTM

@@ -0,0 +1,87 @@
environment:
github_release_token:
secure: en/UnoFHA3RsSAHM5c6zb3RAMa4V01lC3pYG1YrHSeOPFu78SUA/0lOjNe3pp8RG
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this something that should be secret?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, this string is encrypted using AppVeyor's secure variables feature.

@rchipka
Copy link
Member Author

rchipka commented May 15, 2016

@polotek If you'd like AppVeyor to also build/test each pull request you have to enable the "pull request" event in the webhook settings. So "push" and "pull request" should be checked.

@rchipka
Copy link
Member Author

rchipka commented May 24, 2016

This is good to merge for now. The discussed Windows issues/improvements can be made once we have a working Windows release.

@fafnirical
Copy link

Any updates on this, by chance?

@rchipka
Copy link
Member Author

rchipka commented Jun 6, 2016

@fafnirical Still good to merge as far as I'm concerned.

@hildjj
Copy link
Contributor

hildjj commented Aug 31, 2016

Bump. Not only do I need this, but I'm waiting to see if it works so that I can do the moral equivalent in a couple of other packages.

@rchipka
Copy link
Member Author

rchipka commented Jan 11, 2017

Merging because:

  1. It's been almost a year
  2. The changes won't hurt anything
  3. No further exceptions have been raised
  4. Tired of hearing about Windows compilation issues

@bchr02
Copy link

bchr02 commented Jan 11, 2017

@rchipka why not use node-pre-gyp-github within appveyor.yml ps section so that the command to upload the binary will be cross platform? This will make it easier in the future to add precompiled binary support to Linux one day which in my opinion is important too?

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

6 participants