Skip to content

Commit 510cf40

Browse files
committed
CI(Piers): sync build.yml from Omega and use xbmc master
1 parent a8c6b0f commit 510cf40

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,53 @@
1-
name: Build and run tests
1+
name: Build
22
on: [push, pull_request]
33
env:
44
app_id: pvr.iptvsimple
55

66
jobs:
77
build:
8-
runs-on: ${{ matrix.os }}
8+
runs-on: ubuntu-latest
99
strategy:
1010
fail-fast: false
1111
matrix:
1212
include:
13-
- name: "Debian package test"
14-
os: ubuntu-latest
15-
CC: gcc
16-
CXX: g++
17-
# DEBIAN_BUILD: true
13+
- name: "GCC build"
14+
CC: gcc
15+
CXX: g++
16+
- name: "Clang build"
17+
CC: clang
18+
CXX: clang++
1819
steps:
19-
- name: Install needed ubuntu depends
20-
env:
21-
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
22-
run: |
23-
if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly; fi
24-
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get update; fi
25-
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi
2620
- name: Checkout Kodi repo
27-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2822
with:
2923
repository: xbmc/xbmc
3024
ref: master
3125
path: xbmc
3226
- name: Checkout add-on repo
33-
uses: actions/checkout@v4
27+
uses: actions/checkout@v5
3428
with:
3529
path: ${{ env.app_id }}
30+
- name: Prepare
31+
run: |
32+
mkdir -p ${{ github.workspace }}/xbmc/cmake/addons/addons/${app_id}
33+
echo ${app_id} ${{ github.workspace }}/${app_id} > ${{ github.workspace }}/xbmc/cmake/addons/addons/${app_id}/${app_id}.txt
3634
- name: Configure
3735
env:
3836
CC: ${{ matrix.CC }}
3937
CXX: ${{ matrix.CXX }}
40-
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
4138
run: |
42-
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir -p build && cd build; fi
43-
if [[ $DEBIAN_BUILD != true ]]; then cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xbmc/addons -DPACKAGE_ZIP=1 ${{ github.workspace }}/xbmc/cmake/addons; fi
44-
if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi
45-
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep ${{ github.workspace }}/${app_id}; fi
39+
cmake \
40+
-B ${app_id}/build \
41+
-DADDONS_TO_BUILD=${app_id} \
42+
-DADDON_SRC_PREFIX=${{ github.workspace }} \
43+
-DADDONS_DEFINITION_DIR=${{ github.workspace }}/xbmc/cmake/addons/addons \
44+
-DCMAKE_BUILD_TYPE=Debug \
45+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xbmc/addons \
46+
-DPACKAGE_ZIP=1 \
47+
${{ github.workspace }}/xbmc/cmake/addons
4648
- name: Build
4749
env:
4850
CC: ${{ matrix.CC }}
4951
CXX: ${{ matrix.CXX }}
50-
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
5152
run: |
52-
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id}/build; fi
53-
if [[ $DEBIAN_BUILD != true ]]; then make; fi
54-
if [[ $DEBIAN_BUILD == true ]]; then ./debian-addon-package-test.sh ${{ github.workspace }}/${app_id}; fi
53+
make -C ${app_id}/build -j$(getconf _NPROCESSORS_ONLN)

0 commit comments

Comments
 (0)