name: CI on: push: branches: [ main ] pull_request: jobs: version: runs-on: ubuntu-latest strategy: fail-fast: false matrix: container: ["fedora:44", "fedora:45", "ubuntu:jammy", "ubuntu:resolute"] steps: - name: Check container sha tags run: | docker pull "${{ matrix.container }}" docker inspect "${{ matrix.container }}" --format=${{ '{{.RepoDigests}}{{.Created}}' }} build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - container: fedora:45 build: BUILD_MESON - container: ubuntu:resolute build: BUILD_MESON - container: fedora:44 build: BUILD_AUTOTOOL - container: fedora:45 build: BUILD_AUTOTOOL - container: ubuntu:jammy build: BUILD_AUTOTOOL - container: ubuntu:resolute build: BUILD_AUTOTOOL container: image: ${{ matrix.container }} env: BUILD_AUTOTOOL: 0 BUILD_MESON: 1 steps: - name: Install distro packages env: # For autogen.sh UBUNTU_PACKAGES_AUTOGEN: > autopoint strace UBUNTU_PACKAGES_MESON: > libibus-1.0-dev meson python3-minimal # For make from # https://packages.ubuntu.com/search?searchon=sourcenames&keywords=ibus-anthy UBUNTU_PACKAGES_MAKE: > desktop-file-utils gettext gir1.2-ibus-1.0 libanthy-dev libdconf-dev libgirepository1.0-dev libglib2.0-dev libgtk-3-bin libgtk-3-dev libtool pkg-config python3-all # for make check UBUNTU_PACKAGES_CI_KEY: > ibus python3-pip FEDORA_PACKAGES_MAKE: > anthy-unicode-devel desktop-file-utils dconf-devel gettext-devel git gtk3-devel gobject-introspection-devel ibus-devel libtool python3-devel python3-gobject FEDORA_PACKAGES_MESON: > meson # for ibus-keypress FEDORA_PACKAGES_CI_KEY: > gnome-shell gnome-shell-extension-no-overview libXtst-devel python3-pycotap FEDORA_PACKAGES_DISTRO: > patch procps-ng strace run: | case "${{ matrix.container }}" in ubuntu*) cat /etc/lsb-release echo "apt-get update -qq -y" apt-get update -qq -y echo "apt-get install -q -y git" apt-get install -q -y git PACKAGES=$(echo "$UBUNTU_PACKAGES_AUTOGEN" | tr -d '\n') PACKAGES=$(echo "$PACKAGES $UBUNTU_PACKAGES_MAKE" | tr -d '\n') PACKAGES=$(echo "$PACKAGES $UBUNTU_PACKAGES_CI_KEY" | tr -d '\n') if test $${{ matrix.build }} -eq $BUILD_MESON; then PACKAGES=$(echo "$PACKAGES $UBUNTU_PACKAGES_MESON" | tr -d '\n') fi echo "apt-get install -y $PACKAGES" apt-get install -y $PACKAGES dpkg -l | grep anthy ;; fedora*) cat /etc/fedora-release DNF=dnf echo "$DNF -y update" $DNF -y update echo "$DNF -y install git which" $DNF -y install git which PACKAGES=$(echo "$FEDORA_PACKAGES_MAKE" | tr -d '\n') PACKAGES=$(echo "$PACKAGES $FEDORA_PACKAGES_CI_KEY" | tr -d '\n') PACKAGES=$(echo "$PACKAGES $FEDORA_PACKAGES_DISTRO" | tr -d '\n') if test $${{ matrix.build }} -eq $BUILD_MESON; then PACKAGES=$(echo "$PACKAGES $FEDORA_PACKAGES_MESON" | tr -d '\n') fi echo "$DNF -y install $PACKAGES" $DNF -y install $PACKAGES ;; *) echo "Not supported ${{ matrix.container }}" ls /etc/*release cat /etc/*release exit 1 ;; esac pwd echo $GITHUB_WORKSPACE ls -a - uses: actions/checkout@v2 with: #repository: ibus/ibus-anthy fetch-depth: 200 - name: Fetch git tags run: | pwd id ls -al git config --global --add safe.directory $GITHUB_WORKSPACE git branch git fetch --prune --unshallow --tags echo $PATH - name: Run autogen # configure options from # https://salsa.debian.org/debian/ibus/-/blob/master/debian/rules run: > if test $${{ matrix.build }} -eq $BUILD_MESON; then meson setup builddir -Dtests-exclude-suites=ibus-anthy -Don-off-keys="['Zenkaku_Hankaku', 'Ctrl+space', 'Ctrl+J']" -Dinstall-tests=true; else ./autogen.sh --libexecdir=/usr/lib/ibus --with-layout='default' --with-python=python3 --with-hotkeys --with-on-off-keys="'Zenkaku_Hankaku', 'Ctrl+space', 'Ctrl+J'" --enable-installed-tests --disable-static; fi; - name: Run make # UTF-8 locale is required for sed 'y/0123456789/0123456789/' # # Set the cutom DESTDIR because the default DESTDIR # /home/travis/bulid/fujiwarat/$PKG/ibus/ibus-$VERSION/_inst seems to # be too long and failed to set DESTDIR to install # bindings/pygobject/IBus.py run: > export LANG=C.UTF-8; if test $${{ matrix.build }} -eq $BUILD_MESON; then meson dist -C builddir; else make distcheck VERBOSE=1 DESTDIR="$HOME/build/$USER/dest"; fi; - name: Desktop file validation run: | if test $${{ matrix.build }} -eq $BUILD_MESON; then meson compile -C builddir ibus-setup-anthy.desktop echo "desktop-file-validate ./setup/python3/ibus-setup-anthy.desktop" desktop-file-validate ./builddir/setup/python3/ibus-setup-anthy.desktop else make -C setup/python3 ibus-setup-anthy.desktop echo "desktop-file-validate ./setup/python3/ibus-setup-anthy.desktop" desktop-file-validate ./setup/python3/ibus-setup-anthy.desktop fi