Skip to content

Commit

Permalink
Remove cmake testing and add meson build bot
Browse files Browse the repository at this point in the history
CMake tests are broken anyway as py3 changes so let's get rid of them
  • Loading branch information
ebraminio committed Mar 11, 2020
1 parent 1c3f80b commit c494d7a
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 236 deletions.
90 changes: 7 additions & 83 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,27 @@ jobs:
xcode: "11.1.0"
steps:
- checkout
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget autoconf automake libtool pkg-config ragel freetype glib cairo icu4c graphite2 cmake
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget autoconf automake libtool pkg-config ragel freetype glib cairo icu4c graphite2
- run: export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" && ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-coretext --with-graphite2
- run: make -j4
- run: make check || .ci/fail.sh
- run: cmake -Bbuild -H. -DHB_HAVE_CORETEXT=1 -DHB_BUILD_TESTS=0 && cmake --build build

macos-10.15-aat-fonts:
macos:
xcode: "11.2.1"
steps:
- checkout
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget autoconf automake libtool pkg-config ragel freetype glib cairo icu4c graphite2 cmake
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget autoconf automake libtool pkg-config ragel freetype glib cairo icu4c graphite2
- run: export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" && ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-coretext --with-graphite2
- run: make -j4
- run: make check || .ci/fail.sh
- run: cmake -Bbuild -H. -DHB_HAVE_CORETEXT=1 -DHB_BUILD_TESTS=0 && cmake --build build

distcheck:
docker:
- image: ubuntu:19.10
steps:
- checkout
- run: apt update && apt install -y git 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
- run: apt update && apt install -y git ninja-build binutils libtool autoconf automake make gcc g++ pkg-config ragel gtk-doc-tools libfontconfig1-dev libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
- run: pip install fonttools
- run: ./autogen.sh
- run: make -j32
Expand Down Expand Up @@ -83,15 +81,6 @@ jobs:
- run: make -j32 CPPFLAGS="-Werror"
- run: make check CPPFLAGS="-Werror" || .ci/fail.sh

## Doesn't play well with CircleCI apparently
#void-notest:
# docker:
# - image: voidlinux/voidlinux
# steps:
# - checkout
# - run: xbps-install -Suy freetype gettext gcc glib graphite pkg-config ragel libtool autoconf automake make
# - run: ./autogen.sh && make -j32 && make check

clang-O3-O0-and-nobuildsystem:
docker:
- image: ubuntu:19.10
Expand Down Expand Up @@ -229,29 +218,14 @@ jobs:
path: winbuild64/harfbuzz-win64.zip
destination: harfbuzz-win64.zip

cmake-gcc:
meson-gcc:
docker:
- image: ubuntu:19.10
steps:
- checkout
- 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
- run: apt update && apt install -y ninja-build binutils meson gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
- run: pip install fonttools
- run: cmake -DHB_CHECK=ON -Bbuild -H. -GNinja
- run: ninja -Cbuild
# - run: CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test
# - run: ninja -Cbuild install

#cmake-oracledeveloperstudio:
# docker:
# - image: fedora
# steps:
# - checkout
# - 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
# - 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
# - 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_HAVE_GLIB=ON -DHB_HAVE_FREETYPE=ON -Bbuild -H.
# - run: make -Cbuild -j32
# - run: CTEST_OUTPUT_ON_FAILURE=1 make -Cbuild test
# - run: make -Cbuild install
- run: meson build && ninja -Cbuild test

crosscompile-notest-djgpp:
docker:
Expand All @@ -273,46 +247,6 @@ jobs:
- run: ./autogen.sh --prefix=/usr/local/vitasdk/arm-vita-eabi --host=arm-vita-eabi
- run: make -j32

crosscompile-cmake-notest-android-arm:
docker:
- image: dockcross/android-arm
steps:
- checkout
- run: cmake -Bbuild -H. -GNinja -DHB_BUILD_TESTS=OFF
- run: ninja -Cbuild

crosscompile-cmake-notest-browser-asmjs-hb_tiny:
docker:
- image: dockcross/browser-asmjs
steps:
- checkout
- run: cmake -Bbuild -H. -GNinja -DCMAKE_CXX_FLAGS="-DHB_TINY" -DHB_BUILD_TESTS=OFF
- run: ninja -Cbuild

crosscompile-cmake-notest-linux-arm64:
docker:
- image: dockcross/linux-arm64
steps:
- checkout
- run: cmake -Bbuild -H. -GNinja -DHB_BUILD_TESTS=OFF
- run: ninja -Cbuild

crosscompile-cmake-notest-linux-mips:
docker:
- image: dockcross/linux-mips
steps:
- checkout
- run: cmake -Bbuild -H. -GNinja -DHB_BUILD_TESTS=OFF
- run: ninja -Cbuild

#crosscompile-cmake-notest-windows-x64:
# docker:
# - image: dockcross/windows-x64
# steps:
# - checkout
# - run: cmake -Bbuild -H. -GNinja
# - run: ninja -Cbuild

workflows:
version: 2
build:
Expand All @@ -323,13 +257,11 @@ workflows:
- macos-10.14.4-aat-fonts
- macos-10.15-aat-fonts

# both autotools and cmake
- distcheck

