-
Notifications
You must be signed in to change notification settings - Fork 10
189 lines (156 loc) · 6.12 KB
/
build-mythtv-core.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
---
name: Build MythTV core variants
#
# This workflow is intended to provide good coverage
# quickly to insure that the build "basically" works.
#
# The containers are selected to be from the set of
# linux distributions and versions that are currently
# among the list (or will soon be for beta/rc) of the
# MythTV project lists of supported variants (which
# are Ubuntu LTS and current, Debian stable, and Fedora
# current and current-1.
#
# If the github cache (used for the compiler ccache)
# has not been flushed, this job should run in about
# 10 minutes. If it has been flushed it may take
# around an hour to run.
#
on: # yamllint disable-line rule:truthy
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build-mythtv-linux:
name: Building ${{ matrix.branch.desc }} on ${{ matrix.container.desc }}
runs-on: ubuntu-latest
env:
TZ: Etc/UTC
MYTHTV_CONFIG_PREFIX: ${{ github.workspace }}/build/install
MYTHTV_CONFIG_EXTRA:
CCACHE_DIR: $HOME/.ccache
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 250M
strategy:
matrix:
container:
# Ubuntu group
- desc: 'Ubuntu 22.04 LTS (Jammy Jellyfish)'
image: 'ubuntu:22.04'
ansibleopts: '--limit localhost'
configureopts: ''
- desc: 'Ubuntu 23.10 (Mantic Minotaur)'
image: 'ubuntu:23.10'
ansibleopts: '--limit localhost'
configureopts: ''
- desc: 'Ubuntu 24.04 LTS (Noble Numbat)'
image: 'ubuntu:24.04'
ansibleopts: '--limit localhost'
configureopts: ''
# Debian group
- desc: 'Debian 11 (Bullseye)'
image: 'debian:bullseye'
ansibleopts: '--limit localhost'
configureopts: ''
- desc: 'Debian 12 (Bookworm)'
image: 'debian:bookworm'
ansibleopts: '--limit localhost'
configureopts: ''
# Fedora group
- desc: 'Fedora 38'
image: 'quay.io/fedora/fedora:38'
ansibleopts: '--limit localhost'
configureopts: ''
- desc: 'Fedora 39'
image: 'quay.io/fedora/fedora:39'
ansibleopts: '--limit localhost'
configureopts: ''
- desc: 'Fedora 40'
image: 'quay.io/fedora/fedora:40'
ansibleopts: '--limit localhost'
configureopts: ''
branch:
- desc: 'MythTV master'
repository: 'MythTV/mythtv'
ref: 'master'
ansibleopts: ''
configureopts: ''
fail-fast: false
container:
image: ${{ matrix.container.image }}
steps:
- name: Detect OS release
run: |
. /etc/os-release
echo "OS_RELEASE_ID=$ID" >> $GITHUB_ENV
echo "OS_RELEASE_VERSION=$VERSION_ID" >> $GITHUB_ENV
echo "OS_RELEASE_VERSION_MAJOR=${VERSION_ID%%.*}" >> $GITHUB_ENV
echo "OS_RELEASE_VERSION_CODENAME=$VERSION_CODENAME" >> $GITHUB_ENV
- name: Debian OS obtain codename for prerelease vesions
run: echo "OS_RELEASE_VERSION_CODENAME=`dpkg --status tzdata | grep 'Provides' | cut -f2 -d'-'`" >> $GITHUB_ENV
if: env.OS_RELEASE_ID == 'debian' && env.OS_RELEASE_VERSION_CODENAME == ''
- name: Debian/Ubuntu OS update
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt update -y
apt upgrade -y
if: env.OS_RELEASE_ID == 'debian' || env.OS_RELEASE_ID == 'ubuntu'
- name: Debian/Ubuntu OS install ansible
env:
DEBIAN_FRONTEND: noninteractive
run: apt install ansible apt-utils -y
if: env.OS_RELEASE_ID == 'debian' || env.OS_RELEASE_ID == 'ubuntu'
- name: Redhat OS - add EPEL repo for EL linux (for ansible)
run: dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-${{ env.OS_RELEASE_VERSION_MAJOR }}.noarch.rpm
if: env.OS_RELEASE_ID == 'centos' || env.OS_RELEASE_ID == 'rocky'
- name: Redhat/Fedora OS update
run: dnf upgrade -y
if: env.OS_RELEASE_ID == 'fedora' || env.OS_RELEASE_ID == 'centos' || env.OS_RELEASE_ID == 'rocky'
- name: Redhat/Fedora OS install ansible
run: dnf install ansible dnf-plugins-core -y
if: env.OS_RELEASE_ID == 'fedora' || env.OS_RELEASE_ID == 'centos' || env.OS_RELEASE_ID == 'rocky'
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
path: ansible
- name: Run ansible to install build requirements
working-directory: ansible
run: ansible-playbook ${{ matrix.container.ansibleopts }} ${{ matrix.branch.ansibleopts }} mythtv.yml
- name: Checkout Mythtv/mythtv repository
uses: actions/checkout@v4
with:
repository: ${{ matrix.branch.repository }}
ref: ${{ matrix.branch.ref }}
path: mythtv
- name: Checkout ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ matrix.container.image }}-build-core-ccache-${{ github.sha }}
restore-keys: ${{ matrix.container.image }}-build-core-ccache
- name: ccache statistics [pre]
run: ccache -s
- name: Configure core
working-directory: mythtv/mythtv
run: ./configure --compile-type=release --enable-debug=0 --disable-debug --prefix=${{ env.MYTHTV_CONFIG_PREFIX }} ${{ env.MYTHTV_CONFIG_EXTRA }} ${{ matrix.container.configureopts }} ${{ matrix.branch.configureopts }}
- name: Make core
working-directory: mythtv/mythtv
run: make all_no_test -j4
- name: Install core
working-directory: mythtv/mythtv
run: make install
- name: Configure plugins
working-directory: mythtv/mythplugins
run: ./configure --prefix=${{ env.MYTHTV_CONFIG_PREFIX }}
- name: Make plugins
working-directory: mythtv/mythplugins
run: make -j4
- name: Install plugins
working-directory: mythtv/mythplugins
run: make install
- name: ccache statistics [post]
run: ccache -s