-
Notifications
You must be signed in to change notification settings - Fork 25
74 lines (64 loc) · 2.32 KB
/
gbs_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build and unit test/ Tizen/GBS
# ${{ github.event.pull_request.commits }} : # commits in this PR
# - changed_file_list in GITHUB_ENV: the list of files updated in this pull-request.
on:
pull_request:
branches: [ main ]
jobs:
build:
name: Tizen GBS build on Ubuntu
strategy:
matrix:
include:
- gbs_build_arch: "x86_64"
gbs_build_option: "--define \"unit_test 1\""
- gbs_build_arch: "armv7l"
gbs_build_option: "--define \"unit_test 0\""
- gbs_build_arch: "aarch64"
gbs_build_option: "--define \"unit_test 0\""
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: -${{ github.event.pull_request.commits }}
- name: Check if rebuild required
uses: ./.github/actions/check-rebuild
with:
mode: gbs
- uses: actions/setup-python@v1
- name: prepare GBS
if: env.rebuild == '1'
run: |
echo "deb [trusted=yes] http://download.tizen.org/tools/latest-release/Ubuntu_22.04/ /" | sudo tee /etc/apt/sources.list.d/tizen.list
sudo apt-get update && sudo apt-get install -y gbs
cp .github/workflows/tizen.gbs.conf ~/.gbs.conf
- name: get date
id: get-date
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: restore gbs cache from main branch
if: env.rebuild == '1'
uses: actions/cache/restore@v4
with:
path: ~/GBS-ROOT/local/cache
key: gbs-cache-${{ matrix.gbs_build_arch }}-${{ steps.get-date.outputs.date }}
restore-keys: |
gbs-cache-${{ matrix.gbs_build_arch }}-
- name: run GBS
if: env.rebuild == '1'
run: |
gbs build --skip-srcrpm --define "_skip_debug_rpm 1" -A ${{ matrix.gbs_build_arch }} ${{ matrix.gbs_build_option }}
- name: get nntrainer
uses: actions/checkout@v3
with:
repository: nnstreamer/nntrainer
path: nntrainer
- name: run nntrainer build
if: env.rebuild == '1'
run: |
pushd nntrainer
echo "::group::Build and run unit-tests for nntrainer"
gbs build --skip-srcrpm --define "_skip_debug_rpm 1" -A ${{ matrix.gbs_build_arch }} ${{ matrix.gbs_build_option }}
echo "::endgroup::"
popd