Repository navigation
96 lines (82 loc) · 3.46 KB
/
Copy pathLinux build template.yml
File metadata and controls
96 lines (82 loc) · 3.46 KB
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
name: Linux build template
permissions:
contents: read
on:
workflow_call:
jobs:
ThunderClientLibraries:
runs-on: ubuntu-24.04
strategy:
matrix:
build_type: [Debug, Release, MinSizeRel]
architecture: [32, 64]
# --------- Packages & artifacts ---------
name: Build type - ${{matrix.build_type}}${{matrix.architecture == '32' && ' x86' || ''}}
steps:
- name: Install system dependencies
uses: rdkcentral/ThunderTools/.github/actions/apt-dependencies@master
with:
architecture: ${{ matrix.architecture }}
- name: Set up Python environment
run: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install jsonref
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ThunderInterfaces-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact
path: ${{matrix.build_type}}
- name: Unpack files
run: |
tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz
rm ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz
# ----- Regex & checkout -----
- name: Checkout ThunderClientLibraries
uses: actions/checkout@v5
with:
path: ThunderClientLibraries
repository: ${{github.repository_owner}}/ThunderClientLibraries
- name: Regex ThunderClientLibraries
if: contains(github.event.pull_request.body, '[Options:')
id: clientlibs
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '(?<=\[Options:).*(?=\])'
regex_flags: 'gim'
search_string: ${{github.event.pull_request.body}}
# ----- Building & uploading -----
- name: Build ThunderClientLibraries
run: |
source venv/bin/activate
${{matrix.architecture == '32' && 'export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:$PKG_CONFIG_PATH' || 'PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH'}}
cmake -G Ninja -S ThunderClientLibraries -B ${{matrix.build_type}}/build/ThunderClientLibraries \
-DCMAKE_CXX_FLAGS="-m${{matrix.architecture}}" \
-DCMAKE_C_FLAGS="-m${{matrix.architecture}}" \
-DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \
-DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \
-DBLUETOOTHAUDIOSINK=ON \
-DBLUETOOTHAUDIOSOURCE=ON \
-DCDMI=ON \
-DCOMPOSITORCLIENT=ON \
-DPLUGIN_COMPOSITOR_IMPLEMENTATION=Mesa \
-DCRYPTOGRAPHY=ON \
-DCRYPTOGRAPHY_IMPLEMENTATION="OpenSSL" \
-DDEVICEINFO=ON \
-DDISPLAYINFO=ON \
-DGRAPHICSBUFFER=ON \
-DLOCALTRACER=ON \
-DSECURITYAGENT=ON \
-DPLAYERINFO=ON \
-DPROTOCOLS=ON \
-DVIRTUALINPUT=ON \
${{steps.clientlibs.outputs.first_match}}
cmake --build ${{matrix.build_type}}/build/ThunderClientLibraries --target install
- name: Tar files
run: tar -czvf ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz ${{matrix.build_type}}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ThunderClientLibraries-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact
path: ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz