deltachat / deltachat-node

Email-based instant messaging for Node.js.
GNU General Public License v3.0
45 stars 11 forks source link

Releasing on windows not working #360

Closed ralphtheninja closed 5 years ago

ralphtheninja commented 5 years ago

> deltachat-node@1.0.0-alpha.1 prebuild C:\projects\deltachat-node-d4bf8
> prebuildify -t 10.16.0 --napi --strip --postinstall "node scripts/postinstall.js --prebuild"
C:\projects\deltachat-node-d4bf8>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --target=10.16.0 --target_arch=x64 --release )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --target=10.16.0 --target_arch=x64 --release ) 
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  module.c
  strtable.c
  win_delay_load_hook.cc
LINK : fatal error LNK1181: cannot open input file '..\deltachat-core-rust\target\release\deltachat.dll.lib' [C:\projects\deltachat-node-d4bf8\build\deltachat.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 6.3.9600

https://ci.appveyor.com/project/ralphtheninja/deltachat-node-d4bf8/builds/25677147

ralphtheninja commented 5 years ago

I should also know better than to release in the middle of the night. Will check this tomorrow.

Jikstra commented 5 years ago

Weird, appveyor fails but in my windows 10 vm everything works as expected. Maybe a weird rust version? For the alpha2 release i manually built them on the vm and uploaded them, seems to work too.

Jikstra commented 5 years ago

I think this line could cause the problem: https://github.com/deltachat/deltachat-node/blob/master/appveyor.yml#L35

ralphtheninja commented 5 years ago

@Jikstra Sounds about right. Good catch! I was optimizing build times and broke releasing. :angry:

Jikstra commented 5 years ago

@ralphtheninja current master is broken because of rust-core, so this delays the -node alpha.3 release a bit. I will debug this appveyor builds once i'm trying to do a new release/prebuilts, i think it's a bit hard to try to fix this in a pr as the problematic ci code only gets executed if we're doing a release/have a new tag.

ralphtheninja commented 5 years ago

We could remove the caching/trick I did. It will take a longer time to build but it will be correct.

Jikstra commented 5 years ago

Hmm didn't understand your caching stuff yet, would investigate it when doing a new release and hacking on appveyor directly. But feel free to hack around on it too, you know it in more detail i think :)

ralphtheninja commented 5 years ago

The problem is that you can't cache the compiled stuff since we're checking out rust-core, so it will have to be moved elsewhere and cached and then moved back after git submodule update etc. Makes sense?