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

MOTOR-1095 Make Rust Compiler available for Cryptography build #194

Merged
merged 13 commits into from Feb 15, 2023
8 changes: 7 additions & 1 deletion .evergreen/config.yml
Expand Up @@ -51,6 +51,11 @@ functions:
export PROJECT_DIRECTORY=$(cygpath -m $PROJECT_DIRECTORY)
fi

# Installation of cryptography requires a rust compiler on some machines
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
export PATH="$HOME/.cargo/bin:$PATH"
rustup toolchain install nightly -c rustc
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the existing rust toolchain like we do in PyMongo instead of installing it? See https://github.com/mongodb/mongo-python-driver/blob/a4c90ae157ffcb1d4a073ceeb9177400126ad871/.evergreen/config.yml#L77-L78

Copy link
Member Author

Choose a reason for hiding this comment

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

There was no /home/admin, nor /home/ubuntu/.cargo on the host, so I followed what is done in bson-rust.

Copy link
Member

Choose a reason for hiding this comment

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

Okay then SGTM.


export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
export UPLOAD_BUCKET="${project}"
Expand All @@ -71,9 +76,10 @@ functions:
export UPLOAD_BUCKET="$UPLOAD_BUCKET"
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
export TMPDIR="$MONGO_ORCHESTRATION_HOME/db"
export PATH="$MONGODB_BINARIES:$PATH"
export PATH="$MONGODB_BINARIES:$HOME/.cargo/bin:$PATH"
export PROJECT="${project}"
export ASYNC_TEST_TIMEOUT=30
export CARGO_NET_GIT_FETCH_WITH_CLI=true
EOT
# See what we've done
cat expansion.yml
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Expand Up @@ -53,13 +53,15 @@ passenv =


basepython =
py37,synchro37: {env:PYTHON_BINARY:python3.7}
py37: {env:PYTHON_BINARY:python3.7}
py38: {env:PYTHON_BINARY:python3.8}
py39: {env:PYTHON_BINARY:python3.9}
py310: {env:PYTHON_BINARY:python3.10}
py311: {env:PYTHON_BINARY:python3.11}
pypy37: {env:PYTHON_BINARY:pypy3}

synchro37: {env:PYTHON_BINARY:python3.7}

# Default Python 3 when we don't care about minor version.
py3,lint,manifest: {env:PYTHON_BINARY:python3}

Expand Down