mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 18:43:02 +01:00
Adjust Android x86/x64 build.
This commit is contained in:
parent
84a0168870
commit
d44f3cb94b
15
.github/workflows/main.yml
vendored
15
.github/workflows/main.yml
vendored
@ -553,8 +553,8 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
NDK: /home/runner/Android/Ndk
|
||||
ARCH_BITS: ${{ (matrix.arch == 'arm32' && 32) || 64 }}
|
||||
FB_PREFIX: ${{ (matrix.arch == 'arm32' && 'arme') || 'arm64' }}
|
||||
ARCH: ${{ matrix.arch }}
|
||||
FB_PREFIX: ${{ (matrix.arch == 'arm32' && 'arme') || (matrix.arch == 'x64' && 'x86_64') || matrix.arch }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -562,6 +562,8 @@ jobs:
|
||||
arch:
|
||||
- arm32
|
||||
- arm64
|
||||
- x86
|
||||
- x64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -586,7 +588,7 @@ jobs:
|
||||
./autogen.sh --prefix=/opt/firebird --enable-binreloc --with-cross-build=android.$FB_PREFIX --without-editline
|
||||
make -j4
|
||||
make CROSS_OUT=Y tests -j4
|
||||
builds/install/arch-specific/android/BuildPackage.sh $ARCH_BITS
|
||||
builds/install/arch-specific/android/BuildPackage.sh $ARCH
|
||||
|
||||
- name: Upload initial build
|
||||
uses: actions/upload-artifact@v3
|
||||
@ -601,7 +603,7 @@ jobs:
|
||||
needs: build-android-initial
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
ARCH_BITS: ${{ (matrix.arch == 'arm32' && 32) || 64 }}
|
||||
ARCH: ${{ matrix.arch }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -609,6 +611,8 @@ jobs:
|
||||
arch:
|
||||
- arm32
|
||||
- arm64
|
||||
- x86
|
||||
- x64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -654,8 +658,9 @@ jobs:
|
||||
ndk: 25.1.8937393
|
||||
emulator-options: -no-snapshot-save -no-window -noaudio -no-boot-anim -camera-back none -port 5554
|
||||
script: |
|
||||
adb wait-for-device
|
||||
adb root
|
||||
NDK=/Users/runner/Library/Android/sdk/ndk/25.1.8937393 builds/install/arch-specific/android/BuildFinalPackage.sh $ARCH_BITS
|
||||
NDK=/Users/runner/Library/Android/sdk/ndk/25.1.8937393 builds/install/arch-specific/android/BuildFinalPackage.sh $ARCH
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@v3
|
||||
|
@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
arch=${1}
|
||||
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
NDK_TOOLCHAIN_NAME=darwin-x86_64
|
||||
@ -12,22 +14,19 @@ case $OSTYPE in
|
||||
FIND_EXEC_OPTS="-executable" ;;
|
||||
esac
|
||||
|
||||
bits=${1}
|
||||
[ -z "$bits" ] && bits=32
|
||||
|
||||
[ -z "$NDK_TOOLCHAIN" ] && NDK_TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$NDK_TOOLCHAIN_NAME
|
||||
aStrip=${NDK_TOOLCHAIN}/bin/llvm-strip
|
||||
|
||||
MakeVersion=gen/Make.Version
|
||||
Build=`grep ^BuildNum ${MakeVersion}|awk '{print $3;}'`
|
||||
Version=`grep ^FirebirdVersion ${MakeVersion}|awk '{print $3;}'`
|
||||
InitialBaseName="Firebird-${Version}.${Build}-0-android-initial-arm${bits}"
|
||||
InitialBaseName="Firebird-${Version}.${Build}-0-android-initial-${arch}"
|
||||
InitialDebugTar="$InitialBaseName-withDebugSymbols.tar"
|
||||
InitialDebugTarGz="$InitialDebugTar.gz"
|
||||
Stripped=strip
|
||||
|
||||
FinalRelease="Firebird-${Version}.${Build}-0-android-arm${bits}.tar.gz"
|
||||
FinalDebug="Firebird-${Version}.${Build}-0-android-arm${bits}-withDebugSymbols.tar.gz"
|
||||
FinalRelease="Firebird-${Version}.${Build}-0-android-${arch}.tar.gz"
|
||||
FinalDebug="Firebird-${Version}.${Build}-0-android-${arch}-withDebugSymbols.tar.gz"
|
||||
|
||||
[ -z "$AndroidDevicePort" ] && AndroidDevicePort=5554
|
||||
AndroidDeviceName=emulator-$AndroidDevicePort
|
||||
@ -39,8 +38,9 @@ mkdir -p gen/Release
|
||||
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "mkdir $AndroidDir"
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName push gen/$InitialDebugTar $AndroidDir/
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir && tar xvf $InitialDebugTar && cd firebird && ./AfterUntar.sh)"
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir && tar xvf $InitialDebugTar)"
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir/firebird/tests && ./common_test --log_level=all && ./libEngine13_test --log_level=all)"
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir/firebird && ./AfterUntar.sh)"
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName pull $AndroidDir/firebird/firebird.msg gen/Release/firebird/
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName pull $AndroidDir/firebird/security5.fdb gen/Release/firebird/
|
||||
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName pull $AndroidDir/firebird/examples/empbuild/employe2.fdb gen/Release/firebird/examples/empbuild/
|
||||
|
@ -1,27 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
NDK_TOOLCHAIN_NAME=darwin-x86_64 ;;
|
||||
linux*)
|
||||
NDK_TOOLCHAIN_NAME=linux-x86_64 ;;
|
||||
esac
|
||||
|
||||
bits=${1}
|
||||
[ -z "$bits" ] && bits=32
|
||||
|
||||
[ "$bits" = "32" ] && cross=arm-linux-androideabi
|
||||
[ "$bits" = "64" ] && cross=aarch64-linux-android
|
||||
[ -z "$cross" ] && echo "Invalid bits passed" && exit 1
|
||||
|
||||
[ -z "$NDK_TOOLCHAIN" ] && NDK_TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$NDK_TOOLCHAIN_NAME
|
||||
arch=${1}
|
||||
|
||||
MakeVersion=gen/Make.Version
|
||||
Build=`grep ^BuildNum ${MakeVersion}|awk '{print $3;}'`
|
||||
Version=`grep ^FirebirdVersion ${MakeVersion}|awk '{print $3;}'`
|
||||
Release="Firebird-${Version}.${Build}-0-android-initial-arm${bits}.tar.gz"
|
||||
Debug="Firebird-${Version}.${Build}-0-android-initial-arm${bits}-withDebugSymbols.tar.gz"
|
||||
Release="Firebird-${Version}.${Build}-0-android-initial-${arch}.tar.gz"
|
||||
Debug="Firebird-${Version}.${Build}-0-android-initial-${arch}-withDebugSymbols.tar.gz"
|
||||
fbRootDir=`pwd`
|
||||
|
||||
runTar()
|
||||
@ -36,7 +22,7 @@ chmod +x firebird/AfterUntar.sh
|
||||
cp ${fbRootDir}/src/dbs/security.sql firebird
|
||||
cp ${fbRootDir}/examples/empbuild/employe2.sql firebird
|
||||
tar -C firebird/lib --wildcards -xvf ../../extern/icu/icu_android.tar.xz icudt*.dat
|
||||
tar -C firebird/lib --wildcards --strip-components 1 -xvf ../../extern/icu/icu_android.tar.xz ${bits}/*
|
||||
tar -C firebird/lib --wildcards --strip-components 1 -xvf ../../extern/icu/icu_android.tar.xz ${arch}/*
|
||||
echo .
|
||||
echo .
|
||||
echo "Compress with deb-info"
|
||||
|
@ -6,12 +6,10 @@ endif
|
||||
|
||||
NDK_TOOLCHAIN ?= $(NDK)/toolchains/llvm/prebuilt/linux-x86_64
|
||||
|
||||
CROSS_SYSROOT:=$(NDK_TOOLCHAIN)/sysroot
|
||||
CROSS_PREFIX24:=$(NDK_TOOLCHAIN)/bin/i686-linux-android24-
|
||||
CROSS_PREFIX:=$(NDK_TOOLCHAIN)/bin/llvm-
|
||||
|
||||
CROSS_FLAGS:=--sysroot=$(CROSS_SYSROOT) \
|
||||
-I$(CROSS_SYSROOT)/usr/include -I$(ROOT)/gen/cross
|
||||
CROSS_FLAGS:=-I$(ROOT)/gen/cross
|
||||
|
||||
CXX:=$(CROSS_PREFIX24)clang++
|
||||
CC:=$(CROSS_PREFIX24)clang
|
||||
@ -42,8 +40,9 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
|
||||
|
||||
CROSS_CONFIG=android.x86
|
||||
|
||||
LDFLAGS += --sysroot=$(CROSS_SYSROOT) -static-libstdc++
|
||||
LDFLAGS += -static-libstdc++
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB)
|
||||
UDR_SUPPORT_LIBS :=
|
||||
|
||||
LINK_LIBS = $(DroidLibs)
|
||||
STATICLINK_LIBS = $(DroidLibs)
|
||||
|
@ -6,12 +6,10 @@ endif
|
||||
|
||||
NDK_TOOLCHAIN ?= $(NDK)/toolchains/llvm/prebuilt/linux-x86_64
|
||||
|
||||
CROSS_SYSROOT:=$(NDK_TOOLCHAIN)/sysroot
|
||||
CROSS_PREFIX24:=$(NDK_TOOLCHAIN)/bin/x86_64-linux-android24-
|
||||
CROSS_PREFIX:=$(NDK_TOOLCHAIN)/bin/llvm-
|
||||
|
||||
CROSS_FLAGS:=--sysroot=$(CROSS_SYSROOT) \
|
||||
-I$(CROSS_SYSROOT)/usr/include -I$(ROOT)/gen/cross
|
||||
CROSS_FLAGS:=-I$(ROOT)/gen/cross
|
||||
|
||||
CXX:=$(CROSS_PREFIX24)clang++
|
||||
CC:=$(CROSS_PREFIX24)clang
|
||||
@ -42,8 +40,9 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
|
||||
|
||||
CROSS_CONFIG=android.x86_64
|
||||
|
||||
LDFLAGS += --sysroot=$(CROSS_SYSROOT) -static-libstdc++
|
||||
LDFLAGS += -static-libstdc++
|
||||
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB)
|
||||
UDR_SUPPORT_LIBS :=
|
||||
|
||||
LINK_LIBS = $(DroidLibs)
|
||||
STATICLINK_LIBS = $(DroidLibs)
|
||||
|
5
extern/icu/android/env.sh
vendored
5
extern/icu/android/env.sh
vendored
@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
export CROSS_BUILD_DIR=`realpath ../linux`
|
||||
export ANDROID_NDK=${NDK}
|
||||
export ANDROID_TOOLCHAIN=${NDK_TOOLCHAIN}
|
||||
export PATH=$ANDROID_TOOLCHAIN/bin:$PATH
|
||||
[ -z "$NDK_TOOLCHAIN" ] && export NDK_TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
|
||||
export PATH=$NDK_TOOLCHAIN/bin:$PATH
|
||||
|
27
extern/icu/android/i686/config.sh
vendored
Executable file
27
extern/icu/android/i686/config.sh
vendored
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ../env.sh
|
||||
|
||||
../source/configure --prefix=$(pwd)/prebuilt \
|
||||
--host=i686-android-linux \
|
||||
--enable-static=no \
|
||||
--enable-shared \
|
||||
--enable-extras=no \
|
||||
--enable-strict=no \
|
||||
--enable-icuio=no \
|
||||
--enable-layout=no \
|
||||
--enable-layoutex=no \
|
||||
--enable-tools=no \
|
||||
--enable-tests=no \
|
||||
--enable-samples=no \
|
||||
--enable-renaming \
|
||||
--enable-dyload \
|
||||
--with-cross-build=$CROSS_BUILD_DIR \
|
||||
CFLAGS='-Os' \
|
||||
CXXFLAGS='--std=c++17' \
|
||||
LDFLAGS='-static-libstdc++' \
|
||||
CC=i686-linux-android24-clang \
|
||||
CXX=i686-linux-android24-clang++ \
|
||||
AR=llvm-ar \
|
||||
RANLIB=llvm-ranlib \
|
||||
--with-data-packaging=archive
|
6
extern/icu/android/i686/mk.sh
vendored
Executable file
6
extern/icu/android/i686/mk.sh
vendored
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ../env.sh
|
||||
|
||||
make -j15 && make install
|
||||
|
2
extern/icu/android/renameLinks.sh
vendored
Normal file → Executable file
2
extern/icu/android/renameLinks.sh
vendored
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
MAJOR=52
|
||||
MAJOR=63
|
||||
MINOR=1
|
||||
|
||||
rm -f libicu*so
|
||||
|
27
extern/icu/android/x86_64/config.sh
vendored
Executable file
27
extern/icu/android/x86_64/config.sh
vendored
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ../env.sh
|
||||
|
||||
../source/configure --prefix=$(pwd)/prebuilt \
|
||||
--host=x86_64-android-linux \
|
||||
--enable-static=no \
|
||||
--enable-shared \
|
||||
--enable-extras=no \
|
||||
--enable-strict=no \
|
||||
--enable-icuio=no \
|
||||
--enable-layout=no \
|
||||
--enable-layoutex=no \
|
||||
--enable-tools=no \
|
||||
--enable-tests=no \
|
||||
--enable-samples=no \
|
||||
--enable-renaming \
|
||||
--enable-dyload \
|
||||
--with-cross-build=$CROSS_BUILD_DIR \
|
||||
CFLAGS='-Os' \
|
||||
CXXFLAGS='--std=c++17' \
|
||||
LDFLAGS='-static-libstdc++' \
|
||||
CC=x86_64-linux-android24-clang \
|
||||
CXX=x86_64-linux-android24-clang++ \
|
||||
AR=llvm-ar \
|
||||
RANLIB=llvm-ranlib \
|
||||
--with-data-packaging=archive
|
6
extern/icu/android/x86_64/mk.sh
vendored
Executable file
6
extern/icu/android/x86_64/mk.sh
vendored
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ../env.sh
|
||||
|
||||
make -j15 && make install
|
||||
|
BIN
extern/icu/icu_android.tar.xz
vendored
BIN
extern/icu/icu_android.tar.xz
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user