Skip to content

Commit

Permalink
[Action] Add composite action for git push
Browse files Browse the repository at this point in the history
To reduce duplicated code, use composite action for git push.

Signed-off-by: Gichan Jang <[email protected]>
  • Loading branch information
gichan-jang committed Nov 11, 2024
1 parent 91f5eb4 commit 64c6fd4
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 58 deletions.
34 changes: 34 additions & 0 deletions .github/actions/gitpush/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Push to github.io'
description: 'Update the github action result to nnstreamer.github.io'
inputs:
source:
description: 'source path of the file or directory to be copied'
required: true
dest:
description: 'destination directory in nnstreamer.github.io repository'
required: true
message:
description: 'commit message'
required: false
default: 'Update the result from nnstreamer github action.'
taos_account:
required: true
taos_account_token:
required: true

runs:
using: "composite"
steps:
- name: update the result
run: |
git clone https://${{ inputs.taos_account }}:${{ inputs.taos_account_token }}@github.com/nnstreamer/nnstreamer.github.io.git
pushd nnstreamer.github.io
mkdir -p ${{ inputs.dest }}
cp -r ${{ inputs.source }} ${{ inputs.dest }}
git config user.email "[email protected]"
git config user.name "nnsuite"
git add *
git commit -s -m "${{ inputs.message }}"
git push origin main -f
popd
shell: bash
69 changes: 33 additions & 36 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,37 @@ jobs:
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Update github.io
run: |
git clone https://${{ secrets.TAOS_ACCOUNT }}:${{ secrets.TAOS_ACCOUNT_TOKEN }}@github.com/nnstreamer/nnstreamer.github.io.git
cp -r Documentation/NNStreamer-doc/html/* nnstreamer.github.io/
pushd nnstreamer.github.io
git config user.email "[email protected]"
git config user.name "nnsuite"
git add *
git commit -s -m "${{ steps.get-date.outputs.date }} : Update nnstreamer.github.io"
git push origin main -f
popd
uses: ./.github/actions/gitpush
with:
source: ${{ github.workspace }}/Documentation/NNStreamer-doc/html/*
dest: ./
message: "${{ steps.get-date.outputs.date }} : Update nnstreamer.github.io."
taos_account: ${{ secrets.TAOS_ACCOUNT }}
taos_account_token: ${{ secrets.TAOS_ACCOUNT_TOKEN }}

generate_doxybook:
# reference: https://github.com/nnstreamer/TAOS-CI/tree/main/ci/doxybook
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install packages for doxygen
run: sudo apt-get install doxygen graphviz texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- name: Generate doxygen
run: |
doxygen .github/workflows/static.check.scripts/Doxyfile.prj
pushd latex
make -j`nproc`
mv refman.pdf nnstreamer-book.pdf
popd
- name: get date
id: get-date
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Release daily build result
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
run: |
aws s3 cp --region ap-northeast-2 latex/nnstreamer-book.pdf s3://nnstreamer-release/nnstreamer/${{ steps.get-date.outputs.date }}/doc/nnstreamer-book.pdf
aws s3 cp --region ap-northeast-2 latex/nnstreamer-book.pdf s3://nnstreamer-release/nnstreamer/latest/doc/nnstreamer-book.pdf
# generate_doxybook:
# # reference: https://github.com/nnstreamer/TAOS-CI/tree/main/ci/doxybook
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# - name: Install packages for doxygen
# run: sudo apt-get install doxygen graphviz texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
# - name: Generate doxygen
# run: |
# doxygen .github/workflows/static.check.scripts/Doxyfile.prj
# pushd latex
# make -j`nproc`
# mv refman.pdf nnstreamer-book.pdf
# popd
# - name: get date
# id: get-date
# run: |
# echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
# - name: Release daily build result
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
# AWS_EC2_METADATA_DISABLED: true
# run: |
# aws s3 cp --region ap-northeast-2 latex/nnstreamer-book.pdf s3://nnstreamer-release/nnstreamer/${{ steps.get-date.outputs.date }}/doc/nnstreamer-book.pdf
# aws s3 cp --region ap-northeast-2 latex/nnstreamer-book.pdf s3://nnstreamer-release/nnstreamer/latest/doc/nnstreamer-book.pdf
38 changes: 17 additions & 21 deletions .github/workflows/update_gbs_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,14 @@ jobs:
python3 .github/workflows/gen_coverage_badge.py ~/testresult/usr/share/nnstreamer/unittest/result/index.html ~/testresult/usr/share/nnstreamer/unittest/result/coverage_badge.svg
- if: matrix.gbs_build_arch == 'x86_64'
name: Update github.io
run: |
git clone https://${{ secrets.TAOS_ACCOUNT }}:${{ secrets.TAOS_ACCOUNT_TOKEN }}@github.com/nnstreamer/nnstreamer.github.io.git
pushd nnstreamer.github.io
mkdir -p testresult
cp -r ~/testresult/usr/share/nnstreamer/unittest/result/* testresult
git config user.email "[email protected]"
git config user.name "nnsuite"
git add *
git commit -s -m "${{ steps.get-date.outputs.date }} : Update unit test result."
git push origin main -f
popd
name: update test coverage result to github.io
uses: ./.github/actions/gitpush
with:
source: ~/testresult/usr/share/nnstreamer/unittest/result/*
dest: testresult
message: "${{ steps.get-date.outputs.date }} : Update test coverage result."
taos_account: ${{ secrets.TAOS_ACCOUNT }}
taos_account_token: ${{ secrets.TAOS_ACCOUNT_TOKEN }}

- name: Get nntrainer
uses: actions/checkout@v4
Expand All @@ -124,12 +120,12 @@ jobs:
pip install pybadges setuptools
echo '${{ toJSON( needs.cache_gbs_build.outputs) }}' > gbs_build_result.json
python3 .github/workflows/gen_gbs_result_badge.py gbs_build_result.json ~/testresult
git clone https://${{ secrets.TAOS_ACCOUNT }}:${{ secrets.TAOS_ACCOUNT_TOKEN }}@github.com/nnstreamer/nnstreamer.github.io.git
pushd nnstreamer.github.io
cp -r ~/testresult/*.svg testresult
git config user.email "[email protected]"
git config user.name "nnsuite"
git add *
git commit -s -m "Update unit test result badge."
git push origin main -f
popd
- name: update result badge to github.io
uses: ./.github/actions/gitpush
with:
source: ~/testresult/*.svg
dest: testresult
message: "Update unit test result badge."
taos_account: ${{ secrets.TAOS_ACCOUNT }}
taos_account_token: ${{ secrets.TAOS_ACCOUNT_TOKEN }}
2 changes: 1 addition & 1 deletion Documentation/edge-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Edge-AI / Among-Device AI

# What is Edge-AI and Among-Device AI?


d
With on-device AI, different embedded devices including mobile phones, TVs, refrigerators, vacuum cleaners, and all the other sorts of deviecs have started running deep neural network models.
Unlike conventional AI services running in cloud servers, on-device AI services are often limited by the limited computing resources of the given devices; they usually have limited size of memory, limited processing power, or limited energy, which varies per device.
Moreover, such devices have different availability of data; each device may have different sensors or different sensing targets (e.g., view angles of cameras), which might be beneficial if a device has access to others.
Expand Down

0 comments on commit 64c6fd4

Please sign in to comment.