Skip to content

Commit 0167daf

Browse files
author
Gennady Pospelov
committed
Load artifacts on failed build
1 parent e6d2be3 commit 0167daf

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

.github/workflows/linux-build.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: linux-build
1+
name: Linux
22

33
on:
44
push:
@@ -60,15 +60,9 @@ jobs:
6060
ccache -s
6161
ctest -j4
6262
63-
# - name: Functional test output
64-
# if: failure()
65-
# run: |
66-
# cd $GITHUB_WORKSPACE/build
67-
# cat Testing/Temporary/LastTest.log
68-
6963
- name: upload test logs
7064
uses: actions/upload-artifact@v2
7165
if: failure()
7266
with:
7367
name: LastTest.log
74-
path: /home/runner/work/qt-mvvm/qt-mvvm/build/Testing/Temporary/LastTest.log
68+
path: ./build/Testing/Temporary/LastTest.log

.github/workflows/macos-build.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: macos-build
1+
name: MacOS
22

33
on:
44
push:
@@ -71,9 +71,16 @@ jobs:
7171
ccache -s
7272
ctest -j4
7373
74-
- name: Functional test output
74+
- name: upload test logs
75+
uses: actions/upload-artifact@v2
7576
if: failure()
76-
run: |
77-
cd $GITHUB_WORKSPACE/build
78-
cat Testing/Temporary/LastTest.log
77+
with:
78+
name: LastTest.log
79+
path: ./build/Testing/Temporary/LastTest.log
80+
81+
# - name: Functional test output
82+
# if: failure()
83+
# run: |
84+
# cd $GITHUB_WORKSPACE/build
85+
# cat Testing/Temporary/LastTest.log
7986

.github/workflows/windows-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: windows-build
1+
name: Windows
22

33
env:
44
CCACHE_VERSION: 3.7.7

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Model View ViewModel framework for large C++ Qt applications
22

3-
![aaa](https://github.com/gpospelov/qt-mvvm/workflows/linux-build/badge.svg?branch=ci-test)
4-
5-
[![Linux](https://github.com/gpospelov/qt-mvvm/workflows/linux-build/badge.svg?branch=ci-test)](https://github.com/gpospelov/qt-mvvm/actions?query=workflow%3Alinux-build)
3+
[![Linux](https://github.com/gpospelov/qt-mvvm/workflows/linux-build/badge.svg?branch=ci-test)](https://github.com/gpospelov/qt-mvvm/actions?query=workflow%3ALinux)
4+
[![Windows](https://github.com/gpospelov/qt-mvvm/workflows/lwindows-build/badge.svg?branch=ci-test)](https://github.com/gpospelov/qt-mvvm/actions?query=workflow%3AWindows)
5+
[![Mac OS](https://github.com/gpospelov/qt-mvvm/workflows/macos-build/badge.svg?branch=ci-test)](https://github.com/gpospelov/qt-mvvm/actions?query=workflow%3AMacOS)
66

77

88
[![Travis-CI Build Status](https://travis-ci.org/gpospelov/qt-mvvm.svg?branch=master)](https://travis-ci.org/gpospelov/qt-mvvm)

source/libmvvm_model/mvvm/serialization/jsondocument.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ void JsonDocument::load(const std::string& file_name)
7575

7676
ModelView::JsonModelConverter converter;
7777
int index(0);
78-
for (auto model : p_impl->models)
79-
converter.json_to_model(array.at(index++).toObject(), *model);
78+
for (auto model : p_impl->models) {
79+
converter.json_to_model(array.at(index).toObject(), *model);
80+
++index;
81+
}
8082

8183
file.close();
8284
}

source/libmvvm_model/mvvm/serialization/jsonmodelconverter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ void JsonModelConverter::json_to_model(const QJsonObject& json, SessionModel& mo
6363
throw std::runtime_error("JsonModel::json_to_model() -> Error. Invalid json object.");
6464

6565
if (json[modelKey].toString() != QString::fromStdString(model.modelType()))
66-
throw std::runtime_error("JsonModel::json_to_model() -> Unexpected model type.");
66+
throw std::runtime_error("JsonModel::json_to_model() -> Unexpected model type '"
67+
+ model.modelType() + "', json key '"
68+
+ json[modelKey].toString().toStdString() + "'");
6769

6870
auto converter = std::make_unique<JsonItemConverter>(model.factory());
6971

0 commit comments

Comments
 (0)