* ci.yml: Fix error in building mosh in build-android. #259
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 -O https://github.com/arakiken/mosh/archive/refs/heads/sixel-winsock.zip | |
unzip sixel-winsock.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: | | |
CLANG_ARMV7A=`ls $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi*-clang|tail -n 1` | |
curl -L -O https://github.com/fribidi/fribidi/releases/download/0.19.6/fribidi-0.19.6.tar.bz2 | |
tar xvf fribidi-0.19.6.tar.bz2 | |
(cd fribidi-0.19.6; CC="$CLANG_ARMV7A -fPIC" ./configure --host=armv7a-linux-androideabi; mkdir -p $HOME/mlterm-android/jni/fribidi; cp `find . -name *.[chi]` $HOME/mlterm-android/jni/fribidi) | |
curl -L -O https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.gz | |
tar xvf freetype-2.13.3.tar.gz | |
(cd freetype-2.13.3; sh ./autogen.sh; CC="$CLANG_ARMV7A -fPIC" ./configure --host=armv7a-linux-androideabi --disable-shared --with-png=no --with-harfbuzz=no --with-bzip2=no --with-brotli=no --prefix=$HOME/mlterm-android/jni/freetype/armeabi-v7a; make; make install) | |
curl -L -O https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.0.0.tar.gz | |
tar xvf libressl-4.0.0.tar.gz | |
(cd libressl-4.0.0; CC="$CLANG_ARMV7A -fPIC" ./configure --host=armv7a-linux-androideabi --disable-shared --prefix=$HOME/libressl; make; make install) | |
curl -L -O https://libssh2.org/download/libssh2-1.11.1.tar.gz | |
tar xvf libssh2-1.11.1.tar.gz | |
(cd libssh2-1.11.1; CC="$CLANG_ARMV7A -fPIC" ./configure --host=armv7a-linux-androideabi --disable-shared --prefix=$HOME/mlterm-android/jni/libssh2/armeabi-v7a --with-libssl-prefix=$HOME/libressl; make; make install) | |
curl -L -O https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protobuf-cpp-3.20.1.tar.gz | |
tar xvf protobuf-cpp-3.20.1.tar.gz | |
(cd protobuf-3.20.1; CC="$CLANG_ARMV7A -fPIC" CXX="${CLANG_ARMV7A}++ -fPIC" ./configure --host=armv7a-linux-androideabi --disable-shared --prefix=$HOME/mlterm-android/jni/protobuf/armeabi-v7a; make; make install) | |
curl -L -O https://github.com/arakiken/mosh/archive/refs/heads/sixel-winsock.zip | |
unzip sixel-winsock.zip | |
(cd mosh-sixel-winsock; autoconf; PATH=$HOME/mlterm-android/jni/protobuf/armeabi-v7a/bin:$PATH CC="$CLANG_ARMV7A -fPIC -L$HOME/libressl/lib" CXX="${CLANG_ARMV7A}++ -fPIC -L$HOME/libressl/lib" ./configure --host=armv7a-linux-androideabi) | |
(cd android; ./prepare-gradle.sh $HOME/mlterm-android $HOME/mosh-sixel-winsock $HOME/libressl 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 -O https://github.com/arakiken/mosh/archive/refs/heads/sixel-winsock.zip | |
unzip sixel-winsock.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 -O https://mlterm.sourceforge.net/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/** |