forked from fujiwarat/ibus-anthy
-
Notifications
You must be signed in to change notification settings - Fork 7
167 lines (153 loc) · 4.77 KB
/
main.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
name: CI
on:
push:
branches: [ main ]
pull_request:
jobs:
version:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container: ["fedora:39", "fedora:40", "ubuntu:jammy"]
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:
container: ["fedora:39", "fedora:40", "ubuntu:jammy"]
container:
image: ${{ matrix.container }}
steps:
- name: Install distro packages
env:
# For autogen.sh
UBUNTU_PACKAGES_AUTOGEN: >
autopoint
strace
# 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
# 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')
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')
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: >
./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
- 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: >
env LANG=C.UTF-8
make distcheck
VERBOSE=1
DESTDIR="$HOME/build/$USER/dest"
- name: Desktop file validation
run: |
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