-
Notifications
You must be signed in to change notification settings - Fork 4
97 lines (85 loc) · 3.01 KB
/
native_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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#
# If not stated otherwise in this file or this component's LICENSE file the
# following copyright and licenses apply:
#
# Copyright 2024 Sky UK
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Native Build
on:
pull_request:
branches: [ "master", "rdkcentral:master" ]
push:
branches: [ "master", "rdkcentral:master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
path: rialto-ocdm
- name: Check out rialto
uses: actions/checkout@v3
with:
repository: rdkcentral/rialto
path: ./rialto
fetch-depth: 0
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install libunwind-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev libgstreamer1.0-dev
- name: Install protobuf
run: |
sudo apt-get install protobuf-compiler
- name: Switch branch
continue-on-error: true
run: |
BRANCH=${GITHUB_HEAD_REF##*/}
cd rialto
# This will fail if there's no corresponding branch in rialto
# ...but that's ok since we set continue-on-error
git checkout $BRANCH
- name: Native build Rialto
run: |
BASE_DIR=$(pwd)
NATIVE_DIR=$BASE_DIR/native
echo "NATIVE_DIR=$NATIVE_DIR" &> $BASE_DIR/output_file.txt
ls &>> $BASE_DIR/output_file.txt
cd rialto
cmake . -B build -DCMAKE_INSTALL_PREFIX=$NATIVE_DIR -DNATIVE_BUILD=ON -DRIALTO_BUILD_TYPE="Debug" &>> $BASE_DIR/output_file.txt
make -C build install &>> $BASE_DIR/output_file.txt
- name: Native build OCDM
run: |
BASE_DIR=$(pwd)
NATIVE_DIR=$BASE_DIR/native
cd rialto-ocdm
echo "@@@ OCDM BUILD" &>> $BASE_DIR/output_file.txt
cmake . -B build -DCMAKE_INCLUDE_PATH="${NATIVE_DIR}/include" -DCMAKE_LIBRARY_PATH="${NATIVE_DIR}/lib" -DNATIVE_BUILD=ON -DRIALTO_BUILD_TYPE="Debug" &>> $BASE_DIR/output_file.txt
make -C build &>> $BASE_DIR/output_file.txt
- name: Report Build Status Success
if: success()
run: |
echo "Build Succeeded!"
exit 0
- name: Upload Logs on Failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: Output Logs
path: |
output_file.txt