How to set up automatic build of a dynamic library in Rust?

Hi, total Travis CI noob here.

I’m clueless as to how to correctly set up a .travis.yml for this Rust crate on Windows. The relevant crate outputs a dynamic library which needs to be moved into the src/ directory in the repository. Also, the build process apparently depends on a Python interpreter, judging from the log output.

In other words, these are the requires steps:

  1. go to replays_analysis folder, where the crate resides: cd replays_analysis
  2. build the crate: cargo build --release
  3. move the generated dynamic library into the appropriate location: move target\release\liblib_replays_analysis.dll ..\src\lib_replays_analysis.pyd

My non-working attempt so far:

os: windows
language:
  - rust
  - python
rust:
  - nightly
python:
  - "3.8"
before_script: cd replays_analysis
script:
  - cargo build --release
  - move target\release\liblib_replays_analysis.dll ..\src\lib_replays_analysis.pyd

The log output ends with this (full log here)

[...]
   Compiling serde_json v1.0.52
   Compiling pyo3 v0.9.2

The command "cargo build --release" exited with 101.
0.05s$ move target\release\liblib_replays_analysis.dll ..\src\lib_replays_analysis.pyd
The command "move target\release\liblib_replays_analysis.dll ..\src\lib_replays_analysis.pyd" exited with 127.
error: failed to run custom build command for `pyo3 v0.9.2`

Caused by:

  process didn't exit successfully: `C:\Users\travis\build\kangalioo\etterna-graph\replays_analysis\target\release\build\pyo3-06a3cea33c81212a\build-script-build` (exit code: 1)

--- stderr

Error: "Python 3.x interpreter not found"

/c/Users/travis/.travis/functions: line 109: move: command not found

Done. Your build exited with 1.

To me it looks like there’s two issues:

  1. There’s no Python interpreter
  2. The move command isn’t there (whyever that is, I thought move is the official Windows file moving command)

How would I go about fixing these issues?

I appreciate any help and any pointers! :slight_smile: