-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (79 loc) · 2.84 KB
/
Build ThunderLibraries on Linux.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
name: Build ThunderLibraries on Linux
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_call:
jobs:
ThunderInterfaces:
uses: rdkcentral/ThunderInterfaces/.github/workflows/Build ThunderInterfaces on Linux.yml@master
ThunderLibraries:
needs: ThunderInterfaces
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, Release, MinSizeRel]
name: Build type - ${{matrix.build_type}}
steps:
- name: Install necessary packages
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 10
command: |
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
sudo apt install python3-pip
pip install jsonref
sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev
- name: Checkout Thunder
uses: actions/checkout@v3
with:
path: Thunder
repository: rdkcentral/Thunder
- name: Checkout ThunderInterfaces
uses: actions/checkout@v3
with:
path: ThunderInterfaces
repository: rdkcentral/ThunderInterfaces
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: ThunderInterfaces-${{matrix.build_type}}-artifact
path: ${{matrix.build_type}}
- name: Unpack files
run: |
tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz
rm ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz
- name: Checkout ThunderLibraries
uses: actions/checkout@v3
with:
path: ThunderLibraries
repository: ${{github.repository_owner}}/ThunderLibraries
- name: Regex ThunderLibraries
if: contains(github.event.pull_request.body, '[Options:')
id: libs
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '(?<=\[Options:).*(?=\])'
regex_flags: 'gim'
search_string: ${{github.event.pull_request.body}}
- name: Build ThunderLibraries
run: |
cmake -G Ninja -S ThunderLibraries -B ${{matrix.build_type}}/build/ThunderLibraries \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror" \
-DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \
-DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \
-DBROADCAST=ON \
-DCOMPOSITOR_BUFFER=ON \
${{steps.libs.outputs.first_match}}
cmake --build ${{matrix.build_type}}/build/ThunderLibraries --target install
- name: Tar files
run: tar -czvf ${{matrix.build_type}}.tar.gz ${{matrix.build_type}}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ThunderLibraries-${{matrix.build_type}}-artifact
path: ${{matrix.build_type}}.tar.gz