Skip to content

chore(ci): test on windows [3.6] #2634

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

Merged
merged 12 commits into from
Dec 3, 2020
Merged
192 changes: 181 additions & 11 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ functions:
- command: git.get_project
params:
directory: src
- command: git.apply_patch
- command: shell.exec
params:
working_dir: src
Expand All @@ -29,6 +28,14 @@ functions:
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
export UPLOAD_BUCKET="${project}"

# fix paths on windows
if [ "Windows_NT" = "$OS" ]; then
export DRIVERS_TOOLS=$(cygpath -m -a $DRIVERS_TOOLS)
export MONGO_ORCHESTRATION_HOME=$(cygpath -m -a $MONGO_ORCHESTRATION_HOME)
export MONGODB_BINARIES=$(cygpath -m -a $MONGODB_BINARIES)
export PROJECT_DIRECTORY=$(cygpath -m -a $PROJECT_DIRECTORY)
fi

cat <<EOT > expansion.yml
CURRENT_VERSION: "$CURRENT_VERSION"
DRIVERS_TOOLS: "$DRIVERS_TOOLS"
Expand Down Expand Up @@ -60,14 +67,7 @@ functions:
script: >
${PREPARE_SHELL}

rm -rf $DRIVERS_TOOLS

if [ "${project}" = "drivers-tools" ]; then
# If this was a patch build, doing a fresh clone would not actually test the patch
cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS
else
git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
fi
git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS

echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" >
$MONGO_ORCHESTRATION_HOME/orchestration.config
Expand Down Expand Up @@ -101,6 +101,7 @@ functions:
type: test
params:
working_dir: src
timeout_secs: 60
script: |
${PREPARE_SHELL}

Expand All @@ -112,7 +113,7 @@ functions:
fi

AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} MONGODB_URI="${MONGODB_URI}" \
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
NODE_VERSION=${NODE_VERSION} bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
run checks:
- command: shell.exec
type: test
Expand All @@ -124,20 +125,35 @@ functions:
cleanup:
- command: shell.exec
params:
silent: true
script: |
${PREPARE_SHELL}
rm -rf $DRIVERS_TOOLS || true
fix absolute paths:
- command: shell.exec
params:
silent: true
script: |
${PREPARE_SHELL}
for filename in $(find ${DRIVERS_TOOLS} -name \*.json); do
perl -p -i -e "s|ABSOLUTE_PATH_REPLACEMENT_TOKEN|${DRIVERS_TOOLS}|g" $filename
done
windows fix:
- command: shell.exec
params:
silent: true
script: |
${PREPARE_SHELL}
# for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
# cat $i | tr -d '\r' > $i.new
# mv $i.new $i
# done
# Copy client certificate because symlinks do not work on Windows.
cp ${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem
make files executable:
- command: shell.exec
params:
silent: true
script: |
${PREPARE_SHELL}
for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
Expand All @@ -150,7 +166,11 @@ functions:
working_dir: src
script: |
${PREPARE_SHELL}
NODE_LTS_NAME=${NODE_LTS_NAME} bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} \
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
- command: expansions.update
params:
file: src/deps-expansion.yml
run atlas tests:
- command: shell.exec
type: test
Expand Down Expand Up @@ -419,11 +439,14 @@ functions:
pre:
- func: fetch source
- func: prepare resources
- func: windows fix
- func: fix absolute paths
- func: make files executable
post:
- func: upload test results
- func: cleanup
ignore:
- '*.md'
tasks:
- name: test-latest-server
tags:
Expand Down Expand Up @@ -1649,6 +1672,153 @@ buildvariants:
NODE_LTS_NAME: argon
CLIENT_ENCRYPTION: true
tasks: *ref_2
- name: windows-64-vs2013-erbium
display_name: Windows (VS2013) Node Erbium
run_on: windows-64-vs2013-large
expansions:
NODE_LTS_NAME: erbium
MSVS_VERSION: 2013
tasks: &ref_3
- test-4.2-server
- test-4.2-replica_set
- test-4.2-sharded_cluster
- test-4.2-server-unified
- test-4.2-replica_set-unified
- test-4.2-sharded_cluster-unified
- test-4.0-server
- test-4.0-replica_set
- test-4.0-sharded_cluster
- test-4.0-server-unified
- test-4.0-replica_set-unified
- test-4.0-sharded_cluster-unified
- test-3.6-server
- test-3.6-replica_set
- test-3.6-sharded_cluster
- test-3.6-server-unified
- test-3.6-replica_set-unified
- test-3.6-sharded_cluster-unified
- test-3.4-server
- test-3.4-replica_set
- test-3.4-sharded_cluster
- test-3.4-server-unified
- test-3.4-replica_set-unified
- test-3.4-sharded_cluster-unified
- test-3.2-server
- test-3.2-replica_set
- test-3.2-sharded_cluster
- test-3.2-server-unified
- test-3.2-replica_set-unified
- test-3.2-sharded_cluster-unified
- test-3.0-server
- test-3.0-replica_set
- test-3.0-sharded_cluster
- test-3.0-server-unified
- test-3.0-replica_set-unified
- test-3.0-sharded_cluster-unified
- test-2.6-server
- test-2.6-replica_set
- test-2.6-sharded_cluster
- test-2.6-server-unified
- test-2.6-replica_set-unified
- test-2.6-sharded_cluster-unified
- name: windows-64-vs2013-dubnium
display_name: Windows (VS2013) Node Dubnium
run_on: windows-64-vs2013-large
expansions:
NODE_LTS_NAME: dubnium
MSVS_VERSION: 2013
tasks: *ref_3
- name: windows-64-vs2013-carbon
display_name: Windows (VS2013) Node Carbon
run_on: windows-64-vs2013-large
expansions:
NODE_LTS_NAME: carbon
MSVS_VERSION: 2013
tasks: *ref_3
- name: windows-64-vs2013-boron
display_name: Windows (VS2013) Node Boron
run_on: windows-64-vs2013-large
expansions:
NODE_LTS_NAME: boron
MSVS_VERSION: 2013
tasks: *ref_3
- name: windows-64-vs2013-argon
display_name: Windows (VS2013) Node Argon
run_on: windows-64-vs2013-large
expansions:
NODE_LTS_NAME: argon
MSVS_VERSION: 2013
tasks: *ref_3
- name: windows-64-vs2015-erbium
display_name: Windows (VS2015) Node Erbium
run_on: windows-64-vs2015-large
expansions:
NODE_LTS_NAME: erbium
MSVS_VERSION: 2015
tasks: *ref_3
- name: windows-64-vs2015-dubnium
display_name: Windows (VS2015) Node Dubnium
run_on: windows-64-vs2015-large
expansions:
NODE_LTS_NAME: dubnium
MSVS_VERSION: 2015
tasks: *ref_3
- name: windows-64-vs2015-carbon
display_name: Windows (VS2015) Node Carbon
run_on: windows-64-vs2015-large
expansions:
NODE_LTS_NAME: carbon
MSVS_VERSION: 2015
tasks: *ref_3
- name: windows-64-vs2015-boron
display_name: Windows (VS2015) Node Boron
run_on: windows-64-vs2015-large
expansions:
NODE_LTS_NAME: boron
MSVS_VERSION: 2015
tasks: *ref_3
- name: windows-64-vs2015-argon
display_name: Windows (VS2015) Node Argon
run_on: windows-64-vs2015-large
expansions:
NODE_LTS_NAME: argon
MSVS_VERSION: 2015
tasks: *ref_3
- name: windows-64-vs2017-erbium
display_name: Windows (VS2017) Node Erbium
run_on: windows-64-vs2017-large
expansions:
NODE_LTS_NAME: erbium
MSVS_VERSION: 2017
tasks: *ref_3
- name: windows-64-vs2017-dubnium
display_name: Windows (VS2017) Node Dubnium
run_on: windows-64-vs2017-large
expansions:
NODE_LTS_NAME: dubnium
MSVS_VERSION: 2017
tasks: *ref_3
- name: windows-64-vs2017-carbon
display_name: Windows (VS2017) Node Carbon
run_on: windows-64-vs2017-large
expansions:
NODE_LTS_NAME: carbon
MSVS_VERSION: 2017
tasks: *ref_3
- name: windows-64-vs2017-boron
display_name: Windows (VS2017) Node Boron
run_on: windows-64-vs2017-large
expansions:
NODE_LTS_NAME: boron
MSVS_VERSION: 2017
tasks: *ref_3
- name: windows-64-vs2017-argon
display_name: Windows (VS2017) Node Argon
run_on: windows-64-vs2017-large
expansions:
NODE_LTS_NAME: argon
MSVS_VERSION: 2017
tasks: *ref_3
- name: lint
display_name: lint
run_on: rhel70
Expand Down
Loading