Skip to content

Commit c28dc58

Browse files
committed
[CI] GitHub Actions: add Linux build (gcc & clang)
1 parent 02412d4 commit c28dc58

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build
2+
on: [push, pull_request]
3+
env:
4+
app_id: peripheral.joystick
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- name: "GCC build"
14+
CC: gcc
15+
CXX: g++
16+
- name: "Clang build"
17+
CC: clang
18+
CXX: clang++
19+
steps:
20+
- name: Install gperf
21+
run: |
22+
sudo apt-get update -qq
23+
sudo apt-get install -y gperf
24+
- name: Checkout Kodi repo
25+
uses: actions/checkout@v5
26+
with:
27+
repository: xbmc/xbmc
28+
ref: Omega
29+
path: xbmc
30+
- name: Checkout add-on repo
31+
uses: actions/checkout@v5
32+
with:
33+
path: ${{ env.app_id }}
34+
- name: Prepare
35+
run: |
36+
mkdir -p ${{ github.workspace }}/xbmc/cmake/addons/addons/${app_id}
37+
echo ${app_id} ${{ github.workspace }}/${app_id} > ${{ github.workspace }}/xbmc/cmake/addons/addons/${app_id}/${app_id}.txt
38+
- name: Configure
39+
env:
40+
CC: ${{ matrix.CC }}
41+
CXX: ${{ matrix.CXX }}
42+
run: |
43+
cmake \
44+
-B ${app_id}/build \
45+
-DADDONS_TO_BUILD=${app_id} \
46+
-DADDON_SRC_PREFIX=${{ github.workspace }} \
47+
-DADDONS_DEFINITION_DIR=${{ github.workspace }}/xbmc/cmake/addons/addons \
48+
-DCMAKE_BUILD_TYPE=Debug \
49+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xbmc/addons \
50+
-DPACKAGE_ZIP=1 \
51+
${{ github.workspace }}/xbmc/cmake/addons
52+
- name: Build
53+
env:
54+
CC: ${{ matrix.CC }}
55+
CXX: ${{ matrix.CXX }}
56+
run: |
57+
make -C ${app_id}/build -j$(getconf _NPROCESSORS_ONLN)

0 commit comments

Comments
 (0)