-
Notifications
You must be signed in to change notification settings - Fork 21
203 lines (197 loc) · 7.56 KB
/
release.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
name: autobuild
on:
push:
tags:
- "v*"
jobs:
mac:
runs-on: macos-11
strategy:
matrix:
ui: [cli, gui]
include:
- ui: cli
clionly: --with-gui=no
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install ghostscript glib gdk-pixbuf dylibbundler create-dmg
- name: install prerequisites (GUI)
if: matrix.ui == 'gui'
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install gtk+
- name: configure
run: |
set +x
./configure ${{ matrix.clionly }} --with-werror
- name: make
run: |
cat Makefile.config
make -j$(sysctl -n hw.ncpu || 2)
- name: check executability
run: ./dvdisaster --version
- name: check executable (GUI)
if: matrix.ui == 'gui'
run: |
./dvdisaster --version
if ./dvdisaster --version | grep NOGUI; then exit 1; fi
- name: check executable (CLI)
if: matrix.ui == 'cli'
run: |
./dvdisaster --version
./dvdisaster --version | grep NOGUI
- name: build dist
run: ./.github/workflows/make-mac-app.sh ${{ github.ref }}
id: dist
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.dist.outputs.archive }}
draft: true
win:
runs-on: windows-latest
strategy:
matrix:
arch: [x86_64, i686]
ui: [cli, gui]
include:
- arch: x86_64
msystem: MINGW64
grep: x86-64
- arch: i686
msystem: MINGW32
grep: 386
- ui: cli
clionly: --with-gui=no
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: false
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
- name: install GUI prereqs
if: matrix.ui == 'gui'
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2
- name: git config
run: git config --global core.autocrlf input
shell: bash
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: configure
run: ./configure ${{ matrix.clionly }}
- name: make
run: nproc && make -j$(nproc)
- name: check executable
run: |
./dvdisaster.exe --version
file dvdisaster.exe
if ./dvdisaster.exe --version | grep dirty; then exit 1; fi
file dvdisaster.exe | grep -q '${{ matrix.grep }}, for MS Windows'
- name: check executable (GUI)
if: matrix.ui == 'gui'
run: if ./dvdisaster.exe --version | grep NOGUI; then exit 1; fi
- name: check executable (CLI)
if: matrix.ui == 'cli'
run: ./dvdisaster.exe --version | grep NOGUI
- name: prepare dist
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
id: dist
- name: check executability of dist from cmd.exe
shell: cmd
run: |
cd dist
dvdisaster.exe --version
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.dist.outputs.archive }}
draft: true
linux64-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man
- name: configure
run: ./configure --with-gui=no
- name: make
run: nproc && make -j$(nproc) && make static && mv -f dvdisaster-static dvdisaster
- name: check executable
run: |
./dvdisaster --version && ./dvdisaster --version | grep -q dirty || true
file dvdisaster && file dvdisaster | grep -q 'ELF 64' && file dvdisaster | grep -q 'statically linked'
- name: build dist
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
id: dist
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.dist.outputs.archive }}
draft: true
linux64-appimage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites on host
run: sudo apt-get update && sudo apt-get install -y fuse
- name: docker
run: |
mkdir -p /tmp/dist
docker run --device /dev/fuse --privileged --name uu -d -v $PWD:/code -v /tmp/dist:/dist ubuntu:14.04 sleep 1800
- name: install prerequisites in docker
run: docker exec uu sh -c 'sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man libgtk2.0-dev gtk2-engines-pixbuf gtk2-engines libgail-common pkg-config gnome-themes-standard fuse'
- name: configure in docker
run: docker exec uu sh -c 'cd /code && ./configure --prefix=/usr'
- name: make in docker
run: docker exec uu sh -c 'make -C /code -j$(nproc) && make -C /code'
- name: make install in docker
run: docker exec uu sh -c 'cd /code && touch documentation/user-manual/manual.pdf && make install DESTDIR=/dist'
- name: copy things to dist in docker
run: |
docker exec uu sh -c 'install -d /dist/usr/lib/gtk-2.0 && cp -va $(pkg-config --variable=libdir gtk+-2.0)/gtk-2.0/$(pkg-config --variable=gtk_binary_version gtk+-2.0)/* /dist/usr/lib/gtk-2.0'
docker exec uu sh -c 'cp -va $(pkg-config --variable=libdir gtk+-2.0)/gtk-2.0/modules /dist/usr/lib/gtk-2.0/'
- name: build appimage in docker
run: |
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod 755 linuxdeploy-x86_64.AppImage
docker exec -e LINUXDEPLOY_OUTPUT_VERSION=$(echo "${{ github.ref }}" | grep -Eo '[^/]+$') -e ARCH=x86_64 uu sh -c 'cd /code && ./linuxdeploy-x86_64.AppImage -d contrib/dvdisaster.desktop -i contrib/dvdisaster64.png -i contrib/dvdisaster48.png -i contrib/dvdisaster32.png -i contrib/dvdisaster16.png --icon-filename dvdisaster --custom-apprun=contrib/AppRun.sh --appdir /dist/ --output appimage'
- name: fix perms
run: docker exec uu sh -c "chown -R $UID /dist /code/*.AppImage"
- name: apply glib workaround
env:
ARCH: x86_64
run: |
wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod 755 appimagetool-x86_64.AppImage
exe=$(ls -1 dvdisaster*.AppImage)
chmod 755 $exe
./$exe --appimage-extract
rm -vf $exe
env LINUXDEPLOY_OUTPUT_VERSION=$(echo "${{ github.ref }}" | grep -Eo '[^/]+$') ./appimagetool-x86_64.AppImage -v squashfs-root
mv -v dvdisaster*AppImage $exe
chmod 755 $exe
- name: test appimage
id: dist
run: |
chmod 755 dvdisaster*.AppImage && ./dvdisaster*.AppImage --version
archive=$(ls -1 dvdisaster*.AppImage)
echo "archive=$archive" >> "$GITHUB_OUTPUT"
echo "appimage is <$archive>"
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.dist.outputs.archive }}
draft: true