diff --git a/.github/workflows/tizen-build.yml b/.github/workflows/tizen-build.yml new file mode 100644 index 00000000..49bc11d2 --- /dev/null +++ b/.github/workflows/tizen-build.yml @@ -0,0 +1,99 @@ +name: Tizen app build + +on: + push: + pull_request: + branches: [ main ] + +env: + TIZEN_STUDIO_URL: "http://download.tizen.org/sdk/Installer/tizen-studio_5.6/web-cli_Tizen_Studio_5.6_ubuntu-64.bin" + +jobs: + native: + runs-on: ubuntu-20.04 + strategy: + matrix: + # Only support tizen-8.0 application for now + app: ['yolo_model_training'] + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: -${{ github.event.pull_request.commits }} + - name: Install Tizen Studio + shell: bash + run: | + wget -nc -O ${{ github.workspace }}/installer $TIZEN_STUDIO_URL + chmod a+x ${{ github.workspace }}/installer + bash ${{ github.workspace }}/installer --accept-license ${{ github.workspace }}/tizen-studio + + export PATH=$PATH:${{ github.workspace }}/tizen-studio/package-manager + sudo apt update + sudo apt install -y libpython2.7 libkf5itemmodels5 libkf5kiowidgets5 libxcb-render-util0 libkchart2 libxcb-image0 libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 gettext bridge-utils openvpn + package-manager-cli.bin install NativeToolchain-Gcc-9.2 NativeCLI TIZEN-8.0 TIZEN-8.0-NativeAppDevelopment + - name: Build Tizen native application + shell: bash + run: | + export PATH=$PATH:${{ github.workspace }}/tizen-studio/tools/ide/bin + tizen build-native -a arm -c llvm -C Debug -- ${{ github.workspace }}/Tizen.native/${{ matrix.app }} + tizen package -t tpk -- ${{ github.workspace }}/Tizen.native/${{ matrix.app }}/Debug + mv ${{ github.workspace }}/Tizen.native/${{ matrix.app }}/Debug/*${{ matrix.app }}*.tpk ${{ matrix.app }}.tpk + - name: Upload tpk package + uses: actions/upload-artifact@v4 + with: + name: tizen_native_${{ matrix.app }} + path: ${{ matrix.app }}.tpk + web: + runs-on: ubuntu-20.04 + strategy: + matrix: + app: ['ImageClassificationSingleShot', 'ImageClassificationPipeline', 'ImageClassificationOffloading', 'ImageClassificationOffloadingYolo'] + steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: -${{ github.event.pull_request.commits }} + - name: Lint check + run: | + pushd Tizen.web + npm i -g eslint + npm i + eslint --config eslint.config.mjs . + popd + - name: Install Tizen Studio + run: | + wget -nc -O ${{ github.workspace }}/installer $TIZEN_STUDIO_URL + chmod a+x ${{ github.workspace }}/installer + bash ${{ github.workspace }}/installer --accept-license ${{ github.workspace }}/tizen-studio + - name: Download tflite model + if: ${{ matrix.app == 'ImageClassificationOffloadingYolo' }} + run: | + pip install ultralytics + python3 ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/get_tflite_model.py + mv yolov8s_saved_model/yolov8s_float32.tflite ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/res + shell: bash + - name: Build Tizen web application + shell: bash + run: | + export PATH=$PATH:${{ github.workspace }}/tizen-studio/tools/ide/bin + tizen build-web -- ${{ github.workspace }}/Tizen.web/${{ matrix.app }} + tizen package -t wgt -- ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/.buildResult + - name: Build native service and create hybrid application + shell: bash + if: ${{ matrix.app == 'ImageClassificationOffloading' }} + run: | + export PATH=$PATH:${{ github.workspace }}/tizen-studio/tools/ide/bin:${{ github.workspace }}/tizen-studio/package-manager + sudo apt update + sudo apt install -y libpython2.7 libkf5itemmodels5 libkf5kiowidgets5 libxcb-render-util0 libkchart2 libxcb-image0 libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 gettext bridge-utils openvpn + package-manager-cli.bin install NativeToolchain-Gcc-9.2 NativeCLI TIZEN-8.0 TIZEN-8.0-NativeAppDevelopment + tizen build-native -a arm -c llvm -C Debug -- ${{ github.workspace }}/Tizen.web/ImageClassificationOffloadingService + tizen package -t tpk -- ${{ github.workspace }}/Tizen.web/ImageClassificationOffloadingService/Debug + tizen package -t wgt -r ${{ github.workspace }}/Tizen.web/ImageClassificationOffloadingService/Debug/EQmf4iSfpX-1.0.0-arm.tpk -- ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/.buildResult/${{ matrix.app }}.wgt + - name: Upload wgt package + uses: actions/upload-artifact@v4 + with: + name: tizen_web_${{ matrix.app }} + path: ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/.buildResult/${{ matrix.app }}.wgt diff --git a/.github/workflows/tizen-web.yml b/.github/workflows/tizen-web.yml deleted file mode 100644 index 50c3a435..00000000 --- a/.github/workflows/tizen-web.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: Tizen app build - -on: - push: - pull_request: - branches: [ main ] - -env: - TIZEN_STUDIO_URL: "http://download.tizen.org/sdk/Installer/tizen-studio_5.6/web-cli_Tizen_Studio_5.6_ubuntu-64.bin" - -jobs: - native: - runs-on: ubuntu-20.04 - strategy: - matrix: - # Only support tizen-8.0 application for now - app: ['yolo_model_training'] - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: -${{ github.event.pull_request.commits }} - - name: Install Tizen Studio - run: | - wget -nc -O ${{ github.workspace }}/installer $TIZEN_STUDIO_URL - chmod a+x ${{ github.workspace }}/installer - bash ${{ github.workspace }}/installer --accept-license ${{ github.workspace }}/tizen-studio - export PATH=$PATH:${{ github.workspace }}/tizen-studio/package-manager - sudo apt update - sudo apt install -y libpython2.7 libkf5itemmodels5 libkf5kiowidgets5 libxcb-render-util0 libkchart2 libxcb-image0 libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 gettext bridge-utils openvpn - package-manager-cli.bin install NativeToolchain-Gcc-9.2 NativeCLI TIZEN-8.0 TIZEN-8.0-NativeAppDevelopment - shell: bash - - name: Build Tizen native application - shell: bash - run: | - export PATH=$PATH:${{ github.workspace }}/tizen-studio/tools/ide/bin - tizen build-native -a arm -c llvm -C Debug -- ${{ github.workspace }}/Tizen.native/${{ matrix.app }} - tizen package -t tpk -o ${{ github.workspace }}/Tizen.native/${{ matrix.app }}/Debug/${{ matrix.app }}.tpk -- ${{ github.workspace }}/Tizen.native/${{ matrix.app }}/Debug - - name: Upload tpk package - uses: actions/upload-artifact@v4 - with: - name: tizen_native_${{ matrix.app }} - path: ${{ github.workspace }}/Tizen.wenativeb/${{ matrix.app }}/Debug/${{ matrix.app }}.tpk - # web: - # runs-on: ubuntu-20.04 - # strategy: - # matrix: - # app: ['ImageClassificationSingleShot', 'ImageClassificationPipeline', 'ImageClassificationOffloading', 'ImageClassificationOffloadingYolo'] - # steps: - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - # - uses: actions/checkout@v4 - # with: - # ref: ${{ github.event.pull_request.head.sha }} - # fetch-depth: -${{ github.event.pull_request.commits }} - # - name: Lint check - # run: | - # pushd Tizen.web - # npm i -g eslint - # npm i - # eslint --config eslint.config.mjs . - # popd - # - name: Install Tizen Studio - # run: | - # wget -nc -O ${{ github.workspace }}/installer $TIZEN_STUDIO_URL - # chmod a+x ${{ github.workspace }}/installer - # bash ${{ github.workspace }}/installer --accept-license ${{ github.workspace }}/tizen-studio - # - name: Download tflite model - # if: ${{ matrix.app == 'ImageClassificationOffloadingYolo' }} - # run: | - # pip install ultralytics - # python3 ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/get_tflite_model.py - # mv yolov8s_saved_model/yolov8s_float32.tflite ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/res - # shell: bash - # - name: Build Tizen web application - # shell: bash - # run: | - # export PATH=$PATH:${{ github.workspace }}/tizen-studio/tools/ide/bin - # tizen build-web -- ${{ github.workspace }}/Tizen.web/${{ matrix.app }} - # tizen package -t wgt -- ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/.buildResult - # - name: Build native service and create hybrid application - # shell: bash - # if: ${{ matrix.app == 'ImageClassificationOffloading' }} - # run: | - # export PATH=$PATH:${{ github.workspace }}/tizen-studio/tools/ide/bin:${{ github.workspace }}/tizen-studio/package-manager - # sudo apt update - # sudo apt install -y libpython2.7 libkf5itemmodels5 libkf5kiowidgets5 libxcb-render-util0 libkchart2 libxcb-image0 libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 gettext bridge-utils openvpn - # package-manager-cli.bin install NativeToolchain-Gcc-9.2 NativeCLI TIZEN-8.0 TIZEN-8.0-NativeAppDevelopment - # tizen build-native -a arm -c llvm -C Debug -- ${{ github.workspace }}/Tizen.web/ImageClassificationOffloadingService - # tizen package -t tpk -- ${{ github.workspace }}/Tizen.web/ImageClassificationOffloadingService/Debug - # tizen package -t wgt -r ${{ github.workspace }}/Tizen.web/ImageClassificationOffloadingService/Debug/EQmf4iSfpX-1.0.0-arm.tpk -- ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/.buildResult/${{ matrix.app }}.wgt - # - name: Upload wgt package - # uses: actions/upload-artifact@v4 - # with: - # name: tizen_web_${{ matrix.app }} - # path: ${{ github.workspace }}/Tizen.web/${{ matrix.app }}/.buildResult/${{ matrix.app }}.wgt