Skip to content

Commit

Permalink
[Action] Fix for failure case
Browse files Browse the repository at this point in the history
Even if the step failed, the `continue-on-error` was used to continue the next step.
But `continue-on-error` marks success even if the step fails.
So, let's use `always()` for subsquent steps.

Signed-off-by: Gichan Jang <[email protected]>
  • Loading branch information
gichan-jang committed Nov 15, 2024
1 parent 1dbbfcb commit 6694b3a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 22 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/update_gbs_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,19 @@ jobs:
- name: build and tests on GBS
id: gbs-build
continue-on-error: true
run: gbs build ${{ matrix.gbs_build_option }} --define "_skip_debug_rpm 1" -A ${{ matrix.gbs_build_arch }}

- name: report GBS build and test result
id: gbs-result
run: echo "${{ matrix.gbs_build_arch }}=${{ steps.gbs-build.outcome }}" >> $GITHUB_OUTPUT

- name: save gbs cache
uses: actions/cache/save@v4
if: always() && github.ref == 'refs/heads/main'
with:
path: ~/GBS-ROOT/local/cache
key: gbs-cache-${{ matrix.gbs_build_arch }}-${{ steps.get-date.outputs.date }}

- name: report GBS build and test result
id: gbs-result
run: echo "${{ matrix.gbs_build_arch }}=${{ steps.gbs-build.outcome }}" >> $GITHUB_OUTPUT

- name: Release daily build result to release.nnstreamer.com
if: steps.gbs-build.outcome == 'success'
uses: ./.github/actions/s3_upload
Expand All @@ -78,7 +77,7 @@ jobs:
uses: ./.github/actions/s3_upload
with:
source: ~/GBS-ROOT/local/repos/tizen/${{ matrix.gbs_build_arch }}/logs/*/*/log.txt
dest: logs/tizen_gbs_${{ matrix.gbs_build_arch }}_log.txt
dest: logs/nnstreamer_tizen_gbs_${{ matrix.gbs_build_arch }}_log.txt
s3_id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
s3_key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}

Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/update_pbuilder_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,10 @@ jobs:
- name: run pdebuild
id: pdebuild
continue-on-error: true
run: |
mkdir -p ~/daily_build/ubuntu
pdebuild --logfile ~/daily_build/pdebuild_log.txt --buildresult ~/daily_build/ubuntu --architecture ${{ matrix.arch }} -- --distribution ${{ matrix.distroname }}
- name: generate badge
run: |
pip install pybadges setuptools
if [ '${{ steps.pdebuild.outcome }}' == 'success' ]; then
python3 -m pybadges --left-text=test --right-text=success --right-color=green > ~/daily_build/pdebuild_result.svg
else
python3 -m pybadges --left-text=test --right-text=failure --right-color=red > ~/daily_build/pdebuild_result.svg
fi
- name: save pbuilder cache
uses: actions/cache/save@v4
if: always() && github.ref == 'refs/heads/main'
Expand All @@ -83,6 +73,15 @@ jobs:
/var/cache/pbuilder/base.tgz
key: pbuilder-cache-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles('**/debian/control') }}-${{ steps.get-date.outputs.date }}

- name: generate badge
run: |
pip install pybadges setuptools
if [ '${{ steps.pdebuild.outcome }}' == 'success' ]; then
python3 -m pybadges --left-text=test --right-text=success --right-color=green > ~/daily_build/pdebuild_result.svg
else
python3 -m pybadges --left-text=test --right-text=failure --right-color=red > ~/daily_build/pdebuild_result.svg
fi
- name: Release daily build result to release.nnstreamer.com
if: steps.pdebuild.outcome == 'success'
uses: ./.github/actions/s3_upload
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
key: yocto-cache-yocto-5.0.3

