From a09b634e1bc56c37056f8c949c6ab18116aec3c4 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 9 Aug 2017 09:18:41 -0400 Subject: [PATCH 1/8] Separate tests and installer creation on AppVeyor --- appveyor.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6a8d3ac91..4ed91e643 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,9 +19,13 @@ environment: global: ATOM_DEV_RESOURCE_PATH: c:\projects\atom TEST_JUNIT_XML_ROOT: c:\projects\junit-test-results + NODE_VERSION: 6.9.4 matrix: - - NODE_VERSION: 6.9.4 + - TASK: test + BUILD_ARG: + - TASK: installer + BUILD_ARG: --create-windows-installer matrix: fast_finish: true @@ -34,14 +38,16 @@ install: build_script: - CD %APPVEYOR_BUILD_FOLDER% - - script\build.cmd --code-sign --compress-artifacts + - script\build.cmd --code-sign --compress-artifacts %BUILD_ARG% test_script: - - script\lint.cmd - - script\test.cmd - -after_test: - - IF [%APPVEYOR_REPO_BRANCH:~-9%]==[-releases] ( script\create-installer.cmd ) + - | + IF [%TASK]==[test] ( + script\lint.cmd + script\test.cmd + ) ELSE ( + ECHO + ) deploy: off artifacts: From 1233bbccb00be78387a1cbcfe412cc84ba8a967b Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 9 Aug 2017 09:20:52 -0400 Subject: [PATCH 2/8] Missing % --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4ed91e643..ae5f97d7b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,7 +42,7 @@ build_script: test_script: - | - IF [%TASK]==[test] ( + IF [%TASK%]==[test] ( script\lint.cmd script\test.cmd ) ELSE ( From 2d186820cf05ea74f200eebea056ccc9be35d0b0 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 9 Aug 2017 09:28:37 -0400 Subject: [PATCH 3/8] The matrix will be slightly prettier this way <_< >_> --- appveyor.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ae5f97d7b..c366f7afa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,9 +23,7 @@ environment: matrix: - TASK: test - BUILD_ARG: - TASK: installer - BUILD_ARG: --create-windows-installer matrix: fast_finish: true @@ -38,6 +36,12 @@ install: build_script: - CD %APPVEYOR_BUILD_FOLDER% + - | + IF [%TASK%]==[installer] ( + SET BUILD_ARG=--create-windows-installer + ) ELSE ( + SET BUILD_ARG= + ) - script\build.cmd --code-sign --compress-artifacts %BUILD_ARG% test_script: From 3a9872e8091d5dfc9cb832feee10628b939395c8 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 9 Aug 2017 10:02:24 -0400 Subject: [PATCH 4/8] YAML syntax tweaks --- appveyor.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c366f7afa..7bf8be73e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,8 +36,7 @@ install: build_script: - CD %APPVEYOR_BUILD_FOLDER% - - | - IF [%TASK%]==[installer] ( + - IF [%TASK%]==[installer] ( SET BUILD_ARG=--create-windows-installer ) ELSE ( SET BUILD_ARG= @@ -45,12 +44,11 @@ build_script: - script\build.cmd --code-sign --compress-artifacts %BUILD_ARG% test_script: - - | - IF [%TASK%]==[test] ( - script\lint.cmd + - IF [%TASK%]==[test] ( + script\lint.cmd && script\test.cmd ) ELSE ( - ECHO + ECHO Skipping tests ) deploy: off From 4acd52a978011d8d84df8fa25e0bb533da6a19b4 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 9 Aug 2017 12:18:07 -0400 Subject: [PATCH 5/8] Skip installer build on non-release branches --- appveyor.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7bf8be73e..f0880c10b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,9 +37,14 @@ install: build_script: - CD %APPVEYOR_BUILD_FOLDER% - IF [%TASK%]==[installer] ( - SET BUILD_ARG=--create-windows-installer + IF [%APPVEYOR_REPO_BRANCH:~-9%]==[-releases] ( + SET BUILD_ARG=--create-windows-installer + ) ELSE ( + ECHO "Skipping installer build on non-release branch" + ) ) ELSE ( - SET BUILD_ARG= + SET BUILD_ARG= && + ECHO "Skipping installer build on non-installer build matrix row" ) - script\build.cmd --code-sign --compress-artifacts %BUILD_ARG% From 0db8c9c3ece5932dab5ca9e533d3a474905d5df2 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 9 Aug 2017 13:01:40 -0400 Subject: [PATCH 6/8] Don't build on non-release installer rows either --- appveyor.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f0880c10b..0f566f936 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,15 +38,20 @@ build_script: - CD %APPVEYOR_BUILD_FOLDER% - IF [%TASK%]==[installer] ( IF [%APPVEYOR_REPO_BRANCH:~-9%]==[-releases] ( - SET BUILD_ARG=--create-windows-installer + SET BUILD_ARG=--create-windows-installer && + SET BUILD=yes ) ELSE ( - ECHO "Skipping installer build on non-release branch" + ECHO "Skipping installer and Atom build on non-release branch" && + SET BUILD=no ) ) ELSE ( SET BUILD_ARG= && + SET BUILD=yes && ECHO "Skipping installer build on non-installer build matrix row" ) - - script\build.cmd --code-sign --compress-artifacts %BUILD_ARG% + - IF [%BUILD]==[yes] ( + script\build.cmd --code-sign --compress-artifacts %BUILD_ARG% + ) test_script: - IF [%TASK%]==[test] ( From ee12c1c7d2c032da13048852cdd6654460a9591f Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 9 Aug 2017 13:10:26 -0400 Subject: [PATCH 7/8] Why does my brain always edit out the second % --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0f566f936..8df08bc01 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -49,7 +49,7 @@ build_script: SET BUILD=yes && ECHO "Skipping installer build on non-installer build matrix row" ) - - IF [%BUILD]==[yes] ( + - IF [%BUILD%]==[yes] ( script\build.cmd --code-sign --compress-artifacts %BUILD_ARG% ) From ee0df014bc95167282f1e3317ffc5e138bffac77 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 9 Aug 2017 13:15:34 -0400 Subject: [PATCH 8/8] Less variable magic --- appveyor.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8df08bc01..ee95a5d5e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,19 +38,13 @@ build_script: - CD %APPVEYOR_BUILD_FOLDER% - IF [%TASK%]==[installer] ( IF [%APPVEYOR_REPO_BRANCH:~-9%]==[-releases] ( - SET BUILD_ARG=--create-windows-installer && - SET BUILD=yes + script\build.cmd --code-sign --compress-artifacts --create-windows-installer ) ELSE ( - ECHO "Skipping installer and Atom build on non-release branch" && - SET BUILD=no + ECHO Skipping installer and Atom build on non-release branch ) ) ELSE ( - SET BUILD_ARG= && - SET BUILD=yes && - ECHO "Skipping installer build on non-installer build matrix row" - ) - - IF [%BUILD%]==[yes] ( - script\build.cmd --code-sign --compress-artifacts %BUILD_ARG% + ECHO Skipping installer build on non-installer build matrix row && + script\build.cmd --code-sign --compress-artifacts ) test_script: @@ -58,7 +52,7 @@ test_script: script\lint.cmd && script\test.cmd ) ELSE ( - ECHO Skipping tests + ECHO Skipping tests on installer build matrix row ) deploy: off