Skip to content

Commit

Permalink
Merge pull request #30 from AlwinEsch/Matrix-change
Browse files Browse the repository at this point in the history
allow Debian build test by github workflow
  • Loading branch information
AlwinEsch authored Sep 26, 2021
2 parents 6dac446 + dfd194b commit c7e9473
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and run tests
on: [push, pull_request]
env:
app_id: audiodecoder.gsf

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "Debian package test"
os: ubuntu-18.04
CC: gcc
CXX: g++
DEBIAN_BUILD: true
#- os: ubuntu-18.04
#CC: gcc
#CXX: g++
#- os: ubuntu-18.04
#CC: clang
#CXX: clang++
#- os: macos-10.15
steps:
- name: Install needed ubuntu depends
env:
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
run: |
if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/ppa; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get update; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi
- name: Checkout Kodi repo
uses: actions/checkout@v2
with:
repository: xbmc/xbmc
ref: Matrix
path: xbmc
- name: Checkout audiodecoder.asap repo
uses: actions/checkout@v2
with:
path: ${{ env.app_id }}
- name: Configure
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
run: |
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir -p build && cd build; fi
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
if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/Matrix/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep ${{ github.workspace }}/${app_id}; fi
- name: Build
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
run: |
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id}/build; fi
if [[ $DEBIAN_BUILD != true ]]; then make; fi
if [[ $DEBIAN_BUILD == true ]]; then ./debian-addon-package-test.sh ${{ github.workspace }}/${app_id}; fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This is a [Kodi](https://kodi.tv) audio decoder addon for GSF files.

[![License: GPL-2.0-or-later](https://img.shields.io/badge/License-GPL%20v2+-blue.svg)](LICENSE.md)
[![Build and run tests](https://github.com/xbmc/audiodecoder.gsf/actions/workflows/build.yml/badge.svg?branch=Matrix)](https://github.com/xbmc/audiodecoder.gsf/actions/workflows/build.yml)
[![Build Status](https://dev.azure.com/teamkodi/binary-addons/_apis/build/status/xbmc.audiodecoder.gsf?branchName=Matrix)](https://dev.azure.com/teamkodi/binary-addons/_build/latest?definitionId=6&branchName=Matrix)
[![Build Status](https://jenkins.kodi.tv/view/Addons/job/xbmc/job/audiodecoder.gsf/job/Matrix/badge/icon)](https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Faudiodecoder.gsf/branches/)
<!--- [![Build Status](https://ci.appveyor.com/api/projects/status/github/xbmc/audiodecoder.gsf?branch=Matrix&svg=true)](https://ci.appveyor.com/project/xbmc/audiodecoder-gsf?branch=Matrix) -->
Expand Down

0 comments on commit c7e9473

Please sign in to comment.