Skip to content

Commit

Permalink
Alpine workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Sep 29, 2023
1 parent 6dc2524 commit 3439625
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 23 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,45 +64,58 @@ 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

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"
7 changes: 3 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()

Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion include/dwarfs/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tools

0 comments on commit 3439625

Please sign in to comment.