# autotools based builds
- alpine-O3-Os-NOMMAP
- archlinux-py3-all
#- void-notest
- gcc-valgrind
- clang-O3-O0-and-nobuildsystem
- clang-everything
Expand All @@ -339,19 +271,11 @@ workflows:
- clang-ubsan
- fedora-O0-debug-outoftreebuild-mingw

# cmake based builds
- cmake-gcc
#- cmake-oracledeveloperstudio
- meson-gcc

# crosscompiles
# they can't be test thus are without tests
## autotools
- crosscompile-notest-djgpp
- crosscompile-notest-psvita

## cmake
- crosscompile-cmake-notest-android-arm
- crosscompile-cmake-notest-browser-asmjs-hb_tiny
- crosscompile-cmake-notest-linux-arm64
- crosscompile-cmake-notest-linux-mips
#- crosscompile-cmake-notest-windows-x64
52 changes: 0 additions & 52 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ if (HB_BUILD_UTILS)
endif ()

option(HB_BUILD_SUBSET "Build harfbuzz-subset" ON)
option(HB_BUILD_TESTS "Build harfbuzz tests" ON)

option(HB_HAVE_GOBJECT "Enable GObject Bindings" OFF)
if (HB_HAVE_GOBJECT)
Expand Down Expand Up @@ -790,54 +789,3 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
endif ()
endif ()
endif ()

if (HB_BUILD_TESTS)
## src/ executables
foreach (prog test test-gsub-would-substitute test-gpos-size-params test-buffer-serialize test-unicode-ranges) # hb-ot-tag
set (prog_name ${prog})
if (${prog_name} STREQUAL "test")
# test can not be used as a valid executable name on cmake, lets special case it
set (prog_name test-test)
endif ()
add_executable(${prog_name} ${PROJECT_SOURCE_DIR}/src/${prog}.cc)
target_link_libraries(${prog_name} harfbuzz ${THIRD_PARTY_LIBS})
endforeach ()
# set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")

## Tests
if (UNIX OR MINGW)
if (BUILD_SHARED_LIBS)
# generate harfbuzz.def after build completion
add_custom_command(TARGET harfbuzz POST_BUILD
COMMAND "${PYTHON_EXECUTABLE}" ${PROJECT_SOURCE_DIR}/src/gen-def.py ${PROJECT_BINARY_DIR}/harfbuzz.def ${project_headers}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src)

add_test(NAME check-static-inits.sh
COMMAND ${PROJECT_SOURCE_DIR}/src/check-static-inits.sh
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/harfbuzz.dir/src # ugly hack
)
add_test(NAME check-libstdc++.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-libstdc++.sh)
add_test(NAME check-symbols.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-symbols.sh)

set_tests_properties(
check-static-inits.sh check-libstdc++.sh check-symbols.sh
PROPERTIES
ENVIRONMENT "libs=.;srcdir=${PROJECT_SOURCE_DIR}/src"
SKIP_RETURN_CODE 77)
endif ()

add_test(NAME check-c-linkage-decls.sh COMMAND ./check-c-linkage-decls.sh)
add_test(NAME check-header-guards.sh COMMAND ./check-header-guards.sh)
add_test(NAME check-externs.sh COMMAND ./check-externs.sh)
add_test(NAME check-includes.sh COMMAND ./check-includes.sh)
set_tests_properties(
check-c-linkage-decls.sh check-header-guards.sh check-externs.sh check-includes.sh
PROPERTIES
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src
SKIP_RETURN_CODE 77)
endif ()

# Needs to come last so that variables defined above are passed to
# subdirectories.
add_subdirectory(test)
endif ()
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ EXTRA_DIST = \
CONFIG.md \
RELEASING.md \
TESTING.md \
CMakeLists.txt \
meson.build \
replace-enum-strings.cmake \
mingw-configure.sh \
mingw-ldd.py \
Expand Down
4 changes: 0 additions & 4 deletions test/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EXTRA_DIST =
SUBDIRS = api shaping fuzzing subset

EXTRA_DIST += \
CMakeLists.txt \
meson.build \
$(NULL)

# Convenience targets:
Expand Down
36 changes: 0 additions & 36 deletions test/api/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion test/api/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lib:
libs:
@$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/src libs

EXTRA_DIST += CMakeLists.txt
EXTRA_DIST += meson.build

EXTRA_DIST += fonts

Expand Down
27 changes: 0 additions & 27 deletions test/fuzzing/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion test/fuzzing/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ EXTRA_DIST += \
run-shape-fuzzer-tests.py \
run-subset-fuzzer-tests.py \
run-draw-fuzzer-tests.py \
CMakeLists.txt \
meson.build \
fonts \
$(NULL)

Expand Down
28 changes: 0 additions & 28 deletions test/shaping/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion test/shaping/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ libs:

EXTRA_DIST += \
README.md \
CMakeLists.txt \
meson.build \
hb-diff \
hb-diff-colorize \
hb-diff-filter-failures \
Expand Down
2 changes: 1 addition & 1 deletion test/subset/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ libs:
@$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/src libs

EXTRA_DIST += \
CMakeLists.txt \
meson.build \
run-tests.py \
subset_test_suite.py \
$(NULL)
Expand Down

0 comments on commit c494d7a

Please sign in to comment.