Gh-pages with NodeJS / Electron build

I wrote a Web-App based on NodeJS / Electron. The web part gets deployed and published to gh-pages, the desktop builds go to Github Releases. Linux and MacOS work, but on Windows the deployment fails.

First the website gets built, then the desktop app - both via node.

It complains

Installing deploy dependencies
. . .
The system cannot find the path specified.
Initialized empty Git repository in C:/Users/travis/AppData/Local/Temp/d20201103-1784-1desig9/work/.git/

Preparing deploy

Deploying application

failed to deploy
Logged in as @suhrmann (Simon Uhrmann)
The system cannot find the path specified.
cd C:/Users/travis/AppData/Local/Temp/d20201103-1784-1desig9/work
Switched to a new branch ''gh-pages''
cd -
cd C:/Users/travis/AppData/Local/Temp/d20201103-1784-1desig9/work
The source and destination cannot both be remote.
rsync error: syntax or usage error (code 1) at main.c(1274) [Receiver=3.1.2]
Could not copy C:/Users/travis/build/suhrmann/Anno-1800-Calculator/dist.


No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received

The build has been terminated

Sample failed deployment on Windows (I allow_failures on always failing build on Windows):

Is this a problem with deployment on Windows, or did I make a mistake in the Travis config?
Thank you in advance for help! :slight_smile:


suggests it’s a problem with rsync and gitbash.

On the other hand, I am curious as to why you are deploying the same code 3 times. Do different OSes generate different files in dist? If so, I would think that running it 3 times will overwrite the files, and the last one that runs always “wins”. It also does not seem like good use of our resources.

1 Like

Good to know it is not incorrect config
Thank you very much!

The build on all platforms is only there to find the error - I though windows might use another build location and therefore built on all os.

For now I stop investigating gh-pages on Windows and restrict build and deployment to os: "linux" - again

Now Windows deployment on Github release works again :slight_smile: … But in the end, after successful deployment Windows still fails with:

Done. Your build exited with 0.
Setting target_commitish to 987e4b2111f4baf2c92fdc5349e049c80bd0c4c1

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
The build has been terminated

Updated config: https://travis-ci.org/github/suhrmann/Anno-1800-Calculator/jobs/741429943

UPDATE:
To clarify: There are 2 jobs: 1st build the website and deploy to gh-pages, 2nd build the desktop apps using Electron, and these are abviously os specific - I used dockerized wine to build for Winodws, but I wanted to give “native” Windows a try

I’ve identified the cause: it’s the cwRsync that’s used as rsync in the Windows image.

It’s basically broken as it doesn’t support Windows paths, either with forward- or backslashes, and needs them specified as /cygdrive/c/<etc>.

The linked package doesn’t have any sort of a meaningful source- or bug tracker and has other serious problems beside the above, so I suggest it to be replaced with another rsync version.

https://serverfault.com/questions/310337/using-rsync-from-msysgit-for-binary-files lists a way to add rsync to Git for Windows runtime from the MSYS2 package repository.

2 Likes

There is even a quite up to date version in Choco: choco install msys2 [MSYS2 20200903.0.0] - dont use the outdated msys2-installer!

The description of msys2 on Choco:

You can also just install the msys2 package without system update and use ridk afterwards:

cinst ruby                        # install ruby
cinst msys2 --params "/NoUpdate"  # install msys2 without system update
Update-SessionEnvironment         # refresh environment vars
ridk install 2 3                  # use ruby's ridk to update the system and install development toolchain

Installing MSYS2 before deployment fixes the error!
Sample:

I installed MSYS2, described in the Travis docs for windows How do I use MSYS2?

UPDATE: Nvm - I forgot to allow deployment from travisci-test branch; It’s still broken

UPDATE 2: I finally created a working Travis config -> changed above link.

1 Like
Imprint