[common] Fix mem leak in gst_tensor_buffer_append_memory
[platform/upstream/nnstreamer.git] / .github / workflows / gbs_x64.yml
1 name: GBS Tizen build for x64 from Ubuntu
2
3 # ${{ github.event.pull_request.commits }} : # commits in this PR
4 # - changed_file_list in GITHUB_ENV: the list of files updated in this pull-request.
5
6 on:
7   pull_request:
8     branches: [ main ]
9
10 jobs:
11   build:
12
13     runs-on: ubuntu-20.04
14
15     steps:
16     - uses: actions/checkout@v4
17       with:
18         fetch-depth: 0
19     - name: Check if rebuild required
20       ## @todo This should become a reusable workflow.
21       run: |
22         tmpfile=$(mktemp)
23         git show --pretty="format:" --name-only --diff-filter=AMRC ${{ github.event.pull_request.head.sha}} -${{ github.event.pull_request.commits }} | sort | uniq | awk NF > ${tmpfile}
24         echo "changed_file_list=${tmpfile}" >> "$GITHUB_ENV"
25         rebuild=`bash .github/workflows/check_if_rebuild_requires.sh ${tmpfile} gbs | grep "REBUILD=YES" | wc -l`
26         echo "Rebuild required: ${rebuild}"
27         echo "rebuild=${rebuild}" >> "$GITHUB_ENV"
28     - uses: actions/setup-python@v1
29     - name: prepare GBS
30       if: env.rebuild == '1'
31       run: |
32         echo "deb [trusted=yes] http://download.tizen.org/tools/latest-release/Ubuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/tizen.list
33         sudo apt-get update && sudo apt-get install -y gbs
34         cp .github/workflows/tizen.gbs.conf ~/.gbs.conf
35     - name: make cache key
36       if: env.rebuild == '1'
37       id: make-key
38       run: echo "cache_key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
39       shell: bash
40     - name: cache gbs cache
41       id: cache-gbs-root
42       if: env.rebuild == '1'
43       uses: actions/cache@v3
44       with:
45         path: ~/GBS-ROOT/local/cache
46         key: ${{ steps.make-key.outputs.cache_key }}
47     - name: run GBS
48       if: env.rebuild == '1'
49       run: |
50         gbs build --skip-srcrpm --define "_skip_debug_rpm 1"
51     - name: get nntrainer
52       if: env.rebuild == '1'
53       uses: actions/checkout@v3
54       with:
55         repository: nnstreamer/nntrainer
56         path: nntrainer
57     - name: run nntrainer GBS build
58       if: env.rebuild == '1'
59       run: |
60         pushd nntrainer && gbs build --skip-srcrpm --define "unit_test 1" --define "_skip_debug_rpm 1" && popd