Skip to content

Commit

Permalink
fix(ci): update Python version for Windows CI (#1453)
Browse files Browse the repository at this point in the history
This broke today because the build hosts were updated to a more
recent Python version.
  • Loading branch information
addaleax authored Apr 26, 2023
1 parent bb87fc8 commit c71dbb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .evergreen/setup-env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set -e
set -x
export BASEDIR="$PWD/.evergreen"
export PATH="$BASEDIR/mingit/cmd:$BASEDIR/mingit/mingw64/libexec/git-core:$BASEDIR/git-2:$BASEDIR/npm-8/node_modules/.bin:$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/python/3.6/bin:/opt/java/jdk16/bin:/opt/chefdk/gitbin:/cygdrive/c/python/Python310/Scripts:/cygdrive/c/python/Python310:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/cmake/bin:/opt/mongodbtoolchain/v3/bin:$PATH"
export PATH="/cygdrive/c/python/Python311/Scripts:/cygdrive/c/python/Python311:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/opt/python/3.6/bin:$BASEDIR/mingit/cmd:$BASEDIR/mingit/mingw64/libexec/git-core:$BASEDIR/git-2:$BASEDIR/npm-8/node_modules/.bin:$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/java/jdk16/bin:/opt/chefdk/gitbin:/cygdrive/c/cmake/bin:/opt/mongodbtoolchain/v3/bin:$PATH"
export IS_MONGOSH_EVERGREEN_CI=1

if [ "$OS" != "Windows_NT" ]; then
Expand Down Expand Up @@ -66,16 +66,19 @@ echo "Full path:"
echo $PATH

echo "Using node version:"
node --version
(which node && node --version)

echo "Using npm version:"
npm --version
(which npm && npm --version)

echo "Using git version:"
git --version
(which git && git --version)

echo "Using python version:"
python --version
(which python && python --version) || true

echo "Using python3 version:"
(which python3 && python3 --version) || true

echo "Node.js OS info:"
node -p '[os.arch(), os.platform(), os.endianness(), os.type(), os.release()]'
Expand Down
3 changes: 3 additions & 0 deletions testing/integration-testing-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ async function tryExtensions(base: string): Promise<[ string, Error ]> {

async function findPython3() {
try {
if (process.env.DISTRO_ID?.startsWith('windows-')) {
throw new Error('python3 on Windows in evergreen CI is broken but `python` is working python3');
}
await which('python3');
return 'python3';
} catch {
Expand Down

0 comments on commit c71dbb7

Please sign in to comment.