Skip to content

Commit 3f2f987

Browse files
authored
chore(ci): test on windows (#2634)
NODE-1458
1 parent b365c50 commit 3f2f987

18 files changed

+438
-125
lines changed

.evergreen/config.yml

Lines changed: 181 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ functions:
1111
- command: git.get_project
1212
params:
1313
directory: src
14-
- command: git.apply_patch
1514
- command: shell.exec
1615
params:
1716
working_dir: src
@@ -29,6 +28,14 @@ functions:
2928
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
3029
export UPLOAD_BUCKET="${project}"
3130
31+
# fix paths on windows
32+
if [ "Windows_NT" = "$OS" ]; then
33+
export DRIVERS_TOOLS=$(cygpath -m -a $DRIVERS_TOOLS)
34+
export MONGO_ORCHESTRATION_HOME=$(cygpath -m -a $MONGO_ORCHESTRATION_HOME)
35+
export MONGODB_BINARIES=$(cygpath -m -a $MONGODB_BINARIES)
36+
export PROJECT_DIRECTORY=$(cygpath -m -a $PROJECT_DIRECTORY)
37+
fi
38+
3239
cat <<EOT > expansion.yml
3340
CURRENT_VERSION: "$CURRENT_VERSION"
3441
DRIVERS_TOOLS: "$DRIVERS_TOOLS"
@@ -60,14 +67,7 @@ functions:
6067
script: >
6168
${PREPARE_SHELL}
6269
63-
rm -rf $DRIVERS_TOOLS
64-
65-
if [ "${project}" = "drivers-tools" ]; then
66-
# If this was a patch build, doing a fresh clone would not actually test the patch
67-
cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS
68-
else
69-
git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
70-
fi
70+
git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
7171
7272
echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" >
7373
$MONGO_ORCHESTRATION_HOME/orchestration.config
@@ -101,6 +101,7 @@ functions:
101101
type: test
102102
params:
103103
working_dir: src
104+
timeout_secs: 60
104105
script: |
105106
${PREPARE_SHELL}
106107
@@ -112,7 +113,7 @@ functions:
112113
fi
113114
114115
AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} MONGODB_URI="${MONGODB_URI}" \
115-
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
116+
NODE_VERSION=${NODE_VERSION} bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
116117
run checks:
117118
- command: shell.exec
118119
type: test
@@ -124,20 +125,35 @@ functions:
124125
cleanup:
125126
- command: shell.exec
126127
params:
128+
silent: true
127129
script: |
128130
${PREPARE_SHELL}
129131
rm -rf $DRIVERS_TOOLS || true
130132
fix absolute paths:
131133
- command: shell.exec
132134
params:
135+
silent: true
133136
script: |
134137
${PREPARE_SHELL}
135138
for filename in $(find ${DRIVERS_TOOLS} -name \*.json); do
136139
perl -p -i -e "s|ABSOLUTE_PATH_REPLACEMENT_TOKEN|${DRIVERS_TOOLS}|g" $filename
137140
done
141+
windows fix:
142+
- command: shell.exec
143+
params:
144+
silent: true
145+
script: |
146+
${PREPARE_SHELL}
147+
# for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
148+
# cat $i | tr -d '\r' > $i.new
149+
# mv $i.new $i
150+
# done
151+
# Copy client certificate because symlinks do not work on Windows.
152+
cp ${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem
138153
make files executable:
139154
- command: shell.exec
140155
params:
156+
silent: true
141157
script: |
142158
${PREPARE_SHELL}
143159
for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
@@ -150,7 +166,11 @@ functions:
150166
working_dir: src
151167
script: |
152168
${PREPARE_SHELL}
153-
NODE_LTS_NAME=${NODE_LTS_NAME} bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
169+
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} \
170+
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
171+
- command: expansions.update
172+
params:
173+
file: src/deps-expansion.yml
154174
run atlas tests:
155175
- command: shell.exec
156176
type: test
@@ -419,11 +439,14 @@ functions:
419439
pre:
420440
- func: fetch source
421441
- func: prepare resources
442+
- func: windows fix
422443
- func: fix absolute paths
423444
- func: make files executable
424445
post:
425446
- func: upload test results
426447
- func: cleanup
448+
ignore:
449+
- '*.md'
427450
tasks:
428451
- name: test-latest-server
429452
tags:
@@ -1649,6 +1672,153 @@ buildvariants:
16491672
NODE_LTS_NAME: argon
16501673
CLIENT_ENCRYPTION: true
16511674
tasks: *ref_2
1675+
- name: windows-64-vs2013-erbium
1676+
display_name: Windows (VS2013) Node Erbium
1677+
run_on: windows-64-vs2013-large
1678+
expansions:
1679+
NODE_LTS_NAME: erbium
1680+
MSVS_VERSION: 2013
1681+
tasks: &ref_3
1682+
- test-4.2-server
1683+
- test-4.2-replica_set
1684+
- test-4.2-sharded_cluster
1685+
- test-4.2-server-unified
1686+
- test-4.2-replica_set-unified
1687+
- test-4.2-sharded_cluster-unified
1688+
- test-4.0-server
1689+
- test-4.0-replica_set
1690+
- test-4.0-sharded_cluster
1691+
- test-4.0-server-unified
1692+
- test-4.0-replica_set-unified
1693+
- test-4.0-sharded_cluster-unified
1694+
- test-3.6-server
1695+
- test-3.6-replica_set
1696+
- test-3.6-sharded_cluster
1697+
- test-3.6-server-unified
1698+
- test-3.6-replica_set-unified
1699+
- test-3.6-sharded_cluster-unified
1700+
- test-3.4-server
1701+
- test-3.4-replica_set
1702+
- test-3.4-sharded_cluster
1703+
- test-3.4-server-unified
1704+
- test-3.4-replica_set-unified
1705+
- test-3.4-sharded_cluster-unified
1706+
- test-3.2-server
1707+
- test-3.2-replica_set
1708+
- test-3.2-sharded_cluster
1709+
- test-3.2-server-unified
1710+
- test-3.2-replica_set-unified
1711+
- test-3.2-sharded_cluster-unified
1712+
- test-3.0-server
1713+
- test-3.0-replica_set
1714+
- test-3.0-sharded_cluster
1715+
- test-3.0-server-unified
1716+
- test-3.0-replica_set-unified
1717+
- test-3.0-sharded_cluster-unified
1718+
- test-2.6-server
1719+
- test-2.6-replica_set
1720+
- test-2.6-sharded_cluster
1721+
- test-2.6-server-unified
1722+
- test-2.6-replica_set-unified
1723+
- test-2.6-sharded_cluster-unified
1724+
- name: windows-64-vs2013-dubnium
1725+
display_name: Windows (VS2013) Node Dubnium
1726+
run_on: windows-64-vs2013-large
1727+
expansions:
1728+
NODE_LTS_NAME: dubnium
1729+
MSVS_VERSION: 2013
1730+
tasks: *ref_3
1731+
- name: windows-64-vs2013-carbon
1732+
display_name: Windows (VS2013) Node Carbon
1733+
run_on: windows-64-vs2013-large
1734+
expansions:
1735+
NODE_LTS_NAME: carbon
1736+
MSVS_VERSION: 2013
1737+
tasks: *ref_3
1738+
- name: windows-64-vs2013-boron
1739+
display_name: Windows (VS2013) Node Boron
1740+
run_on: windows-64-vs2013-large
1741+
expansions:
1742+
NODE_LTS_NAME: boron
1743+
MSVS_VERSION: 2013
1744+
tasks: *ref_3
1745+
- name: windows-64-vs2013-argon
1746+
display_name: Windows (VS2013) Node Argon
1747+
run_on: windows-64-vs2013-large
1748+
expansions:
1749+
NODE_LTS_NAME: argon
1750+
MSVS_VERSION: 2013
1751+
tasks: *ref_3
1752+
- name: windows-64-vs2015-erbium
1753+
display_name: Windows (VS2015) Node Erbium
1754+
run_on: windows-64-vs2015-large
1755+
expansions:
1756+
NODE_LTS_NAME: erbium
1757+
MSVS_VERSION: 2015
1758+
tasks: *ref_3
1759+
- name: windows-64-vs2015-dubnium
1760+
display_name: Windows (VS2015) Node Dubnium
1761+
run_on: windows-64-vs2015-large
1762+
expansions:
1763+
NODE_LTS_NAME: dubnium
1764+
MSVS_VERSION: 2015
1765+
tasks: *ref_3
1766+
- name: windows-64-vs2015-carbon
1767+
display_name: Windows (VS2015) Node Carbon
1768+
run_on: windows-64-vs2015-large
1769+
expansions:
1770+
NODE_LTS_NAME: carbon
1771+
MSVS_VERSION: 2015
1772+
tasks: *ref_3
1773+
- name: windows-64-vs2015-boron
1774+
display_name: Windows (VS2015) Node Boron
1775+
run_on: windows-64-vs2015-large
1776+
expansions:
1777+
NODE_LTS_NAME: boron
1778+
MSVS_VERSION: 2015
1779+
tasks: *ref_3
1780+
- name: windows-64-vs2015-argon
1781+
display_name: Windows (VS2015) Node Argon
1782+
run_on: windows-64-vs2015-large
1783+
expansions:
1784+
NODE_LTS_NAME: argon
1785+
MSVS_VERSION: 2015
1786+
tasks: *ref_3
1787+
- name: windows-64-vs2017-erbium
1788+
display_name: Windows (VS2017) Node Erbium
1789+
run_on: windows-64-vs2017-large
1790+
expansions:
1791+
NODE_LTS_NAME: erbium
1792+
MSVS_VERSION: 2017
1793+
tasks: *ref_3
1794+
- name: windows-64-vs2017-dubnium
1795+
display_name: Windows (VS2017) Node Dubnium
1796+
run_on: windows-64-vs2017-large
1797+
expansions:
1798+
NODE_LTS_NAME: dubnium
1799+
MSVS_VERSION: 2017
1800+
tasks: *ref_3
1801+
- name: windows-64-vs2017-carbon
1802+
display_name: Windows (VS2017) Node Carbon
1803+
run_on: windows-64-vs2017-large
1804+
expansions:
1805+
NODE_LTS_NAME: carbon
1806+
MSVS_VERSION: 2017
1807+
tasks: *ref_3
1808+
- name: windows-64-vs2017-boron
1809+
display_name: Windows (VS2017) Node Boron
1810+
run_on: windows-64-vs2017-large
1811+
expansions:
1812+
NODE_LTS_NAME: boron
1813+
MSVS_VERSION: 2017
1814+
tasks: *ref_3
1815+
- name: windows-64-vs2017-argon
1816+
display_name: Windows (VS2017) Node Argon
1817+
run_on: windows-64-vs2017-large
1818+
expansions:
1819+
NODE_LTS_NAME: argon
1820+
MSVS_VERSION: 2017
1821+
tasks: *ref_3
16521822
- name: lint
16531823
display_name: lint
16541824
run_on: rhel70

0 commit comments

Comments
 (0)