- name: acquire some disk space
if: steps.rebuild.outputs.rebuild == '1'
if: false # Enable this step when you need to make new cache.
run: |
df -h
sudo apt-get update --fix-missing \
Expand All @@ -64,7 +64,6 @@ jobs:
- name: build
if: steps.rebuild.outputs.rebuild == '1'
id: yocto-build
continue-on-error: true
run: |
echo "::group::apt-get install"
sudo apt-get update
Expand All @@ -76,7 +75,14 @@ jobs:
echo "::group::Prepare poky and meta-neural-network"
git clone git://git.yoctoproject.org/poky -b yocto-5.0.3 && cd poky
git clone https://github.com/nnstreamer/meta-neural-network -b scarthgap
# WORKDIR="${{ github.workspace }}"
# echo 'SRC_URI = "git://${{ github.workspace }}/;protocol=file;usehead=1;nobranch=1"' >> meta-neural-network/recipes-nnstreamer/nnstreamer/nnstreamer_2.4.2.bbappend
# echo 'S = "${WORKDIR}/git"' >> meta-neural-network/recipes-nnstreamer/nnstreamer/nnstreamer_2.4.2.bbappend
# cat meta-neural-network/recipes-nnstreamer/nnstreamer/nnstreamer_2.4.2.bbappend
echo 'SRC_URI = "git://${{ github.workspace }}/;protocol=file;usehead=1;nobranch=1"' >> meta-neural-network/recipes-nnstreamer/nnstreamer/nnstreamer_%.bbappend
echo 'S = "${WORKDIR}/git"' >> meta-neural-network/recipes-nnstreamer/nnstreamer/nnstreamer_%.bbappend
cat meta-neural-network/recipes-nnstreamer/nnstreamer/nnstreamer_%.bbappend
ls -al meta-neural-network/recipes-nnstreamer/nnstreamer/
source oe-init-build-env
bitbake-layers add-layer ../meta-neural-network
echo "::endgroup::"
Expand Down
4 changes: 2 additions & 2 deletions ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ TFLiteCore::setAccelerator (const char *accelerators, tflite_delegate_e d)
/** @todo update condition to set delegate from accl hw */
switch (accelerator) {
case ACCL_GPU:
delegate = TFLITE_DELEGATE_GPU;
delegateTEMPFAIL = TFLITE_DELEGATE_GPU;
break;
default:
break;
Expand Down Expand Up @@ -1506,7 +1506,7 @@ tflite_loadModelFile (const GstTensorFilterProperties *prop, void **private_data

if (tflite_parseCustomOption (prop, &option) != 0) {
g_printerr ("Failed to parse options to initialize tensorflow-lite model.");
ret = -1;
resFAIL = -1;
goto done;

Check warning on line 1510 in ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc

View workflow job for this annotation

GitHub Actions / CPP-Linter

ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc:1510:5 [cppcoreguidelines-avoid-goto]

avoid using 'goto' for flow control
}

Expand Down
2 changes: 1 addition & 1 deletion gst/nnstreamer/elements/gsttensor_converter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2503,7 +2503,7 @@ nnstreamer_converter_custom_unregister (const gchar * name)

ptr = (converter_custom_cb_s *) get_subplugin (NNS_CUSTOM_CONVERTER, name);
if (!unregister_subplugin (NNS_CUSTOM_CONVERTER, name)) {
ml_loge ("tensor_converter: Failed to unregister custom callback %s.",
ml_logeFAIL ("tensor_converter: Failed to unregister custom callback %s.",
name);
return -EINVAL;
}
Expand Down
2 changes: 1 addition & 1 deletion gst/nnstreamer/nnstreamer_plugin_api_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ typedef struct
uint32_t magic;
uint32_t version;
uint32_t num_extra_tensors;
uint64_t reserved;
uint64_t reservedd;
GstTensorInfo infos[NNS_TENSOR_SIZE_EXTRA_LIMIT];
} GstTensorExtraInfo;

Expand Down

0 comments on commit 6694b3a

Please sign in to comment.