[Action] make latest repository
[platform/adaptation/npu/trix-engine.git] / .github / workflows / upload-package-focal.yml
1 name: upload debian package for focal
2
3 on:
4   workflow_dispatch:
5   schedule:
6     # scheduled workflow run on the latest commit on the default or base
7     # branch.
8     - cron: '00 01 * * 0-5'
9
10 env:
11   ART_REPO: https://art.sec.samsung.net/artifactory/aip_generic/NPU_SystemService
12   ART_ID: ${{ secrets.ARTIFACTORY_ID }}
13   ART_PW: ${{ secrets.ARTIFACTORY_PW }}
14
15 jobs:
16   build-and-upload-focal:
17     # CODE-hosted runner
18     runs-on: [ code-large ]
19     container:
20       image: art.sec.samsung.net/aip_docker/n2s2_docker/focal:latest
21       options: --user root
22     timeout-minutes: 240
23
24     steps:
25       - name: Get current date
26         id: date
27         run: echo "::set-output name=date::$(date +'%Y%m%d')"
28       - name: Clone your repository
29         uses: CODE-Actions/checkout@v2
30       - name: Make debian packages
31         uses: ./.github/actions/build-ubuntu
32         with:
33           output_path: /tmp/debs
34       - name: Upload unittest result
35         uses: CODE-Actions/upload-artifact@v2
36         with:
37           name: unittest for Focal
38           path: |
39             build/tests/unittests/core*.xml
40             build/tests/unittests/unittest*.xml
41       - name: Test using apptest
42         uses: ./.github/actions/test-ubuntu
43         with:
44           package_path: /tmp/debs/npu-engine*.deb
45       - name: Upload to artifactory
46         uses: ./.github/actions/upload-artifacts
47         with:
48           input_path: /tmp/debs
49           input_type: deb
50           art_repo: $ART_REPO/${{ steps.date.outputs.date }}/focal
51           art_id: $ART_ID
52           art_pw: $ART_PW
53       - name: Make latest
54         uses: ./.github/actions/upload-artifacts
55         with:
56           input_path: /tmp/debs
57           input_type: deb
58           art_repo: $ART_REPO/latest/focal
59           art_id: $ART_ID
60           art_pw: $ART_PW