• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1version: 2
2
3jobs:
4
5  macos-10.12.6-aat-fonts:
6    macos:
7      xcode: "9.2.0"
8    steps:
9      - checkout
10      - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget pkg-config libtool ragel freetype glib cairo
11      - run: ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo
12      - run: make -j4
13      - run: make check || .ci/fail.sh
14
15  macos-10.13.6-aat-fonts:
16    macos:
17      xcode: "10.1.0"
18    steps:
19      - checkout
20      - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget pkg-config libtool ragel freetype glib cairo
21      - run: ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo
22      - run: make -j4
23      - run: make check || .ci/fail.sh
24
25  macos-llvm-gcc-4.2:
26    macos:
27      xcode: "8.3.3"
28    steps:
29      - checkout
30      - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget pkg-config libtool ragel freetype glib cairo
31      - run: wget https://packages.macports.org/llvm-gcc42/llvm-gcc42-2336.11_3+universal.darwin_15.i386-x86_64.tbz2 && tar zxvf llvm-gcc42-2336.11_3+universal.darwin_15.i386-x86_64.tbz2
32      - run: CC=$PWD/opt/local/bin/llvm-gcc-4.2 CXX=$PWD/opt/local/bin/llvm-g++-4.2 ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo
33      # Ignoring assembler complains, https://stackoverflow.com/a/39867021
34      - run: make 2>&1 | grep -v -e '^/var/folders/*' -e '^[[:space:]]*\.section' -e '^[[:space:]]*\^[[:space:]]*~*'
35      - run: make check || .ci/fail.sh
36
37  macos-notest-apple-gcc-i686-4.2:
38    macos:
39      xcode: "8.3.3"
40    steps:
41      - checkout
42      - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget pkg-config libtool ragel
43      - run: wget https://packages.macports.org/apple-gcc42/apple-gcc42-5666.3_15+universal.darwin_15.i386-x86_64.tbz2 && tar zxvf apple-gcc42-5666.3_15+universal.darwin_15.i386-x86_64.tbz2
44      - run: CPP=$PWD/opt/local/bin/i686-apple-darwin15-cpp-apple-4.2.1 CC=$PWD/opt/local/bin/i686-apple-darwin15-gcc-apple-4.2.1 CXX=$PWD/opt/local/bin/i686-apple-darwin15-g++-apple-4.2.1 ./autogen.sh
45      # Ignoring assembler complains, https://stackoverflow.com/a/39867021
46      - run: make 2>&1 | grep -v -e '^/var/folders/*' -e '^[[:space:]]*\.section' -e '^[[:space:]]*\^[[:space:]]*~*'
47
48  macos-notest-ios:
49    macos:
50      xcode: "10.0.0"
51    steps:
52      - checkout
53      - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake
54      # not needed to be a framework but we like to test that also
55      # TODO: wrong way of targeting iOS as it doesn't point to iOS headers thus building
56      # CoreText support is not possible, after the fix feel free HB_IOS from CMake altogether
57      - run: cmake -DBUILD_FRAMEWORK=ON -H. -Bbuild -GXcode -DHB_HAVE_CORETEXT=OFF -DHB_BUILD_SUBSET=OFF -DHB_BUILD_TESTS=OFF
58      - run: cd build && xcodebuild -sdk iphoneos12.0 -configuration Release build -arch arm64
59
60  distcheck:
61    docker:
62      - image: ubuntu:17.10
63    steps:
64      - checkout
65      - run: apt update && apt install -y ninja-build binutils libtool autoconf automake make cmake gcc g++ pkg-config ragel gtk-doc-tools libfontconfig1-dev libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
66      - run: pip install fonttools
67      - run: ./autogen.sh
68      - run: make -j32
69      - run: make distcheck || .ci/fail.sh
70      - run: rm -rf harfbuzz-*
71      - run: make distdir && cd harfbuzz-* && cmake -DHB_CHECK=ON -Bbuild -H. -GNinja && ninja -Cbuild && CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test && ninja -Cbuild install
72
73  alpine-O3-NOMMAP:
74    docker:
75      - image: alpine
76    steps:
77      - checkout
78      - run: apk update && apk add ragel make pkgconfig libtool autoconf automake gettext gcc g++ glib-dev freetype-dev cairo-dev
79      # C??FLAGS are not needed for a regular build
80      - run: CFLAGS="-O3" CXXFLAGS="-O3 -DHB_NO_MMAP" ./autogen.sh
81      - run: make -j32
82      - run: make check || .ci/fail.sh
83
84  archlinux-debug-O0-py3:
85    docker:
86      - image: base/devel
87    steps:
88      - checkout
89      - run: pacman --noconfirm -Syu freetype2 cairo icu gettext gobject-introspection gcc gcc-libs glib2 graphite pkg-config ragel python python-pip
90      - run: pip install fonttools
91      # C??FLAGS are not needed for a regular build
92      - run: CFLAGS="-O0" CXXFLAGS="-O0" CPPFLAGS="-DHB_DEBUG" ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2
93      - run: make -j32
94      - run: make check || .ci/fail.sh
95
96  clang-O3-O0:
97    docker:
98      - image: multiarch/crossbuild
99    steps:
100      - checkout
101      - run: apt update || true
102      - run: apt install -y ragel libfreetype6-dev libfontconfig1-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
103      - run: pip install fonttools
104      - run: wget http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar xf freetype-2.9.tar.bz2 && cd freetype-2.9 && ./autogen.sh && ./configure && make -j32 && cd ..
105      - run: CFLAGS="-O3" CXXFLAGS="-O3" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-fontconfig --with-glib --with-cairo --with-icu --with-graphite2
106      - run: make -j32
107      - run: LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" make check || .ci/fail.sh
108      - run: CFLAGS="-O0" CXXFLAGS="-O0" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-fontconfig --with-glib --with-cairo --with-icu --with-graphite2
109      - run: make -j32
110      - run: LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" make check || .ci/fail.sh
111
112  gcc-valgrind:
113    docker:
114      - image: ubuntu:18.10
115    steps:
116      - checkout
117      - run: apt update || true
118      - run: apt install -y gcc binutils libtool autoconf automake make pkg-config gtk-doc-tools ragel libfreetype6-dev libfontconfig1-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip valgrind
119      - run: pip install fonttools
120      - run: ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 --with-fontconfig
121      - run: make -j32
122      # run-shape-fuzzer-tests.py automatically runs valgrind if see available
123      # but test/api runs it by request, we probably should normalize the approaches
124      - run: RUN_VALGRIND=1 make check && make -Ctest/api check-valgrind || .ci/fail.sh
125      # informational for now
126      - run: make -Ctest/api check-symbols || true
127
128  clang-everything:
129    docker:
130      - image: ubuntu:18.10
131    steps:
132      - checkout
133      - run: apt update || true; apt install -y wget gnupg
134      - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
135      - run: echo "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdev.list
136      - run: echo "deb-src http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdevsrc.list
137      - run: apt update || true
138      - run: apt install -y clang lld binutils libtool autoconf automake make pkg-config gtk-doc-tools ragel libfreetype6-dev libfontconfig1-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
139      - run: pip install fonttools
140      - run: CFLAGS="-Weverything -Wno-reserved-id-macro -Wno-conversion -Wno-padded -Wno-sign-conversion -Wno-cast-qual -Wno-documentation -Wno-documentation-unknown-command" CXXFLAGS="-Weverything -Wno-old-style-cast -Wno-documentation -Wno-documentation-unknown-command -Wno-c++98-compat -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-sign-conversion -Wno-padded -Wno-shorten-64-to-32 -Wno-reserved-id-macro -Wno-float-conversion -Wno-format-pedantic -Wno-shadow -Wno-conversion -Wno-zero-as-null-pointer-constant -Wno-missing-field-initializers -Wno-used-but-marked-unused -Wno-unused-macros -Wno-comma -Wno-float-equal -Wno-disabled-macro-expansion -Wno-weak-vtables -Wno-unused-parameter -Wno-covered-switch-default -Wno-unreachable-code" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 --with-fontconfig
141      - run: make -j32 CPPFLAGS="-Werror"
142      - run: make check CPPFLAGS="-Werror" || .ci/fail.sh
143
144  clang-asan:
145    docker:
146      - image: ubuntu:18.10
147    steps:
148      - checkout
149      - run: apt update || true; apt install -y wget gnupg
150      - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
151      - run: echo "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdev.list
152      - run: echo "deb-src http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdevsrc.list
153      - run: apt update || true
154      - run: apt install -y clang lld binutils libtool autoconf automake make pkg-config gtk-doc-tools ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
155      - run: pip install fonttools
156      - run: CPPFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer" CFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2
157      - run: make -j32
158      - run: make check || .ci/fail.sh | asan_symbolize | c++filt
159
160  clang-msan:
161    docker:
162      - image: ubuntu:18.10
163    steps:
164      - checkout
165      - run: apt update || true; apt install -y wget gnupg
166      - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
167      - run: echo "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdev.list
168      - run: echo "deb-src http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdevsrc.list
169      - run: apt update || true
170      - run: apt install -y clang lld binutils libtool autoconf automake gtk-doc-tools gettext make pkg-config ragel libcairo2-dev libicu-dev libmount-dev libgraphite2-dev python python-pip
171      - run: pip install fonttools
172      - run: update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.lld" 10
173      - run: wget https://ftp.gnome.org/pub/gnome/sources/glib/2.58/glib-2.58.1.tar.xz && tar xf glib-2.58.1.tar.xz && cd glib-2.58.1 && ./autogen.sh --with-pcre CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory" CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" LD=ld.lld CC=clang CXX=clang++ && make -j32 && make install && cd ..
174      - run: wget http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar xf freetype-2.9.tar.bz2 && cd freetype-2.9 && ./autogen.sh && ./configure CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ && make -j32 && make install && cd ..
175      - run: CPPFLAGS="-fsanitize=memory -fsanitize-memory-track-origins" LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -O1 -g -fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -O1 -g -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --without-icu
176      - run: make -j32 && MSAN_OPTIONS=exitcode=42 make check || .ci/fail.sh | asan_symbolize | c++filt
177
178  clang-tsan:
179    docker:
180      - image: ubuntu:18.10
181    steps:
182      - checkout
183      - run: apt update || true; apt install -y wget gnupg
184      - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
185      - run: echo "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdev.list
186      - run: echo "deb-src http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdevsrc.list
187      - run: apt update || true
188      - run: apt install -y clang lld binutils libtool autoconf automake make pkg-config ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
189      - run: pip install fonttools
190      - run: CPPFLAGS="-fsanitize=thread" LDFLAGS="-fsanitize=thread -O1 -g -fno-omit-frame-pointer" CFLAGS="-fsanitize=thread -O1 -g -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=thread -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2
191      - run: make -j32
192      - run: make check || .ci/fail.sh | asan_symbolize | c++filt
193
194  clang-ubsan:
195    docker:
196      - image: ubuntu:18.10
197    steps:
198      - checkout
199      - run: apt update || true; apt install -y wget gnupg
200      - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
201      - run: echo "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdev.list
202      - run: echo "deb-src http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdevsrc.list
203      - run: apt update || true
204      - run: apt install -y clang lld binutils libtool autoconf automake make pkg-config ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
205      - run: pip install fonttools
206      - run: CPPFLAGS="-fsanitize=undefined" LDFLAGS="-fsanitize=undefined -O1 -g -fno-omit-frame-pointer" CFLAGS="-fsanitize=undefined -O1 -g -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=undefined -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2
207      - run: make -j32
208      - run: make check || .ci/fail.sh | asan_symbolize | c++filt
209
210  fedora-outoftreebuild:
211    docker:
212      - image: fedora
213    steps:
214      - checkout
215      - run: dnf install -y pkg-config ragel gcc gcc-c++ automake autoconf libtool make which glib2-devel freetype-devel cairo-devel libicu-devel gobject-introspection-devel graphite2-devel redhat-rpm-config python || true
216      - run: NOCONFIGURE=1 ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2
217      - run: mkdir build && cd build && ../configure && make && (make check || ../.ci/fail.sh)
218
219  cmake-gcc:
220    docker:
221      - image: ubuntu:17.10
222    steps:
223      - checkout
224      - run: apt update && apt install -y ninja-build binutils cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
225      - run: pip install fonttools
226      - run: cmake -DHB_CHECK=ON -Bbuild -H. -GNinja
227      - run: ninja -Cbuild
228      - run: CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test
229      - run: ninja -Cbuild install
230
231  cmake-oracledeveloperstudio:
232    docker:
233      - image: fedora
234    steps:
235      - checkout
236      - run: dnf install -y gcc ragel cmake make which glib2-devel freetype-devel cairo-devel libicu-devel graphite2-devel wget tar bzip2 python libnsl || true
237      - run: wget http://$ODSUSER:$ODSPASS@behdad.org/harfbuzz-private/OracleDeveloperStudio12.6-linux-x86-bin.tar.bz2 && tar xf OracleDeveloperStudio12.6-linux-x86-bin.tar.bz2 --owner root --group root --no-same-owner
238      - run: CC=/root/project/OracleDeveloperStudio12.6-linux-x86-bin/developerstudio12.6/bin/suncc CXX=/root/project/OracleDeveloperStudio12.6-linux-x86-bin/developerstudio12.6/bin/sunCC cmake -DHB_HAVE_GRAPHITE2=ON -DHB_BUILTIN_UCDN=ON -DHB_HAVE_GLIB=ON -DHB_HAVE_FREETYPE=ON -Bbuild -H.
239      - run: make -Cbuild -j32
240      - run: CTEST_OUTPUT_ON_FAILURE=1 make -Cbuild test
241      - run: make -Cbuild install
242
243  crosscompile-notest-djgpp:
244    docker:
245      # https://gist.github.com/ebraminio/8551fc74f27951e668102baa2f6b1175
246      - image: quay.io/ebraminio/djgpp
247    steps:
248      - checkout
249      - run: apt update && apt install -y ragel pkg-config libtool autoconf
250      - run: CFLAGS="-Wno-attributes" CXXFLAGS="-Wno-attributes" ./autogen.sh --prefix=/usr/local/djgpp --host=i586-pc-msdosdjgpp
251      - run: make -j32
252
253  crosscompile-notest-freebsd9:
254    docker:
255      - image: donbowman/freebsd-cross-build
256    steps:
257      - checkout
258      - run: apt update && apt install -y pkg-config ragel
259      - run: ./autogen.sh --prefix=/freebsd --host=x86_64-pc-freebsd9
260      - run: make -j32
261
262  crosscompile-notest-psvita:
263    docker:
264      - image: dockcross/base
265    steps:
266      - checkout
267      - run: apt update && apt install ragel
268      - run: git clone https://github.com/vitasdk/vdpm && cd vdpm && ./bootstrap-vitasdk.sh
269      - run: ./autogen.sh --prefix=/usr/local/vitasdk/arm-vita-eabi --host=arm-vita-eabi
270      - run: make -j32
271
272  crosscompile-cmake-notest-android-arm:
273    docker:
274      - image: dockcross/android-arm
275    steps:
276      - checkout
277      - run: apt update && apt install ragel
278      - run: cmake -Bbuild -H. -GNinja
279      - run: ninja -Cbuild
280
281  crosscompile-cmake-notest-browser-asmjs:
282    docker:
283      - image: dockcross/browser-asmjs
284    steps:
285      - checkout
286      - run: apt update && apt install ragel
287      - run: cmake -Bbuild -H. -GNinja
288      - run: ninja -Cbuild
289
290  crosscompile-cmake-notest-linux-arm64:
291    docker:
292      - image: dockcross/linux-arm64
293    steps:
294      - checkout
295      - run: apt update && apt install ragel
296      - run: cmake -Bbuild -H. -GNinja
297      - run: ninja -Cbuild
298
299  crosscompile-cmake-notest-linux-mips:
300    docker:
301      - image: dockcross/linux-mips
302    steps:
303      - checkout
304      - run: apt update && apt install ragel
305      - run: cmake -Bbuild -H. -GNinja
306      - run: ninja -Cbuild
307
308  #crosscompile-cmake-notest-windows-x64:
309  #  docker:
310  #    - image: dockcross/windows-x64
311  #  steps:
312  #    - checkout
313  #    - run: apt update && apt install ragel
314  #    - run: cmake -Bbuild -H. -GNinja
315  #    - run: ninja -Cbuild
316
317workflows:
318  version: 2
319  build:
320    jobs:
321      # macOS
322      - macos-10.12.6-aat-fonts
323      - macos-10.13.6-aat-fonts
324      - macos-llvm-gcc-4.2
325      - macos-notest-apple-gcc-i686-4.2
326      - macos-notest-ios
327
328      # both autotools and cmake
329      - distcheck
330
331      # autotools based builds
332      - alpine-O3-NOMMAP
333      - archlinux-debug-O0-py3
334      - gcc-valgrind
335      - clang-O3-O0
336      - clang-everything
337      - clang-asan
338      - clang-msan
339      - clang-tsan
340      - clang-ubsan
341      - fedora-outoftreebuild
342
343      # cmake based builds
344      - cmake-gcc
345      - cmake-oracledeveloperstudio
346
347      # crosscompiles
348      # they can't be test thus are without tests
349      ## autotools
350      - crosscompile-notest-djgpp
351      - crosscompile-notest-freebsd9
352      - crosscompile-notest-psvita
353
354      ## cmake
355      - crosscompile-cmake-notest-android-arm
356      - crosscompile-cmake-notest-browser-asmjs
357      - crosscompile-cmake-notest-linux-arm64
358      - crosscompile-cmake-notest-linux-mips
359      #- crosscompile-cmake-notest-windows-x64
360