2019-07-29 08:10:04 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
ci: migrate to GitHub Actions
* travis: disable build, disable deploy, add free aarch64/ppc64le/s390x builds
* scripts: cleanup of old CI scripts
* scripts: now port to GitHub Actions
* actions: fix extras checkout
* github: remove codeql action, turned out not to be very useful
* github: remove quiet flag on wget
* github: are we allowed to use envvars?
* github: add needed dependencies for linux
* github: install wget for windows
* scripts: convert our CPU architecture naming into what AppImage uses
* github: run scripts with bash explicitly
* github: first try to upload to GitHub Releases, enable amd64 win32 builds
* Use our uploadtool fork
* ci: include android, motomagx build for gha, refactor cirrus and travis ci scripts
* gha: try to fix build
* travis: try to fix build
* gha: try to fix upload, fix win32 build
* gha: use curl instead of wget, as it's preinstalled for windows. Fix Android build
* gha: add llvm repository, install clang-12 for android
* gha: motomagx: fail fast
* gha: android: explicitly set clang-12 as compiler and llvm-strip-12 as strip
* waifulib: xcompile: respect environment variables when using host compiler for Android
* waifulib: xcompile: use correct environ dict
* gha: try to fix -fuse-ld=lld with clang-12
* waifulib: xcompile: fix typo
* scripts: xcompile: fix motomagx build
* mainui: upgrade
* gha: fix android build, last time
* engine: wscript: disable crashhandler for magx
2021-07-03 20:21:09 +03:00
|
|
|
cd $GITHUB_WORKSPACE
|
2019-07-29 08:10:04 +03:00
|
|
|
|
2024-07-09 08:56:14 +03:00
|
|
|
ANDROID_COMMANDLINE_TOOLS_VER="11076708"
|
|
|
|
ANDROID_BUILD_TOOLS_VER="34.0.0"
|
|
|
|
ANDROID_PLATFORM_VER="android-34"
|
|
|
|
ANDROID_NDK_VER="26.3.11579264"
|
|
|
|
|
2023-11-03 16:36:55 +03:00
|
|
|
echo "Download JDK 17"
|
2024-11-20 07:04:47 +03:00
|
|
|
wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz -qO- | tar -xzf - || exit 1
|
2023-11-03 16:36:55 +03:00
|
|
|
export JAVA_HOME=$GITHUB_WORKSPACE/jdk-17.0.7+7
|
|
|
|
export PATH=$PATH:$JAVA_HOME/bin
|
|
|
|
|
|
|
|
echo "Download hlsdk-portable"
|
2024-11-20 06:29:21 +03:00
|
|
|
git clone --depth 1 --recursive https://github.com/FWGS/hlsdk-portable -b mobile_hacks 3rdparty/hlsdk-portable || exit 1
|
2023-11-03 16:36:55 +03:00
|
|
|
|
2024-11-20 07:04:47 +03:00
|
|
|
echo "Download SDL"
|
|
|
|
pushd 3rdparty
|
|
|
|
wget https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL2-$SDL_VERSION.tar.gz | tar -xzf -
|
2024-11-20 07:23:40 +03:00
|
|
|
mv SDL2-$SDL_VERSION 3rdparty/SDL
|
2024-11-20 07:04:47 +03:00
|
|
|
popd
|
|
|
|
|
2023-11-03 16:36:55 +03:00
|
|
|
echo "Download Android SDK"
|
ci: migrate to GitHub Actions
* travis: disable build, disable deploy, add free aarch64/ppc64le/s390x builds
* scripts: cleanup of old CI scripts
* scripts: now port to GitHub Actions
* actions: fix extras checkout
* github: remove codeql action, turned out not to be very useful
* github: remove quiet flag on wget
* github: are we allowed to use envvars?
* github: add needed dependencies for linux
* github: install wget for windows
* scripts: convert our CPU architecture naming into what AppImage uses
* github: run scripts with bash explicitly
* github: first try to upload to GitHub Releases, enable amd64 win32 builds
* Use our uploadtool fork
* ci: include android, motomagx build for gha, refactor cirrus and travis ci scripts
* gha: try to fix build
* travis: try to fix build
* gha: try to fix upload, fix win32 build
* gha: use curl instead of wget, as it's preinstalled for windows. Fix Android build
* gha: add llvm repository, install clang-12 for android
* gha: motomagx: fail fast
* gha: android: explicitly set clang-12 as compiler and llvm-strip-12 as strip
* waifulib: xcompile: respect environment variables when using host compiler for Android
* waifulib: xcompile: use correct environ dict
* gha: try to fix -fuse-ld=lld with clang-12
* waifulib: xcompile: fix typo
* scripts: xcompile: fix motomagx build
* mainui: upgrade
* gha: fix android build, last time
* engine: wscript: disable crashhandler for magx
2021-07-03 20:21:09 +03:00
|
|
|
mkdir -p sdk || exit 1
|
|
|
|
pushd sdk
|
2024-07-09 08:56:14 +03:00
|
|
|
wget https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_COMMANDLINE_TOOLS_VER}_latest.zip -qO sdk.zip || exit 1
|
2020-12-28 01:13:53 +00:00
|
|
|
unzip -q sdk.zip || exit 1
|
2023-11-03 16:36:55 +03:00
|
|
|
mv cmdline-tools tools
|
|
|
|
mkdir -p cmdline-tools
|
|
|
|
mv tools cmdline-tools/tools
|
|
|
|
unset ANDROID_SDK_ROOT
|
|
|
|
export ANDROID_HOME=$GITHUB_WORKSPACE/sdk
|
|
|
|
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/tools/bin
|
ci: migrate to GitHub Actions
* travis: disable build, disable deploy, add free aarch64/ppc64le/s390x builds
* scripts: cleanup of old CI scripts
* scripts: now port to GitHub Actions
* actions: fix extras checkout
* github: remove codeql action, turned out not to be very useful
* github: remove quiet flag on wget
* github: are we allowed to use envvars?
* github: add needed dependencies for linux
* github: install wget for windows
* scripts: convert our CPU architecture naming into what AppImage uses
* github: run scripts with bash explicitly
* github: first try to upload to GitHub Releases, enable amd64 win32 builds
* Use our uploadtool fork
* ci: include android, motomagx build for gha, refactor cirrus and travis ci scripts
* gha: try to fix build
* travis: try to fix build
* gha: try to fix upload, fix win32 build
* gha: use curl instead of wget, as it's preinstalled for windows. Fix Android build
* gha: add llvm repository, install clang-12 for android
* gha: motomagx: fail fast
* gha: android: explicitly set clang-12 as compiler and llvm-strip-12 as strip
* waifulib: xcompile: respect environment variables when using host compiler for Android
* waifulib: xcompile: use correct environ dict
* gha: try to fix -fuse-ld=lld with clang-12
* waifulib: xcompile: fix typo
* scripts: xcompile: fix motomagx build
* mainui: upgrade
* gha: fix android build, last time
* engine: wscript: disable crashhandler for magx
2021-07-03 20:21:09 +03:00
|
|
|
popd
|
2019-07-29 08:10:04 +03:00
|
|
|
|
2023-11-03 16:36:55 +03:00
|
|
|
echo "Download all needed tools and Android NDK"
|
|
|
|
yes | sdkmanager --licenses > /dev/null 2>/dev/null # who even reads licenses? :)
|
2024-07-09 08:56:14 +03:00
|
|
|
sdkmanager --install build-tools\;${ANDROID_BUILD_TOOLS_VER} platform-tools platforms\;${ANDROID_PLATFORM_VER} ndk\;${ANDROID_NDK_VER}
|