Forbid space builds with acr/make and add job to test them with meson/ninja ##build

This commit is contained in:
pancake 2020-12-29 15:08:52 +01:00 committed by GitHub
parent 592b6b0ae8
commit 4e0f0807d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 9 deletions

View File

@ -306,6 +306,40 @@ jobs:
env:
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
build-spaces:
name: Build spaces
continue-on-error: true
runs-on: ubuntu-20.04
steps:
#- name: XXX this is not possible with make Install from a directory with spaces
# run: |
# git config pull.rebase false
# git clone --depth 1 https://github.com/radareorg/radare2 "spa ces" ; cd "spa ces" ; ./sys/install.sh > /dev/null ; cd ..
# r2 -v
# - name: Install to a directory with spaces using ACR/MAKE
# run: |
# git config --global pull.rebase false
# git clone --depth 1 https://github.com/radareorg/radare2
# cd radare2
# ./configure --prefix=/usr/local; make uninstall
# ./configure --prefix=/usr; make uninstall
# ./sys/install.sh "/usr/spa ces" > /dev/null
# LD_LIBRARY_PATH="/usr/spa ces/lib" PATH="/usr/spa ces/bin:$PATH" r2 -v
# cd ..
- name: Build on a directory with spaces (meson only)
run: |
export PATH=${HOME}/.local/bin:${HOME}/Library/Python/3.9/bin:${PATH}
sudo apt-get --assume-yes install python3-wheel python3-setuptools
pip3 install --user meson==0.55.3 ninja==1.10.0
git config --global pull.rebase false
git clone --depth 1 https://github.com/radareorg/radare2 "spa ces"
cd "spa ces"
meson --prefix="/tmp/r 2" build > /dev/null
ninja -C build > /dev/null
ninja -C build install ; cd ..
find "/tmp/r 2"
LD_LIBRARY_PATH="/tmp/r 2/lib/x86_64-linux-gnu/" "/tmp/r 2/bin/r2" -v
build-static:
name: Build static
# FIXME: ignore error until all tests properly pass

View File

@ -3,6 +3,15 @@ _INCLUDE_GLOBAL_MK_=1
DESTDIR=
COMPILER?=gcc
SPACE:=
SPACE+=
ifneq (,$(findstring $(SPACE),$(PREFIX)))
$(error PREFIX cannot contain spaces)
endif
ifneq (,$(findstring $(SPACE),$(shell pwd)))
$(error Current working directory cannot contain spaces)
endif
TOP:=$(dir $(lastword $(MAKEFILE_LIST)))
LTOP:=$(TOP)/libr
STOP:=$(TOP)/shlr

View File

@ -1,7 +1,7 @@
# config.mk.tail
LIBR:=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))
# neat???!? trick to support path with spaces
null:=
SPACE:=$(null) $(null)
@ -16,7 +16,6 @@ endif
SHLR:=$(LIBR)/../shlr
#include $(LIBR)/../config-user.mk
include $(LIBR)/../global.mk
include $(LIBR)/../mk/${COMPILER}.mk
@ -24,7 +23,6 @@ CFLAGS+=${CFLAGS_APPEND}
CFLAGS+=${CPPFLAGS}
ifeq (1,1)
#$(WITHPIC),1)
LINK+=$(subst r_,-L$(LIBR)/,$(R2DEPS))
LINK+=$(subst r_,-lr_,$(R2DEPS))
LINK+=$(subst r_,-L$(LIBR)/,$(BINDEPS))
@ -37,9 +35,6 @@ LINK+=$(shell echo ${R2DEPS} | sed -e 's:r_\([^ ]\+\):$(LIBR)/\1/libr_\1.${EXT_A
endif
endif
# Compiler: see mk/gcc.mk
# CC CFLAGS CC_LIB CC_AR LINK
# Debug
ifneq ($(OSTYPE),mingw32)
CFLAGS+=-g

View File

@ -80,14 +80,14 @@ endif
ifeq ($(WITH_LIBS),1)
$(LIBSO): $(EXTRA_TARGETS) ${WFD} ${OBJS} ${SHARED_OBJ}
@for a in ${OBJS} ${SHARED_OBJ} ${SRC}; do \
do=0 ; [ ! -e ${LIBSO} ] && do=1 ; \
test $$a -nt ${LIBSO} && do=1 ; \
do=0 ; [ ! -e "${LIBSO}" ] && do=1 ; \
test "$$a" -nt "${LIBSO}" && do=1 ; \
if [ $$do = 1 ]; then \
[ -n "${SILENT}" ] && \
echo "LD $(LIBSO)" || \
echo "\"${CC_LIB} ${LIBNAME} ${OBJS} ${SHARED_OBJ} ${LINK} ${LDFLAGS}\"" ; \
${CC_LIB} ${LIBNAME} ${CFLAGS} ${OBJS} ${SHARED_OBJ} ${LINK} ${LDFLAGS} || exit 1; \
[ -f "$(LIBR)/stripsyms.sh" ] && sh $(LIBR)/stripsyms.sh ${LIBSO} ${NAME} ; \
[ -f "$(LIBR)/stripsyms.sh" ] && sh "$(LIBR)/stripsyms.sh" "${LIBSO}" ${NAME} ; \
break ; \
fi ; done
else