-
Notifications
You must be signed in to change notification settings - Fork 27
223 lines (202 loc) · 6.99 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
---
name: Build packages
"on":
push:
branches: [main]
env:
inweb_tag: v7.2.0
intest_tag: v2.1.0
inform_tag: v10.1.2
inweb_short_sha: 60735b4
intest_short_sha: 45b6278
inform_short_sha: 1f43d73
version: '2.0.0'
QA_RPATHS: 1
DEB_BUILD_MAINT_OPTIONS: hardening=-format
jobs:
flatpak:
name: Flatpak
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-45
options: --privileged
steps:
- uses: actions/checkout@v2
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
branch: main
bundle: inform7-flatpak.flatpak
manifest-path: build-aux/com.inform7.IDE.yml
rpm:
name: RPM
runs-on: ubuntu-latest
container:
image: registry.fedoraproject.org/fedora:37
steps:
- name: install-deps
run: |
dnf install -y \
gcc \
gcc-c++ \
gettext \
git \
glib2-devel \
goocanvas2-devel \
gspell-devel \
gstreamer1-devel \
gstreamer1-plugins-bad-free \
gstreamer1-plugins-bad-free-extras \
gstreamer1-plugins-base \
gstreamer1-plugins-good \
gtk3-devel \
gtksourceview4-devel \
libhandy-devel \
libplist-devel \
meson \
rpm-build \
rsync \
webkit2gtk4.1-devel
- name: Checkout Inweb
uses: actions/checkout@v3
with:
repository: ganelson/inweb
ref: v7.2.0
path: inweb
- name: Checkout Intest
uses: actions/checkout@v3
with:
repository: ganelson/intest
ref: v2.1.0
path: intest
- name: Checkout Inform
uses: actions/checkout@v3
with:
repository: ganelson/inform
ref: v10.1.2
path: inform
- name: Checkout Inform IDE
uses: actions/checkout@v3
with:
path: inform7-ide
- name: Download subprojects
run: |
cd inform7-ide
meson subprojects download chimara ratify
- name: Create Archives
# The RPM spec file assumes .zip sources of the Intools that are
# downloaded from GitHub's "archive" API endpoint. However, for whatever
# reason that endpoint doesn't work reliably in this CI environment, and
# sometimes downloads 0-size files. So we use "git archive", and add an
# appropriate directory prefix and name the file after the commit hash.
#
# For the inform7-ide-2.0.0.tar.xz, the RPM spec file expects an archive
# output by meson dist --include-subprojects. However, for whatever
# reason, that doesn't work either in this CI environment. We get the
# message "meson dist only works in a git checkout". So, we download the
# subprojects in the previous step, and archive the directory with tar,
# making sure to put the files in the expected inform7-ide-2.0.0/ path.
run: |
mkdir -p /github/home/rpmbuild/SOURCES/
cd inweb
git archive -o \
"/github/home/rpmbuild/SOURCES/ganelson-inweb-$inweb_tag-0-g$inweb_short_sha.tar.gz" \
--prefix="ganelson-inweb-$inweb_short_sha/" $inweb_short_sha
cd ../intest
git archive -o \
"/github/home/rpmbuild/SOURCES/ganelson-intest-$intest_tag-0-g$intest_short_sha.tar.gz" \
--prefix="ganelson-intest-$intest_short_sha/" $intest_short_sha
cd ../inform
git archive -o \
"/github/home/rpmbuild/SOURCES/ganelson-inform-$inform_tag-0-g$inform_short_sha.tar.gz" \
--prefix="ganelson-inform-$inform_short_sha/" $inform_short_sha
cd ..
tar cJf "/github/home/rpmbuild/SOURCES/inform7-ide-$version.tar.xz" \
--xform "s:^inform7-ide/:inform7-ide-$version/:" inform7-ide
- name: build-rpm
run: |
cd inform7-ide
rpmbuild -ba inform7-ide.spec
cd ..
cp "$(rpm --eval %_rpmdir)/$(rpm --eval %_target_cpu)"/inform7-*.rpm \
"$(rpm --eval %_srcrpmdir)"/inform7-*.src.rpm .
ls -l
- uses: actions/upload-artifact@v1
with:
name: RPM package
path: inform7-ide-2.0.0-1.fc37.x86_64.rpm
deb:
name: Debian
runs-on: ubuntu-latest
steps:
- name: install-deps
run: |
sudo apt-get update
sudo apt install -y libunwind-dev
sudo apt-get -y install \
debhelper \
devscripts \
gstreamer1.0-plugins-bad \
gstreamer1.0-tools \
libgoocanvas-2.0-dev \
libgspell-1-dev \
libgstreamer1.0-dev \
libgtk-3-dev \
libgtksourceview-4-dev \
libhandy-1-dev \
libplist-dev \
libwebkit2gtk-4.1-dev \
libxml2-utils \
meson
- name: Checkout Inform IDE
uses: actions/checkout@v3
- name: Checkout Inweb
uses: actions/checkout@v3
with:
repository: ganelson/inweb
ref: v7.2.0
path: inweb
- name: Checkout Intest
uses: actions/checkout@v3
with:
repository: ganelson/intest
ref: v2.1.0
path: intest
- name: Checkout Inform
uses: actions/checkout@v3
with:
repository: ganelson/inform
ref: v10.1.2
path: inform
- name: Download subprojects
run: meson subprojects download chimara ratify
- name: Create Archives
# Here, we have to create the files somewhat differently than for
# building the RPM package. Debian has quite a lot stricter requirements
# for how subsequent source packages can be packed and unpacked. We once
# again use git archive, but here the tarballs from GitHub's API
# endpoint are not sufficient.
#
# For the inform7-ide-2.0.0.tar.xz, we do the same trick as above with
# RPM, but we have to be more careful about what we put in the archive.
run: |
cd inweb
git archive -o "../../inform7-ide_$version.orig-inweb.tar.gz" \
$inweb_short_sha
cd ../intest
git archive -o "../../inform7-ide_$version.orig-intest.tar.gz" \
$intest_short_sha
cd ../inform
git archive -o "../../inform7-ide_$version.orig-inform.tar.gz" \
$inform_short_sha
cd ..
tar cJf "../inform7-ide_$version.orig.tar.xz" \
--xform "s:^:inform7-ide-$version/:" \
COPYING INSTALL.md README.md com.inform7.IDE.* \
meson.build *.spec *.xml \
.clangd .github .tx build-aux data debian pixmaps po src subprojects
- name: build-deb
run: debuild -rfakeroot -D -us -uc
- uses: actions/upload-artifact@v1
with:
name: Debian package
path: ../inform7-ide_2.0.0-1_amd64.deb