Powershell Scripts Fail to Run with No Error Message

I have a Rust project which links to and uses some native libraries which I’d like to run CI tests for across Linux, OS X and Windows, that I’m running into some issues with on the new Windows environment. To find the native library to link against from the Rust build script I use an environment variable from the user (EMBREE_DIR) to tell Rust where to look for linking. However, this seemed to fail with Rust getting some kind of strange path to the library and not finding it with a mix of forward slashes and escaped backwards slashes, though testing now on my laptop through git bash I can’t reproduce this.

I’m now trying to run the windows build through a powershell script (https://github.com/Twinklebear/embree-rs/blob/ci/travis-windows.ps1 , https://github.com/Twinklebear/embree-rs/blob/ci/.travis.yml ), but when Travis tries to run the script it fails with no error output. The build log can be seen here: https://travis-ci.org/Twinklebear/embree-rs/jobs/493338130 , I have some debug logging in the powershell script which doesn’t seem to get printed so it may not be getting run successfully at all.

Is there anything else I should be doing or fixing to run powershell scripts on the windows environment?

This is most likely due to your use of a secure variable, which is the first item in

I’m marking this now as resolved, but if you believe otherwise, do let us know.

Interesting, I didn’t think that was the issue because the VM succeeds in coming up and starts running fine. Removing the secret does get the powershell script to run, however the build still fails trying to find the library. I’ll look into this some more and see if it’s something in my script or config, or travis

I have an issue that looks very similar. It appears as though the script is never started, and there is no output for it. After the script, I try checking to see if the results of the script appear, and that fails. One thing that I feel very unsure about is how to write paths in the travis.yml, i.e. with forward slashes or backslashes, single, double or no quotes. On my local machine, I know how to do that based on Windows and PowerShell documentation, but I am unsure when I use travis.yml.
The output is here:
https://travis-ci.com/ICB-DCM/AMICI/jobs/260370817
and here are a few line of the travis.yml:

  • if [[ “$TRAVIS:OS:NAME” == “windows” ]]; then powershell C:/Users/travis/build/AMICI/scripts/installOpenBLAS.ps1; fi
  • if [[ “$TRAVIS:OS:NAME” == “windows” ]]; then powershell $VerbosePreference=‘SilentlyContinue’; fi

check results of openBLAS installation

  • if [[ “$TRAVIS_OS_NAME” == “windows” ]]; then powershell -Command Get-ChildItem ‘C:/BLAS’ -Recurse; fi