diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index ad76e3bfe..82797f27b 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -64,17 +64,18 @@ jobs: matrix: # We are running two configurations: # - ALL in order to run regression tests +# - MKD just to be sure that it build ok + matrix: + config: + - { os: ubuntu-20.04, env: { CC: gcc, CXX: g++ }, build_type: Release, extra_opts: '' } + - { os: ubuntu-20.04, env: { CC: clang, CXX: clang++ }, build_type: Release, extra_opts: '' } +# We are running two configurations: +# - ALL in order to run regression tests # - MKD just to be sure that it build ok setup: - - scope: 'ALL' - tests: 'ON' - - scope: 'MKD' - tests: 'OFF' - env: - - CC: gcc - CXX: g++ - - CC: clang - CXX: clang++ + - { scope: 'ALL', tests: 'ON' } + - { scope: 'MKD', tests: 'OFF' } + env: ${{ matrix.env }} container: image: alpine:3.17 @@ -82,27 +83,39 @@ jobs: steps: - name: Install packages run: | - apk --no-cache --upgrade add cmake git bash build-base \ + apk --no-cache --upgrade add git bash build-base \ autoconf boost-static boost-dev fmt-dev flex-dev bison \ - binutils-dev libevent-dev acl-dev \ + binutils-dev libevent-dev acl-dev clang-dev \ double-conversion-dev lz4-dev openssl-dev xz-dev \ libunwind-dev libdwarf-dev glog-dev elfutils-dev \ - fuse3-dev clang-dev + fuse3 fuse3-dev - name: Checkout uses: actions/checkout@v3 with: submodules: true + - name: Install cmake + run: tools/ci-scripts/tools.sh install_cmake + - name: Declare directory safe run: git config --global --add safe.directory "$(pwd)" - name: Configure - run: cmake -B build -DWITH_TESTS=${{ matrix.setup.tests }} -DTEBAKO_BUILD_SCOPE=${{ matrix.setup.scope }} -DCMAKE_INSTALL_PREFIX=install + run: | + echo "CORES=$(nproc --all)" >> $GITHUB_ENV + cmake -B build \ + -DFOLLY_NO_EXCEPTION_TRACER=ON \ + -DWITH_MAN_PAGES=OFF \ + -DNIXPKGS_DWARFS_VERSION_OVERRIDE=tebako \ + -DWITH_TESTS=${{ matrix.setup.tests }} \ + -DTEBAKO_BUILD_SCOPE=${{ matrix.setup.scope }} \ + -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ + ${{ matrix.config.extra_opts }} . - name: Build - run: cmake --build build --parallel 4 + run: cmake --build build --parallel "$CORES" - name: Test if: ${{ matrix.setup.tests == 'ON' }} - run: ctest --test-dir build --output-on-failure + run: ctest --test-dir build --output-on-failure --parallel "$CORES" diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 414e8911a..d0b0ff3cb 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -75,10 +75,9 @@ jobs: # - ALL in order to run regression tests # - MKD just to be sure that it build ok setup: - - scope: 'ALL' - tests: 'ON' - - scope: 'MKD' - tests: 'OFF' + - { scope: 'ALL', tests: 'ON' } + - { scope: 'MKD', tests: 'OFF' } + include: - config: { os: ubuntu-20.04, env: { CC: clang-12, CXX: clang++-12 }, build_type: Debug, extra_opts: '-DENABLE_ASAN=1' } setup: { scope: 'ALL', tests: 'ON' } diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f94ddc89..035af8362 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ endif() include(${CMAKE_SOURCE_DIR}/cmake/version.cmake) # ----------------------------------------------------------------------------------------- -message(STATUS "Applying tebako settings") +message(STATUS ">>>>> Applying tebako settings") # THis is the default that may be overwritten set(GNU_BASH "bash") @@ -185,6 +185,8 @@ set(PATCH_FOLLY OFF) if("${OSTYPE_TXT}" MATCHES "^linux-musl.*") message(STATUS "Adding __musl__ compile definition") add_compile_definitions(__musl__) + include(${TOOLS}/cmake-scripts/setup-libutfcpp.cmake) + add_dependencies(_LIBARCHIVE ${LIBUTFCPP_PRJ}) set(PATCH_FOLLY ON) endif() @@ -207,7 +209,7 @@ if (${PATCH_FOLLY}) endif(PATCH_FOLLY_RES EQUAL 0) endif(${PATCH_FOLLY}) -message(STATUS "Applied tebako settings") +message(STATUS "<<<<< Applied tebako settings") # ----------------------------------------------------------------------------------------- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") diff --git a/include/dwarfs/compiler.h b/include/dwarfs/compiler.h index 0a5edcdc5..3ff88e858 100644 --- a/include/dwarfs/compiler.h +++ b/include/dwarfs/compiler.h @@ -37,6 +37,6 @@ #endif #endif -#if !defined(DWARFS_SANITIZE_THREAD) && defined(__x86_64__) +#if !defined(DWARFS_SANITIZE_THREAD) && defined(__x86_64__) && defined(FOLLY_HAVE_IFUNC) #define DWARFS_MULTIVERSIONING 1 #endif diff --git a/tools b/tools index 973ff4ba2..8c899d560 160000 --- a/tools +++ b/tools @@ -1 +1 @@ -Subproject commit 973ff4ba209fc65f6c18de5aff83927729eefade +Subproject commit 8c899d560734c7ee0f43e1afe487236e0ad9ab4a