-
Notifications
You must be signed in to change notification settings - Fork 17
228 lines (192 loc) · 8.66 KB
/
ci.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
224
225
226
227
228
name: ci
on: [push, pull_request]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container: [ "ubuntu:latest", "ubuntu:22.04", "debian:12", "debian:11", "archlinux:base" ]
container:
image: ${{ matrix.container }}
options: --privileged
steps:
- uses: actions/checkout@v4
- name: setup build environment
run: |
case "${{ matrix.container }}" in
ubuntu*|debian*)
apt update
apt upgrade -y
apt install -y build-essential flex libutempter-dev libgtk-3-dev libvterm-dev libvte-2.91-dev libsdl2-dev libfribidi-dev libuim-dev libfcitx5core-dev libfcitx5gclient-dev libscim-dev libibus-1.0-dev libm17n-dev libwnn-dev libcanna1g-dev libssh2-1-dev curl unzip protobuf-compiler libprotobuf-dev libncurses-dev libssl-dev default-jdk libswt-gtk-4-java
;;
archlinux*)
pacman -Syyu --noconfirm base-devel intltool libutempter wayland gtk3 libvterm vte3 sdl2 fribidi fcitx5 fcitx5-gtk scim ibus m17n-lib libssh2 curl unzip protobuf
;;
esac
- name: configure
run: |
(cd uitoolkit/wayland && sh ./rescanproto.sh)
curl -L https://github.com/arakiken/mosh/archive/refs/heads/sixel-winsock.zip > mosh.zip
unzip mosh.zip
(cd mosh-sixel-winsock; autoconf; ./configure)
CONFIGURE_ARGS="--with-gui=xlib,fb,console,wayland,sdl2 --with-mosh=$PWD/mosh-sixel-winsock"
CFLAGS="-Wall -Werror=incompatible-pointer-types -g -O2" ./configure --enable-debug ${CONFIGURE_ARGS}
- name: build
run: |
make
make install
(cd libvterm && make && make install)
(cd gtk && make && make install)
java_ver=`javac --version|sed 's/javac \([0-9]*\).*/\1/'`
if test "$java_ver" != ""; then (cd java; cat Makefile | sed s/java-23-openjdk/java-${java_ver}-openjdk-amd64/ > Makefile.2; mv Makefile.2 Makefile; make); fi
(cd main; ./mlterm --test --logmsg=false)
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26d
- name: build
run: |
(cd android; ./prepare-gradle.sh $HOME/mlterm-android 8.8.0)
(cd $HOME/mlterm-android; ./build-gradle.sh)
mkdir dist; cp `find $HOME/mlterm-android -name *.apk` dist
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mlterm-android
path: dist/*.apk
build-macos:
strategy:
matrix:
os: [ macos-latest, macos-13 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: setup build environment
run: |
brew install gtk+3
- name: configure
run: |
CONFIGURE_ARGS="--prefix=$HOME/mlterm --with-gui=quartz"
CFLAGS="-Wall -Werror=incompatible-pointer-types -g -O2" ./configure ${CONFIGURE_ARGS}
- name: build
run: |
rm tool/mlconfig/po/Makefile
make
sudo make install
cp -R cocoa/mlterm.app ~/
cocoa/install.sh ~/mlterm
mkdir dist
mv ~/mlterm.app dist/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mlterm-${{ matrix.os }}
path: dist/**
build-netbsd:
name: "build-netbsd (NetBSD/amd64 10.1 with pkgsrc)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages and run configure and make (on the NetBSD VM)
uses: vmactions/netbsd-vm@v1
with:
release: "10.1"
copyback: false
prepare: |
ftp -o - https://cdn.NetBSD.org/pub/NetBSD/NetBSD-`uname -r`/amd64/binary/sets/xbase.tar.xz | tar -C / -zxpf - ./usr/X11R7/bin ./usr/X11R7/include ./usr/X11R7/lib ./usr/X11R7/share
ftp -o - https://cdn.NetBSD.org/pub/NetBSD/NetBSD-`uname -r`/amd64/binary/sets/xcomp.tar.xz | tar -C / -zxpf - ./usr/X11R7/bin ./usr/X11R7/include ./usr/X11R7/lib ./usr/X11R7/share
# Explicitly update glib2 first. It has been pre-installed by
# vmactions/netbsd-builder for fuse-sshfs
pkg_add -u glib2
pkg_add -u pkgconf gettext-tools libtool-base
pkg_add -u cairo Canna-lib fribidi gdk-pixbuf2 gtk3+ fcitx ibus m17n-lib harfbuzz scim uim ja-FreeWnn-lib libXft SDL2 libssh2 vte3
run: |
CFLAGS="-Wall -Werror=incompatible-pointer-types -g -O2" CPPFLAGS="-I/usr/pkg/include" ./configure --x-includes=/usr/X11R7/include --x-libraries=/usr/X11R7/lib --with-imagelib=gdk-pixbuf --with-gui=xlib,wscons,sdl2 --with-type-engins=xcore,xft,cairo --enable-anti-alias
make
make install
(cd gtk && make && make install)
build-freebsd:
name: "build-freebsd (FreeBSD/amd64 14.2 with ports)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages and run configure and make (on the FreeBSD VM)
uses: vmactions/freebsd-vm@v1
with:
release: "14.2"
copyback: false
prepare: |
pkg install -y pkgconf perl5 libtool desktop-file-utils glib cairo gdk-pixbuf2 gtk3 vte3 libssh2 fontconfig freetype2 fribidi uim m17n-lib scim ibus ja-FreeWnn-lib ja-canna-lib sdl2
run: |
CFLAGS="-Wall -Werror=incompatible-pointer-types -g -O2" CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -Wl,--undefined-version" ./configure --with-imagelib=gdk-pixbuf --with-gui=xlib,fb,sdl2 --with-type-engins=xcore,xft,cairo --enable-anti-alias
make
make install
(cd gtk && make && make install)
build-msys2-with-mosh:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: git make mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-libssh2 mingw-w64-ucrt-x86_64-gtk3 unzip mingw-w64-ucrt-x86_64-autotools mingw-w64-ucrt-x86_64-protobuf
- name: build
run: |
curl -L https://github.com/arakiken/mosh/archive/refs/heads/sixel-winsock.zip > mosh.zip
unzip mosh.zip
sed 's/^Libs:.\(.*\)/Libs:\1 -lws2_32/' /ucrt64/lib/pkgconfig/libssh2.pc > libssh2.pc; mv libssh2.pc /ucrt64/lib/pkgconfig
(cd mosh-sixel-winsock; autoconf; ./configure)
CFLAGS="-Wall -g -O2" ./configure --with-gui=win32 --with-mosh=$PWD/mosh-sixel-winsock
make
DESTDIR=/tmp make install
mkdir dist
cp /tmp/ucrt64/bin/*.exe /tmp/ucrt64/bin/*.dll /tmp/ucrt64/lib/*/*.dll dist/
mt=`ls /c/Program\ Files\ \(x86\)\/Windows\ Kits\/*\/bin\/*\/x64\/mt.exe | head -n 1`
echo $mt
if test "$mt" != ""; then for f in dist/*.exe; do "$mt" -manifest win32/mlterm.manifest -outputresource:$f; done; fi
(cd dist; ldd *.exe libptymosh.dll libptyssh.dll | sed -n 's/.*=> \([^ ]*\) .*/\1/p' | grep --ignore-case -v /WINDOWS/ | grep -v /dist/ | xargs | sed 's/\(.*\)/cp \1 ./' | sh)
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mlterm-mingw-w64-with-mosh
path: dist/**
build-msys2:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: git make mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-libssh2 mingw-w64-ucrt-x86_64-gtk3
- name: build
run: |
curl -L https://mlterm.sourceforge.net/vte-headers.tar.gz > vte-headers.tar.gz
tar xzvf vte-headers.tar.gz -C D:/a/_temp/msys64/ucrt64
CFLAGS="-Wall -g -O2" ./configure --with-gui=win32
make
DESTDIR=/tmp make install
(cd gtk && make && make install)
mkdir dist
cp /tmp/ucrt64/bin/*.exe /tmp/ucrt64/bin/*.dll /tmp/ucrt64/lib/*/*.dll dist/
mt=`ls /c/Program\ Files\ \(x86\)\/Windows\ Kits\/*\/bin\/*\/x64\/mt.exe | head -n 1`
echo $mt
if test "$mt" != ""; then for f in dist/*.exe; do "$mt" -manifest win32/mlterm.manifest -outputresource:$f; done; fi
(cd dist; ldd *.exe | sed -n 's/.*=> \([^ ]*\) .*/\1/p' | grep --ignore-case -v /WINDOWS/ | grep -v /dist/ | xargs | sed 's/\(.*\)/cp \1 ./' | sh)
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mlterm-mingw-w64
path: dist/**