Debian Codegraph @

.github/workflows/build.yml

raw
1 name: Build and run tests
2 on: [push, pull_request]
3 env:
4 app_id: screensaver.pingpong
5
6 jobs:
7 build:
8 runs-on: ${{ matrix.os }}
9 strategy:
10 fail-fast: false
11 matrix:
12 include:
13 - name: "Debian package test"
14 os: ubuntu-latest
15 CC: gcc
16 CXX: g++
17 DEBIAN_BUILD: true
18 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
26 - name: Checkout Kodi repo
27 uses: actions/checkout@v4
28 with:
29 repository: xbmc/xbmc
30 ref: master
31 path: xbmc
32 - name: Checkout add-on repo
33 uses: actions/checkout@v4
34 with:
35 path: ${{ env.app_id }}
36 - name: Configure
37 env:
38 CC: ${{ matrix.CC }}
39 CXX: ${{ matrix.CXX }}
40 DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
41 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
46 - name: Build
47 env:
48 CC: ${{ matrix.CC }}
49 CXX: ${{ matrix.CXX }}
50 DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
51 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