From 8b60e7c2c301a24906d591c80c42fd5e506072d2 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Mon, 22 Jan 2018 18:37:26 +0330 Subject: [PATCH] [ci] minor, less hacks (#722) --- .circleci/config.yml | 20 ++++++-------------- .travis.yml | 8 ++++---- CMakeLists.txt | 11 +++++++---- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7ea25676..11ca1d7a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,16 +4,12 @@ jobs: distcheck: docker: - - image: dockcross/base + - image: ubuntu:17.10 steps: - checkout - - run: apt update && apt install -y pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev - - - run: apt-cache policy libfreetype6-dev && echo @@@@ revert https://github.com/harfbuzz/harfbuzz/pull/718 when this updated @@@@ 1>&2 - - 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 -j4 && sudo make install && cd .. - - - run: ./autogen.sh && LD_PRELOAD="$PWD/freetype-2.9/objs/.libs/libfreetype.so" make distcheck - - run: make distdir && cd harfbuzz-* && cmake -DDHB_CHECK=ON -Bbuild -H. -GNinja && ninja -Cbuild && CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test && ninja -Cbuild install + - run: apt update && apt install -y ninja-build binutils libtool autoconf automake make cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev + - run: ./autogen.sh && make distcheck && rm -rf harfbuzz-* + - 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 alpine: docker: @@ -44,14 +40,10 @@ jobs: cmake-gcc: docker: - - image: dockcross/base + - image: ubuntu:17.10 steps: - checkout - - run: apt update && apt install -y pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev - - - run: apt-cache policy libfreetype6-dev && echo @@@@ revert https://github.com/harfbuzz/harfbuzz/pull/718 when this updated @@@@ 1>&2 - - 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 -j4 && sudo make install && cd .. - + - 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 - run: cmake -DHB_CHECK=ON -Bbuild -H. -GNinja - run: ninja -Cbuild - run: CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test diff --git a/.travis.yml b/.travis.yml index 187ca3afb..b99130657 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,9 +17,9 @@ matrix: - os: linux compiler: gcc script: - - apt-cache policy libfreetype6-dev && echo @@@@ revert https://github.com/harfbuzz/harfbuzz/pull/718 when this updated @@@@ 1>&2 + # Remove these two lines when Travis updated its distro - 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 -j4 && cd .. - - export LD_PRELOAD="$PWD/freetype-2.9/objs/.libs/libfreetype.so" + - export LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" - ./autogen.sh - ./configure $CONFIGURE_OPTS --enable-gtk-doc @@ -32,9 +32,9 @@ matrix: - os: linux compiler: clang script: - - apt-cache policy libfreetype6-dev && echo @@@@ revert https://github.com/harfbuzz/harfbuzz/pull/718 when this updated @@@@ 1>&2 + # Remove these two lines when Travis updated its distro - 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 -j4 && cd .. - - export LD_PRELOAD="$PWD/freetype-2.9/objs/.libs/libfreetype.so" + - export LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" - ./autogen.sh - ./configure $CONFIGURE_OPTS diff --git a/CMakeLists.txt b/CMakeLists.txt index 435d4fa54..15d3e93df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -795,15 +795,18 @@ if (UNIX OR MINGW) COMMAND ${CMAKE_COMMAND} -E env "headers=${space_separated_headers}" python ${PROJECT_SOURCE_DIR}/src/gen-def.py ${PROJECT_BINARY_DIR}/harfbuzz.def WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src) - add_test(NAME check-symbols.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-symbols.sh) 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-defs.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-defs.sh) - set_tests_properties(check-symbols.sh check-static-inits.sh check-libstdc++.sh check-defs.sh - PROPERTIES ENVIRONMENT "libs=.;srcdir=${PROJECT_SOURCE_DIR}/src") + set_tests_properties(check-static-inits.sh check-libstdc++.sh PROPERTIES ENVIRONMENT "libs=.;srcdir=${PROJECT_SOURCE_DIR}/src") + + if (APPLE) # doesn't work on Linux it seems + add_test(NAME check-symbols.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-symbols.sh) + add_test(NAME check-defs.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-defs.sh) + set_tests_properties(check-symbols.sh check-defs.sh PROPERTIES ENVIRONMENT "libs=.;srcdir=${PROJECT_SOURCE_DIR}/src") + endif () endif () add_test(NAME check-c-linkage-decls.sh COMMAND ./check-c-linkage-decls.sh)