From: yelini-jeong Date: Mon, 16 May 2022 01:33:06 +0000 (+0900) Subject: [Action] Split build tizen, ubuntu X-Git-Tag: submit/tizen/20220919.014846~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e725e9cf526d01a6baa6537a6b3e204fd05aa1b;p=platform%2Fadaptation%2Fnpu%2Ftrix-engine.git [Action] Split build tizen, ubuntu This patch splits github action checking pr. Signed-off-by: yelini-jeong --- diff --git a/.github/actions/build-pontusm/action.yml b/.github/actions/build-pontusm/action.yml new file mode 100644 index 0000000..0c50262 --- /dev/null +++ b/.github/actions/build-pontusm/action.yml @@ -0,0 +1,34 @@ +name: build package +description: build npu system service rpm packages + +inputs: + output_path: + description: where to store the generated packages + required: false + default: /tmp/rpms + +runs: + using: composite + steps: + # copy gbs config + - run: | + cp /root/.gbs.conf . + shell: bash + # initialize git repository + - run: | + git config --global user.name "nnsuite" + git config --global user.email "nnsuite@samsung.com" + git config --global --add safe.directory $PWD + git init + git add . + git commit -a -m "Initialized" + shell: bash + # run build + - run: | + gbs build -A armv7l --include-all --define 'dtv 1' + shell: bash + # copy package + - run: | + mkdir -p ${{ inputs.output_path }} + cp ~/GBS-ROOT/local/repos/tizen/armv7l/RPMS/* ${{ inputs.output_path }} + shell: bash diff --git a/.github/actions/build-tizen/action.yml b/.github/actions/build-tizen/action.yml new file mode 100644 index 0000000..9e93434 --- /dev/null +++ b/.github/actions/build-tizen/action.yml @@ -0,0 +1,38 @@ +name: build package +description: build npu system service rpm packages + +inputs: + arch: + description: build architecture + required: true + default: armv7l + output_path: + description: where to store the generated packages + required: false + default: /tmp/rpms + +runs: + using: composite + steps: + # copy gbs config + - run: | + cp /root/.gbs.conf . + shell: bash + # initialize git repository + - run: | + git config --global user.name "nnsuite" + git config --global user.email "nnsuite@samsung.com" + git config --global --add safe.directory $PWD + git init + git add . + git commit -a -m "Initialized" + shell: bash + # run build + - run: | + gbs build -A ${{ inputs.arch }} + shell: bash + # copy package + - run: | + mkdir -p ${{ inputs.output_path }} + cp ~/GBS-ROOT/local/repos/tizen/${{ inputs.arch }}/RPMS/* ${{ inputs.output_path }} + shell: bash diff --git a/.github/actions/build-ubuntu/action.yml b/.github/actions/build-ubuntu/action.yml new file mode 100644 index 0000000..c770ba0 --- /dev/null +++ b/.github/actions/build-ubuntu/action.yml @@ -0,0 +1,23 @@ +name: build package +description: build npu system service debian packages + +inputs: + output_path: + description: where to store the generated packages + required: false + default: /tmp/debs + +runs: + using: composite + steps: + # make debian packages + - run: | + ulimit -c unlimited + debuild -e BUILD_TYPE=debug -us -uc + shell: bash + + # copy package + - run: | + mkdir -p ${{ inputs.output_path }} + cp ../npu-engine*.deb ${{ inputs.output_path }} + shell: bash diff --git a/.github/actions/test-ubuntu/action.yml b/.github/actions/test-ubuntu/action.yml new file mode 100644 index 0000000..7a758c4 --- /dev/null +++ b/.github/actions/test-ubuntu/action.yml @@ -0,0 +1,29 @@ +name: test packages +description: test npu system service debian packages + +inputs: + package_path: + description: path of npu-engine packages + required: true + default: /tmp/debs/npu-engine*.deb + +runs: + using: composite + steps: + # Install the packages + - run: | + dpkg -i ${{ inputs.package_path }} + shell: bash + # Check reference models + - run: | + apptest_tvn_triv2_aging /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS/CONV_2D_300 1 10 + apptest_tvn_triv2_aging /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS/CONV_2D_300 2 10 + apptest_tvn_triv2_aging /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS/CONV_2D_300 3 10 + apptest_tvn_triv2_aging /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS/CONV_2D_300 4 10 + apptest_tvn_triv2_interleave 10 /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS/MAX_POOL_2D_000 /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS/CONV_2D_300 + + # This test has a problem temporarily + # apptest_tvn_triv2_preempt /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS/ + apptest_tvn_triv2_bulk /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS + apptest_tvn_triv2_bulk /opt/trinity/share/npu-engine/testdata/TRIV221_8TOPS -t + shell: bash diff --git a/.github/workflows/pr-build-aarch64.yml b/.github/workflows/pr-build-aarch64.yml new file mode 100644 index 0000000..ef77bdc --- /dev/null +++ b/.github/workflows/pr-build-aarch64.yml @@ -0,0 +1,25 @@ +name: build package for aarch64 + +on: + pull_request: + branches: [ tizen ] + +jobs: + build-aarch64: + # CODE-hosted runner + runs-on: [ code-large ] + container: + image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest + # for chroot-based build system + options: --privileged + + timeout-minutes: 30 + + steps: + - name: Clone your repository + uses: CODE-Actions/checkout@v2 + - name: Build image + uses: ./.github/actions/build-tizen + with: + arch: aarch64 + output_path: /tmp/rpms diff --git a/.github/workflows/pr-build-armv7l.yml b/.github/workflows/pr-build-armv7l.yml new file mode 100644 index 0000000..7e0aacd --- /dev/null +++ b/.github/workflows/pr-build-armv7l.yml @@ -0,0 +1,25 @@ +name: build package for armv7l + +on: + pull_request: + branches: [ tizen ] + +jobs: + build-armv7l: + # CODE-hosted runner + runs-on: [ code-large ] + container: + image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest + # for chroot-based build system + options: --privileged + + timeout-minutes: 30 + + steps: + - name: Clone your repository + uses: CODE-Actions/checkout@v2 + - name: Build packages + uses: ./.github/actions/build-tizen + with: + arch: armv7l + output_path: /tmp/rpms diff --git a/.github/workflows/pr-build-bionic.yml b/.github/workflows/pr-build-bionic.yml new file mode 100644 index 0000000..0f0f3cc --- /dev/null +++ b/.github/workflows/pr-build-bionic.yml @@ -0,0 +1,37 @@ +name: build debian package for bionic + +on: + pull_request: + branches: [ tizen ] + +env: + NE_MUTE_STDOUT: "TRUE" + +jobs: + build-bionic: + # CODE-hosted runner + runs-on: [ code-large ] + container: + image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest + options: --user root + timeout-minutes: 120 + + steps: + - name: Clone your repository + uses: CODE-Actions/checkout@v2 + - name: Make debian packages + uses: ./.github/actions/build-ubuntu + with: + output_path: /tmp/debs + - name: Upload core dump if failed + if: ${{ failure() }} + uses: CODE-Actions/upload-artifact@v2 + with: + name: unittest core dump for Bionic + path: | + build/tests/unittests/core + build/tests/unittests/unittest* + - name: Test using apptest + uses: ./.github/actions/test-ubuntu + with: + package_path: /tmp/debs/npu-engine*.deb diff --git a/.github/workflows/pr-build-focal.yml b/.github/workflows/pr-build-focal.yml new file mode 100644 index 0000000..1b2f47d --- /dev/null +++ b/.github/workflows/pr-build-focal.yml @@ -0,0 +1,37 @@ +name: build debian package for focal + +on: + pull_request: + branches: [ tizen ] + +env: + NE_MUTE_STDOUT: "TRUE" + +jobs: + build-focal: + # CODE-hosted runner + runs-on: [ code-large ] + container: + image: art.sec.samsung.net/aip_docker/n2s2_docker/focal:latest + options: --user root + timeout-minutes: 120 + + steps: + - name: Clone your repository + uses: CODE-Actions/checkout@v2 + - name: Make debian packages + uses: ./.github/actions/build-ubuntu + with: + output_path: /tmp/debs + - name: Upload core dump if failed + if: ${{ failure() }} + uses: CODE-Actions/upload-artifact@v2 + with: + name: unittest core dump for Focal + path: | + build/tests/unittests/core + build/tests/unittests/unittest* + - name: Test using apptest + uses: ./.github/actions/test-ubuntu + with: + package_path: /tmp/debs/npu-engine*.deb diff --git a/.github/workflows/pr-build-pontusm.yml b/.github/workflows/pr-build-pontusm.yml new file mode 100644 index 0000000..05a4c00 --- /dev/null +++ b/.github/workflows/pr-build-pontusm.yml @@ -0,0 +1,24 @@ +name: build package for pontusm board + +on: + pull_request: + branches: [ tizen ] + +jobs: + build-pontusm: + # CODE-hosted runner + runs-on: [ code-large ] + container: + image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest + # for chroot-based build system + options: --privileged + + timeout-minutes: 30 + + steps: + - name: Clone your repository + uses: CODE-Actions/checkout@v2 + - name: Build packages + uses: ./.github/actions/build-pontusm + with: + output_path: /tmp/rpms diff --git a/.github/workflows/pr-build-x86_64.yml b/.github/workflows/pr-build-x86_64.yml new file mode 100644 index 0000000..25d6e8b --- /dev/null +++ b/.github/workflows/pr-build-x86_64.yml @@ -0,0 +1,25 @@ +name: build package for x86_64 + +on: + pull_request: + branches: [ tizen ] + +jobs: + build-x86_64: + # CODE-hosted runner + runs-on: [ code-large ] + container: + image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest + # for chroot-based build system + options: --privileged + + timeout-minutes: 30 + + steps: + - name: Clone your repository + uses: CODE-Actions/checkout@v2 + - name: Build packages + uses: ./.github/actions/build-tizen + with: + arch: x86_64 + output_path: /tmp/rpms diff --git a/.github/workflows/pr-checker-tizen.yml b/.github/workflows/pr-checker-tizen.yml deleted file mode 100644 index c869385..0000000 --- a/.github/workflows/pr-checker-tizen.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: pr-checker-tizen - -on: - pull_request: - branches: [ tizen ] - -jobs: - build-armv7l: - # CODE-hosted runner - runs-on: [ code-large ] - container: - image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest - # for chroot-based build system - options: --privileged - - timeout-minutes: 30 - - steps: - - name: Clone your repository - uses: CODE-Actions/checkout@v2 - - name: Copy gbs config - shell: bash - run: | - cp /root/.gbs.conf . - - name: Initialize git for gbs - shell: bash - run: | - git config --global user.name "nnsuite" - git config --global user.email "nnsuite@samsung.com" - git init - git add . - git commit -a -m "Initialized" - - name: Run gbs build (armv7l) - shell: bash - run: | - gbs build -A armv7l - - build-aarch64: - # CODE-hosted runner - runs-on: [ code-large ] - container: - image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest - # for chroot-based build system - options: --privileged - - timeout-minutes: 30 - - steps: - - name: Clone your repository - uses: CODE-Actions/checkout@v2 - - name: Copy gbs config - shell: bash - run: | - cp /root/.gbs.conf . - - name: Initialize git for gbs - shell: bash - run: | - git config --global user.name "nnsuite" - git config --global user.email "nnsuite@samsung.com" - git init - git add . - git commit -a -m "Initialized" - - name: Run gbs build (aarch64) - shell: bash - run: | - gbs build -A aarch64 - - build-x86_64: - # CODE-hosted runner - runs-on: [ code-large ] - container: - image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest - # for chroot-based build system - options: --privileged - - timeout-minutes: 30 - - steps: - - name: Clone your repository - uses: CODE-Actions/checkout@v2 - - name: Copy gbs config - shell: bash - run: | - cp /root/.gbs.conf . - - name: Initialize git for gbs - shell: bash - run: | - git config --global user.name "nnsuite" - git config --global user.email "nnsuite@samsung.com" - git init - git add . - git commit -a -m "Initialized" - - name: Run gbs build (x86_64) - shell: bash - run: | - gbs build -A x86_64 diff --git a/.github/workflows/pr-checker-ubuntu.yml b/.github/workflows/pr-checker-ubuntu.yml deleted file mode 100644 index 1c9b54f..0000000 --- a/.github/workflows/pr-checker-ubuntu.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: pr-checker-ubuntu - -on: - pull_request: - branches: [ tizen ] - -defaults: - run: - shell: bash - -env: - NE_MUTE_STDOUT: "TRUE" - -jobs: - build-bionic: - # CODE-hosted runner - runs-on: [ code-large ] - container: - image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest - options: --user root - timeout-minutes: 120 - - steps: - - name: Clone your repository - uses: CODE-Actions/checkout@v2 - - name: Make debian packages - run: | - ulimit -c unlimited - debuild -e BUILD_TYPE=debug -us -uc - - name: Upload core dump if failed - if: ${{ failure() }} - uses: CODE-Actions/upload-artifact@v2 - with: - name: unittest core dump for Bionic - path: | - build/tests/unittests/core - build/tests/unittests/unittest* - - name: Install the packages - run: | - dpkg -i ../npu-engine*.deb - - name: Check reference models - run: | - apptest_tvn_triv2_bulk /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS - apptest_tvn_triv2_bulk /opt/trinity/share/npu-engine/testdata/TRIV221_8TOPS -t - - build-focal: - # CODE-hosted runner - runs-on: [ code-large ] - container: - image: art.sec.samsung.net/aip_docker/n2s2_docker/focal:latest - options: --user root - timeout-minutes: 120 - - steps: - - name: Clone your repository - uses: CODE-Actions/checkout@v2 - - name: Make debian packages - run: | - ulimit -c unlimited - debuild -e BUILD_TYPE=debug -us -uc - - name: Upload core dump if failed - if: ${{ failure() }} - uses: CODE-Actions/upload-artifact@v2 - with: - name: unittest core dump for Focal - path: | - build/tests/unittests/core - build/tests/unittests/unittest* - - name: Install the packages - run: | - dpkg -i ../npu-engine*.deb - - name: Check reference models - run: | - apptest_tvn_triv2_bulk /opt/trinity/share/npu-engine/testdata/TRIV238_2TOPS - apptest_tvn_triv2_bulk /opt/trinity/share/npu-engine/testdata/TRIV221_8TOPS -t