-
Notifications
You must be signed in to change notification settings - Fork 6
172 lines (154 loc) · 5.37 KB
/
package.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
# SPDX-FileCopyrightText: 2002 BigBlueButton Inc. and by respective authors
#
# SPDX-License-Identifier: LGPL-3.0-or-later
name: Package build
on:
push:
branches: [ "main" ]
tags: [ "**" ]
paths-ignore:
- debian/changelog
pull_request:
branches: [ "main" ]
paths-ignore:
- debian/changelog
jobs:
ubuntu:
strategy:
matrix:
UBUNTU_VERSION: [ "20.04" ]
include:
- UBUNTU_VERSION: "20.04"
UBUNTU_CODENAME: focal
runs-on: ubuntu-latest
container: ubuntu:${{ matrix.UBUNTU_VERSION }}
defaults:
run:
shell: bash
steps:
- name: Install debian packaging tools
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common
add-apt-repository -y ppa:git-core/ppa
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends debhelper devscripts equivs git git-buildpackage pristine-tar
- name: Checkout source code
uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
- name: Set debian package version
env:
DEBFULLNAME: GitHub Actions
DEBEMAIL: hostmaster@blindsidenetworks.com
UBUNTU_CODENAME: ${{ matrix.UBUNTU_CODENAME }}
UBUNTU_VERSION: ${{ matrix.UBUNTU_VERSION }}
run: |
cd source
eval "$(./dch_version.sh | tee -a "${GITHUB_ENV}")"
dch --newversion "${DCH_VERSION}" --force-bad-version --distribution "${UBUNTU_CODENAME}" "Automatic Build"
- name: Cleanup .github directory
run: |
rm -r source/.github
- name: Install build dependencies
run: |
cd source
DEBIAN_FRONTEND=noninteractive mk-build-deps -i -r -t 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends'
- name: Build package
run: |
cd source
gbp buildpackage --git-ignore-new --git-ignore-branch --no-sign
ls ..
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ubuntu-${{ matrix.UBUNTU_VERSION }}
path: "*.deb"
amazonlinux-2:
runs-on: ubuntu-latest
container: amazonlinux:2
defaults:
run:
shell: bash
steps:
- name: Install Python and package build dependencies
run: |
amazon-linux-extras enable python3.8 ruby3.0
yum clean metadata
yum install -y \
python38 python38-devel python38-wheel \
git gcc make \
cairo-gobject-devel gobject-introspection-devel \
ruby ruby-devel ruby-irb rubygem-rake rubygem-json rubygems \
rpm-build
pip3.8 install virtualenv-tools3
gem install --no-document fpm
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 0
path: bbb-presentation-video
- name: Build and install package to image directory
run: |
python3.8 -m venv bbb-presentation-video-image/opt/bbb-presentation-video
bbb-presentation-video-image/opt/bbb-presentation-video/bin/python -m pip install ./bbb-presentation-video -c ./bbb-presentation-video/constraints-amazonlinux-2.txt
virtualenv-tools --update-path /opt/bbb-presentation-video bbb-presentation-video-image/opt/bbb-presentation-video
mkdir -pv bbb-presentation-video-image/usr/bin
ln -sv /opt/bbb-presentation-video/bin/bbb-presentation-video bbb-presentation-video-image/usr/bin
- name: Use fpm to build rpm package
run: |
pushd bbb-presentation-video
eval "$(./dch_version.sh)"
popd
fpm --verbose \
--name bbb-presentation-video \
--input-type dir \
--chdir bbb-presentation-video-image \
--output-type rpm \
--version "${DCH_VERSION}" \
--rpm-dist amzn2 \
--rpm-autoreqprov \
--depends python3.8 \
--depends gobject-introspection \
--depends poppler-glib \
--depends gdk-pixbuf2 \
--depends gtk3 \
--depends pango \
--depends liberation-fonts \
--depends ffmpeg \
.
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: amazonlinux-2
path: "*.rpm"
assets:
name: "Upload assets to release"
needs: [ ubuntu, amazonlinux-2 ]
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
permissions:
contents: write
actions: read
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: ubuntu-20.04
path: ubuntu-20.04
- uses: actions/download-artifact@v3
with:
name: amazonlinux-2
path: amazonlinux-2
- name: Create release asset archives
run: |
for asset in ubuntu-20.04 amazonlinux-2 ; do
zip --junk-paths --recurse-paths --compression-method store "${asset}.zip" "${asset}"
done
- name: Upload release assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for asset in ubuntu-20.04 amazonlinux-2 ; do
gh release upload ${{ github.ref_name }} "${asset}.zip"
done