appveyor: use on_finish section to upload artifacts
authorVincent Fu <vincent.fu@wdc.com>
Tue, 26 May 2020 17:22:38 +0000 (13:22 -0400)
committerVincent Fu <vincent.fu@wdc.com>
Thu, 28 May 2020 17:05:33 +0000 (13:05 -0400)
We cannot rely on the artifacts section to upload test artifacts because
when a test failure occurs, the entire build process stops and the
artifacts are not uploaded. Use the on_finish section instead to upload
test artifacts.

Signed-off-by: Vincent Fu <vincent.fu@wdc.com>
.appveyor.yml

index e2351be7036898aa91e25311dd0e5bc8cc4c36fb..70c337f8465cc3a10e9ac0c085d33a234a4ed282 100644 (file)
@@ -26,10 +26,10 @@ after_build:
 test_script:
   - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && file.exe fio.exe && make.exe test'
   - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && [ -f fio.exe ] && python.exe t/run-fio-tests.py --artifact-root test-artifacts --debug'
-  - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && [ -d test-artifacts ] && 7z a -t7z test-artifacts.7z test-artifacts -xr!foo.0.0 -xr!latency.?.0 -xr!fio_jsonplus_clat2csv.test'
 
 artifacts:
   - path: os\windows\*.msi
     name: msi
-  - path: test-artifacts.7z
-    name: test-artifacts
+
+on_finish:
+  - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && [ -d test-artifacts ] && 7z a -t7z test-artifacts.7z test-artifacts -xr!foo.0.0 -xr!latency.?.0 -xr!fio_jsonplus_clat2csv.test && appveyor PushArtifact test-artifacts.7z'