1 name: GBS Tizen build for x64 from Ubuntu
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.
16 - uses: actions/checkout@v4
19 - name: Check if rebuild required
20 ## @todo This should become a reusable workflow.
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
30 if: env.rebuild == '1'
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'
38 run: echo "cache_key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
40 - name: cache gbs cache
42 if: env.rebuild == '1'
43 uses: actions/cache@v3
45 path: ~/GBS-ROOT/local/cache
46 key: ${{ steps.make-key.outputs.cache_key }}
48 if: env.rebuild == '1'
50 gbs build --skip-srcrpm --define "_skip_debug_rpm 1"
52 if: env.rebuild == '1'
53 uses: actions/checkout@v3
55 repository: nnstreamer/nntrainer
57 - name: run nntrainer GBS build
58 if: env.rebuild == '1'
60 pushd nntrainer && gbs build --skip-srcrpm --define "unit_test 1" --define "_skip_debug_rpm 1" && popd