|
5 | 5 | branches: ["main"] |
6 | 6 | pull_request: |
7 | 7 | branches: ["main"] |
8 | | - workflow_call: |
9 | 8 |
|
10 | 9 | jobs: |
11 | 10 | Thunder: |
12 | | - uses: rdkcentral/Thunder/.github/workflows/Build Thunder on Linux.yml@master |
| 11 | + uses: rdkcentral/Thunder/.github/workflows/Linux build template.yml@master |
13 | 12 |
|
14 | 13 | ThunderLibraries: |
15 | 14 | needs: Thunder |
16 | | - |
17 | | - runs-on: ubuntu-latest |
18 | | - |
19 | | - strategy: |
20 | | - matrix: |
21 | | - build_type: [Debug, Release, MinSizeRel] |
22 | | - |
23 | | - name: Build type - ${{matrix.build_type}} |
24 | | - steps: |
25 | | - - name: Install necessary packages |
26 | | - uses: nick-fields/retry@v2 |
27 | | - with: |
28 | | - timeout_minutes: 10 |
29 | | - max_attempts: 10 |
30 | | - command: | |
31 | | - sudo gem install apt-spy2 |
32 | | - sudo apt-spy2 fix --commit --launchpad --country=US |
33 | | - sudo apt-get update |
34 | | - sudo apt install python3-pip |
35 | | - pip install jsonref |
36 | | - sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev |
37 | | -
|
38 | | - - name: Checkout Thunder |
39 | | - uses: actions/checkout@v3 |
40 | | - with: |
41 | | - path: Thunder |
42 | | - repository: rdkcentral/Thunder |
43 | | - |
44 | | - - name: Download artifacts |
45 | | - uses: actions/download-artifact@v3 |
46 | | - with: |
47 | | - name: Thunder-${{matrix.build_type}}-artifact |
48 | | - path: ${{matrix.build_type}} |
49 | | - |
50 | | - - name: Unpack files |
51 | | - run: | |
52 | | - tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz |
53 | | - rm ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz |
54 | | -
|
55 | | - - name: Checkout ThunderLibraries |
56 | | - uses: actions/checkout@v3 |
57 | | - with: |
58 | | - path: ThunderLibraries |
59 | | - repository: ${{github.repository_owner}}/ThunderLibraries |
60 | | - |
61 | | - - name: Regex ThunderLibraries |
62 | | - if: contains(github.event.pull_request.body, '[Options:') |
63 | | - id: libs |
64 | | - uses: AsasInnab/regex-action@v1 |
65 | | - with: |
66 | | - regex_pattern: '(?<=\[Options:).*(?=\])' |
67 | | - regex_flags: 'gim' |
68 | | - search_string: ${{github.event.pull_request.body}} |
69 | | - |
70 | | - - name: Build ThunderLibraries |
71 | | - run: | |
72 | | - cmake -G Ninja -S ThunderLibraries -B ${{matrix.build_type}}/build/ThunderLibraries \ |
73 | | - -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror" \ |
74 | | - -DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \ |
75 | | - -DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \ |
76 | | - -DBROADCAST=ON \ |
77 | | - ${{steps.libs.outputs.first_match}} |
78 | | - cmake --build ${{matrix.build_type}}/build/ThunderLibraries --target install |
79 | | -
|
80 | | - - name: Tar files |
81 | | - run: tar -czvf ${{matrix.build_type}}.tar.gz ${{matrix.build_type}} |
82 | | - |
83 | | - - name: Upload |
84 | | - uses: actions/upload-artifact@v3 |
85 | | - with: |
86 | | - name: ThunderLibraries-${{matrix.build_type}}-artifact |
87 | | - path: ${{matrix.build_type}}.tar.gz |
| 15 | + uses: WebPlatformForEmbedded/ThunderLibraries/.github/workflows/Linux build template.yml@main |
0 commit comments