@@ -243,88 +243,93 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
243243def windowsTesting () {
244244 node(' win2016' ) {
245245 stage(' Windows Test' ) {
246- echo " Windows Test: Checkout scm"
247- checkout scm
246+ def ws_path = " workspace/${ env.JOB_NAME} " . replace(' ' , ' _' )
247+ ws(ws_path) {
248+ try {
249+ echo " Windows Test: Checkout scm"
250+ checkout scm
248251
249- try {
250- echo " Windows Test: Run Indy pool"
251- bat " docker -H $INDY_SDK_SERVER_IP build --build-arg pool_ip=$INDY_SDK_SERVER_IP -f ci/indy-pool.dockerfile -t indy_pool ci"
252- bat " docker -H $INDY_SDK_SERVER_IP run -d --network host --name indy_pool -p 9701-9708:9701-9708 indy_pool"
253252
254- setupRust()
253+ echo " Windows Test: Run Indy pool"
254+ bat " docker -H $INDY_SDK_SERVER_IP build --build-arg pool_ip=$INDY_SDK_SERVER_IP -f ci/indy-pool.dockerfile -t indy_pool ci"
255+ bat " docker -H $INDY_SDK_SERVER_IP run -d --network host --name indy_pool -p 9701-9708:9701-9708 indy_pool"
255256
256- dir(' libindy' ) {
257- echo " Windows Test: Download prebuilt dependencies"
258- bat ' wget -O prebuilt.zip "https://repo.sovrin.org/windows/libindy/deps/indy-sdk-deps.zip"'
259- bat ' unzip prebuilt.zip -d prebuilt'
260-
261- echo " Windows Libindy Test: Build"
262- withEnv([
263- " INDY_PREBUILT_DEPS_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
264- " INDY_CRYPTO_PREBUILT_DEPS_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
265- " MILAGRO_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
266- " LIBZMQ_PREFIX=$WORKSPACE \\ libindy\\ prebuilt" ,
267- " SODIUM_LIB_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
268- " OPENSSL_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
269- " PATH=$WORKSPACE \\ libindy\\ prebuilt\\ lib;$PATH " ,
270- " RUST_BACKTRACE=1"
271- ]) {
272- bat " cargo test --release --no-run"
273-
274- echo " Windows Libindy Test: Run tests"
257+ setupRust()
258+
259+ dir(' libindy' ) {
260+ echo " Windows Test: Download prebuilt dependencies"
261+ bat ' wget -O prebuilt.zip "https://repo.sovrin.org/windows/libindy/deps/indy-sdk-deps.zip"'
262+ bat ' unzip prebuilt.zip -d prebuilt'
263+
264+ echo " Windows Libindy Test: Build"
275265 withEnv([
276- " RUST_TEST_THREADS=1" ,
277- " RUST_LOG=trace" ,
278- " TEST_POOL_IP=$INDY_SDK_SERVER_IP "
266+ " INDY_PREBUILT_DEPS_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
267+ " INDY_CRYPTO_PREBUILT_DEPS_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
268+ " MILAGRO_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
269+ " LIBZMQ_PREFIX=$WORKSPACE \\ libindy\\ prebuilt" ,
270+ " SODIUM_LIB_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
271+ " OPENSSL_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
272+ " PATH=$WORKSPACE \\ libindy\\ prebuilt\\ lib;$PATH " ,
273+ " RUST_BACKTRACE=1"
279274 ]) {
280- bat " cargo test --release"
275+ bat " cargo test --release --no-run"
276+
277+ echo " Windows Libindy Test: Run tests"
278+ withEnv([
279+ " RUST_TEST_THREADS=1" ,
280+ " RUST_LOG=trace" ,
281+ " TEST_POOL_IP=$INDY_SDK_SERVER_IP "
282+ ]) {
283+ bat " cargo test --release"
284+ }
281285 }
286+ stash includes : ' target/release/*.dll' , name : ' LibindyWindowsBuildResult'
282287 }
283- stash includes : ' target/release/*.dll' , name : ' LibindyWindowsBuildResult'
284- }
285-
286- dir(' cli' ) {
287- bat " sed -i -e \" s/10\\ .0\\ .0\\ .2/${ INDY_SDK_SERVER_IP} /g\" docker_pool_transactions_genesis"
288288
289- bat " copy $W ORKSPACE \\ libindy \\ target \\ release \\ indy.dll $W ORKSPACE \\ libindy \\ prebuilt \\ lib "
290- bat " copy $W ORKSPACE \\ libindy \\ target \\ release \\ indy.lib $W ORKSPACE \\ libindy \\ prebuilt \\ lib "
289+ dir( ' cli ' ) {
290+ bat " sed -i -e \" s/10 \\ .0 \\ .0 \\ .2/ ${ INDY_SDK_SERVER_IP } /g \" docker_pool_transactions_genesis "
291291
292- echo " Windows Indy Cli Test: Build"
293- withEnv([
294- " INDY_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
295- " RUST_BACKTRACE=1"
296- ]) {
297- bat " cargo build --release"
292+ bat " copy $WORKSPACE \\ libindy\\ target\\ release\\ indy.dll $WORKSPACE \\ libindy\\ prebuilt\\ lib"
293+ bat " copy $WORKSPACE \\ libindy\\ target\\ release\\ indy.lib $WORKSPACE \\ libindy\\ prebuilt\\ lib"
298294
299- echo " Windows Indy Cli Test: Build tests"
300- bat " cargo test --release --no-run"
301-
302- echo " Windows Indy Cli Test: Run tests"
295+ echo " Windows Indy Cli Test: Build"
303296 withEnv([
304- " RUST_TEST_THREADS=1" ,
305- " RUST_LOG=trace" ,
306- " TEST_POOL_IP=$INDY_SDK_SERVER_IP "
297+ " INDY_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
298+ " RUST_BACKTRACE=1"
307299 ]) {
308- bat " cargo test --release"
300+ bat " cargo build --release"
301+
302+ echo " Windows Indy Cli Test: Build tests"
303+ bat " cargo test --release --no-run"
304+
305+ echo " Windows Indy Cli Test: Run tests"
306+ withEnv([
307+ " RUST_TEST_THREADS=1" ,
308+ " RUST_LOG=trace" ,
309+ " TEST_POOL_IP=$INDY_SDK_SERVER_IP "
310+ ]) {
311+ bat " cargo test --release"
312+ }
309313 }
310- }
311314
312- stash includes : ' target/release/indy-cli.exe,target/release/*.dll' , name : ' IndyCliWindowsBuildResult'
313- }
315+ stash includes : ' target/release/indy-cli.exe,target/release/*.dll' , name : ' IndyCliWindowsBuildResult'
316+ }
314317
315- // TODO wrappers testing
318+ // TODO wrappers testing
316319
317- } finally {
318- try {
319- bat " docker -H $INDY_SDK_SERVER_IP stop indy_pool"
320- } catch (ignore) {
321- }
322- try {
323- bat " docker -H $INDY_SDK_SERVER_IP rm indy_pool"
324- } catch (ignore) {
320+ } finally {
321+ try {
322+ bat " docker -H $INDY_SDK_SERVER_IP stop indy_pool"
323+ } catch (ignore) {
324+ }
325+ try {
326+ bat " docker -H $INDY_SDK_SERVER_IP rm indy_pool"
327+ } catch (ignore) {
328+ }
329+ cleanWs()
325330 }
326- step([$class : ' WsCleanup' ])
327331 }
332+ cleanWs()
328333 }
329334 }
330335}
@@ -642,5 +647,5 @@ def downloadPackagingUtils() {
642647}
643648
644649def setupRust () {
645- sh " rustup default 1.21 .0"
650+ sh " rustup default 1.25 .0"
646651}
0 commit comments