mirror of
https://github.com/dragonflydb/dragonfly
synced 2024-11-22 15:44:13 +00:00
98b92a0073
- make use of docker buildx caching when possible (helpful with local docker builds) - introduce a reusable container workflow which is triggered by docker-release and docker-weekly workflows - added an alpine-dev Dockerfile - split release.sh contents into different Makefile targets - make use of job matrix to build alpine + ubuntu in parallel - make alpine build optional by checking for Dockerfile presence -- as the pre-built binaries don't work with alpine, because of glibc <-> musl incompatibilities Signed-off-by: Philipp Born <git@pborn.eu>
44 lines
1.1 KiB
Makefile
44 lines
1.1 KiB
Makefile
BUILD_ARCH := $(shell uname -m)
|
|
RELEASE_NAME := "dragonfly-${BUILD_ARCH}"
|
|
|
|
HELIO_RELEASE := $(if $(HELIO_RELEASE),y,)
|
|
HELIO_RELEASE_FLAGS = -DHELIO_RELEASE_FLAGS="-flto"
|
|
HELIO_USE_STATIC_LIBS = ON
|
|
HELIO_OPENSSL_USE_STATIC_LIBS = ON
|
|
HELIO_ENABLE_GIT_VERSION = ON
|
|
HELIO_WITH_UNWIND = OFF
|
|
|
|
HELIO_FLAGS = $(if $(HELIO_RELEASE),-release $(HELIO_RELEASE_FLAGS),) \
|
|
-DBoost_USE_STATIC_LIBS=$(HELIO_USE_STATIC_LIBS) \
|
|
-DOPENSSL_USE_STATIC_LIBS=$(HELIO_OPENSSL_USE_STATIC_LIBS) \
|
|
-DENABLE_GIT_VERSION=$(HELIO_ENABLE_GIT_VERSION) \
|
|
-DWITH_UNWIND=$(HELIO_WITH_UNWIND) \
|
|
|
|
.PHONY: default
|
|
|
|
configure:
|
|
./helio/blaze.sh $(HELIO_FLAGS)
|
|
|
|
build:
|
|
cd build-opt; \
|
|
ninja dragonfly; \
|
|
ldd dragonfly
|
|
|
|
build-debug:
|
|
cd build-dbg; \
|
|
ninja dragonfly; \
|
|
ldd dragonfly
|
|
|
|
package:
|
|
cd build-opt; \
|
|
mv dragonfly $(RELEASE_NAME); \
|
|
tar cvfz $(RELEASE_NAME).unstripped.tar.gz $(RELEASE_NAME) ../LICENSE.md; \
|
|
strip $(RELEASE_NAME); \
|
|
tar cvfz $(RELEASE_NAME).tar.gz $(RELEASE_NAME) ../LICENSE.md
|
|
|
|
release: configure build
|
|
|
|
release-debug: configure build-debug
|
|
|
|
default: release
|