[Action] Debian package daily upload
authoryelini-jeong <yelini.jeong@samsung.com>
Wed, 15 Jun 2022 01:26:55 +0000 (10:26 +0900)
committer추지호/NPU Lab(SR)/삼성전자 <jiho.chu@samsung.com>
Wed, 29 Jun 2022 02:18:28 +0000 (11:18 +0900)
This patch adds github action to upload debian package daily.

Signed-off-by: yelini-jeong <yelini.jeong@samsung.com>
.github/actions/test-ubuntu/action.yml
.github/workflows/pr-build-bionic.yml
.github/workflows/pr-build-focal.yml
.github/workflows/upload-package-bionic.yml [new file with mode: 0644]
.github/workflows/upload-package-focal.yml [new file with mode: 0644]

index 7a758c4..fb248d1 100644 (file)
@@ -6,6 +6,10 @@ inputs:
     description: path of npu-engine packages
     required: true
     default: /tmp/debs/npu-engine*.deb
+  mode:
+    description: mode of meson test
+    required: false
+    default:
 
 runs:
   using: composite
@@ -16,14 +20,7 @@ runs:
       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
+        pushd build
+        meson test ${{ inputs.mode }}
+        popd
       shell: bash
index 0f0f3cc..527a2f0 100644 (file)
@@ -35,3 +35,4 @@ jobs:
         uses: ./.github/actions/test-ubuntu
         with:
           package_path: /tmp/debs/npu-engine*.deb
+          mode: --suite fast-test
index 1b2f47d..5464f52 100644 (file)
@@ -35,3 +35,4 @@ jobs:
         uses: ./.github/actions/test-ubuntu
         with:
           package_path: /tmp/debs/npu-engine*.deb
+          mode: --suite fast-test
diff --git a/.github/workflows/upload-package-bionic.yml b/.github/workflows/upload-package-bionic.yml
new file mode 100644 (file)
index 0000000..1f3112c
--- /dev/null
@@ -0,0 +1,52 @@
+name: upload debian package for bionic
+
+on:
+  workflow_dispatch:
+  schedule:
+    # scheduled workflow run on the latest commit on the default or base
+    # branch.
+    - cron: '00 01 * * 0-5'
+
+env:
+  ART_REPO: https://art.sec.samsung.net/artifactory/aip_generic/NPU_SystemService
+  ART_ID: ${{ secrets.ARTIFACTORY_ID }}
+  ART_PW: ${{ secrets.ARTIFACTORY_PW }}
+
+jobs:
+  build-and-upload-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: 240
+
+    steps:
+      - name: Get current date
+        id: date
+        run: echo "::set-output name=date::$(date +'%Y%m%d')"
+      - 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 unittest result
+        uses: CODE-Actions/upload-artifact@v2
+        with:
+          name: unittest for Bionic
+          path: |
+            build/tests/unittests/core*.xml
+            build/tests/unittests/unittest*.xml
+      - name: Test using apptest
+        uses: ./.github/actions/test-ubuntu
+        with:
+          package_path: /tmp/debs/npu-engine*.deb
+      - name: Upload to artifactory
+        uses: ./.github/actions/upload-artifacts
+        with:
+          input_path: /tmp/debs
+          input_type: deb
+          art_repo: $ART_REPO/${{ steps.date.outputs.date }}/bionic
+          art_id: $ART_ID
+          art_pw: $ART_PW
diff --git a/.github/workflows/upload-package-focal.yml b/.github/workflows/upload-package-focal.yml
new file mode 100644 (file)
index 0000000..a940318
--- /dev/null
@@ -0,0 +1,52 @@
+name: upload debian package for focal
+
+on:
+  workflow_dispatch:
+  schedule:
+    # scheduled workflow run on the latest commit on the default or base
+    # branch.
+    - cron: '00 01 * * 0-5'
+
+env:
+  ART_REPO: https://art.sec.samsung.net/artifactory/aip_generic/NPU_SystemService
+  ART_ID: ${{ secrets.ARTIFACTORY_ID }}
+  ART_PW: ${{ secrets.ARTIFACTORY_PW }}
+
+jobs:
+  build-and-upload-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: 240
+
+    steps:
+      - name: Get current date
+        id: date
+        run: echo "::set-output name=date::$(date +'%Y%m%d')"
+      - 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 unittest result
+        uses: CODE-Actions/upload-artifact@v2
+        with:
+          name: unittest for Focal
+          path: |
+            build/tests/unittests/core*.xml
+            build/tests/unittests/unittest*.xml
+      - name: Test using apptest
+        uses: ./.github/actions/test-ubuntu
+        with:
+          package_path: /tmp/debs/npu-engine*.deb
+      - name: Upload to artifactory
+        uses: ./.github/actions/upload-artifacts
+        with:
+          input_path: /tmp/debs
+          input_type: deb
+          art_repo: $ART_REPO/${{ steps.date.outputs.date }}/focal
+          art_id: $ART_ID
+          art_pw: $ART_PW