mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-10 23:27:53 +00:00
github: build android with NDK compiler
This commit is contained in:
parent
f60112773f
commit
dc186c3cba
1
.github/workflows/c-cpp.yml
vendored
1
.github/workflows/c-cpp.yml
vendored
@ -37,7 +37,6 @@ jobs:
|
|||||||
GH_CPU_ARCH: ${{ matrix.targetarch }}
|
GH_CPU_ARCH: ${{ matrix.targetarch }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ANDROID_SDK_TOOLS_VER: 4333796
|
ANDROID_SDK_TOOLS_VER: 4333796
|
||||||
ANDROID_NDK_VER: r10e
|
|
||||||
UPLOADTOOL_ISPRERELEASE: true
|
UPLOADTOOL_ISPRERELEASE: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -12,11 +12,6 @@ elif [[ "$GH_CPU_ARCH" == "32&64" ]]; then
|
|||||||
export ARCHS="armeabi armeabi-v7a x86 aarch64 x86_64"
|
export ARCHS="armeabi armeabi-v7a x86 aarch64 x86_64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export API=21
|
|
||||||
export TOOLCHAIN=host
|
|
||||||
export CC=clang-12
|
|
||||||
export CXX=clang++-12
|
|
||||||
export STRIP=llvm-strip-12
|
|
||||||
sh compile.sh release
|
sh compile.sh release
|
||||||
|
|
||||||
if [[ "$GH_CPU_ARCH" == "64" ]]; then
|
if [[ "$GH_CPU_ARCH" == "64" ]]; then
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "Install packages"
|
|
||||||
echo "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main" | sudo tee -a /etc/apt/sources.list
|
|
||||||
wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install clang-12 lld-12 llvm-12 llvm-12-tools p7zip-full
|
|
||||||
sudo rm /usr/bin/lld /usr/bin/ld.lld
|
|
||||||
sudo ln -s /usr/bin/lld-12 /usr/bin/lld
|
|
||||||
sudo ln -s /usr/bin/ld.lld-12 /usr/bin/ld.lld
|
|
||||||
|
|
||||||
echo "Download HLSDK"
|
echo "Download HLSDK"
|
||||||
|
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
@ -23,16 +14,7 @@ popd
|
|||||||
|
|
||||||
echo "Download all needed tools and NDK"
|
echo "Download all needed tools and NDK"
|
||||||
yes | sdk/tools/bin/sdkmanager --licenses > /dev/null 2>/dev/null # who even reads licenses? :)
|
yes | sdk/tools/bin/sdkmanager --licenses > /dev/null 2>/dev/null # who even reads licenses? :)
|
||||||
NDK_BUNDLE="ndk-bundle"
|
sdk/tools/bin/sdkmanager --install build-tools\;29.0.1 platform-tools platforms\;android-29 ndk-bundle > /dev/null 2>/dev/null
|
||||||
if [ "$ANDROID_NDK_VER" = "r10e" ]; then
|
|
||||||
NDK_BUNDLE=""
|
|
||||||
fi
|
|
||||||
sdk/tools/bin/sdkmanager --install build-tools\;29.0.1 platform-tools platforms\;android-29 $NDK_BUNDLE > /dev/null 2>/dev/null
|
|
||||||
if [ "$ANDROID_NDK_VER" = "r10e" ]; then
|
|
||||||
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip -qO ndk.zip > /dev/null || exit 1
|
|
||||||
unzip -q ndk.zip || exit 1
|
|
||||||
mv android-ndk-r10e sdk/ndk-bundle
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Download Xash3D FWGS Android source"
|
echo "Download Xash3D FWGS Android source"
|
||||||
git clone --depth 1 https://github.com/FWGS/xash3d-android-project -b waf android || exit 1
|
git clone --depth 1 https://github.com/FWGS/xash3d-android-project -b waf android || exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user