From 21a31ec81dcdc24bff85cdbe5108ea35ebdb48eb Mon Sep 17 00:00:00 2001 From: Alibek Omarov #SupportRMS Date: Sat, 3 Jul 2021 20:21:09 +0300 Subject: [PATCH] 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 --- .cirrus.yml | 12 +- .github/workflows/c-cpp.yml | 71 ++++++ .github/workflows/codeql-analysis.yml | 64 ----- .travis.yml | 230 ++---------------- engine/wscript | 3 + mainui | 2 +- scripts/build_mingw_engine.sh | 20 -- scripts/build_osx_engine.sh | 12 - scripts/build_windows_engine.sh | 28 --- .../build_freebsd.sh} | 0 scripts/continious_upload.sh | 22 +- scripts/gha/build_android.sh | 26 ++ .../build_linux.sh} | 86 +++---- .../build_motomagx.sh} | 8 +- scripts/gha/build_win32.sh | 37 +++ .../deps_android.sh} | 38 ++- scripts/gha/deps_linux.sh | 24 ++ scripts/gha/deps_motomagx.sh | 15 ++ .../deps_win32.sh} | 3 +- scripts/lib.sh | 12 + scripts/travis-deploy.sh | 89 ------- scripts/travis/build_linux.sh | 103 ++++++++ .../deps_common.sh} | 0 .../deps_linux.sh} | 0 scripts/travis_mingw_deps.sh | 3 - scripts/travis_motomagx_deps.sh | 9 - scripts/travis_osx_deps.sh | 6 - scripts/waifulib/xcompile.py | 26 +- scripts/yadisk_clear.sh | 5 - 29 files changed, 417 insertions(+), 537 deletions(-) create mode 100644 .github/workflows/c-cpp.yml delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100755 scripts/build_mingw_engine.sh delete mode 100755 scripts/build_osx_engine.sh delete mode 100644 scripts/build_windows_engine.sh rename scripts/{build_freebsd_engine.sh => cirrus/build_freebsd.sh} (100%) create mode 100755 scripts/gha/build_android.sh rename scripts/{build_linux_engine.sh => gha/build_linux.sh} (50%) rename scripts/{build_motomagx_engine.sh => gha/build_motomagx.sh} (75%) create mode 100755 scripts/gha/build_win32.sh rename scripts/{travis_android_deps.sh => gha/deps_android.sh} (56%) create mode 100755 scripts/gha/deps_linux.sh create mode 100755 scripts/gha/deps_motomagx.sh rename scripts/{travis_windows_deps.sh => gha/deps_win32.sh} (84%) mode change 100644 => 100755 delete mode 100755 scripts/travis-deploy.sh create mode 100755 scripts/travis/build_linux.sh rename scripts/{travis_common_deps.sh => travis/deps_common.sh} (100%) rename scripts/{travis_linux_deps.sh => travis/deps_linux.sh} (100%) delete mode 100644 scripts/travis_mingw_deps.sh delete mode 100644 scripts/travis_motomagx_deps.sh delete mode 100755 scripts/travis_osx_deps.sh delete mode 100755 scripts/yadisk_clear.sh diff --git a/.cirrus.yml b/.cirrus.yml index bbe178dd..06d46491 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,8 +7,8 @@ task: - pkg install -y git sdl2 python - git submodule update --init --recursive test_script: - # - ./scripts/build_freebsd_engine.sh dedicated - - ./scripts/build_freebsd_engine.sh + - ./scripts/cirrus/build_freebsd.sh dedicated + - ./scripts/cirrus/build_freebsd.sh full task: name: freebsd-12-amd64 @@ -19,8 +19,8 @@ task: - pkg install -y git sdl2 python - git submodule update --init --recursive test_script: - # - ./scripts/build_freebsd_engine.sh dedicated - - ./scripts/build_freebsd_engine.sh + - ./scripts/cirrus/build_freebsd.sh dedicated + - ./scripts/cirrus/build_freebsd.sh full task: name: freebsd-13-amd64 @@ -31,5 +31,5 @@ task: - pkg install -y git sdl2 python - git submodule update --init --recursive test_script: - # - ./scripts/build_freebsd_engine.sh dedicated - - ./scripts/build_freebsd_engine.sh + - ./scripts/cirrus/build_freebsd.sh dedicated + - ./scripts/cirrus/build_freebsd.sh full diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 00000000..4950e208 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,71 @@ +name: Build & Deploy Engine +on: [push, pull_request] +jobs: + build: + runs-on: ${{ matrix.os }} + continue-on-error: true + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-18.04 + targetos: linux + targetarch: amd64 + - os: ubuntu-18.04 + targetos: linux + targetarch: i386 + + - os: ubuntu-18.04 + targetos: android + targetarch: 32 + - os: ubuntu-18.04 + targetos: android + targetarch: 64 + + - os: ubuntu-18.04 + targetos: motomagx + targetarch: armv6 + + - os: windows-latest + targetos: win32 + targetarch: amd64 + - os: windows-latest + targetos: win32 + targetarch: i386 + env: + SDL_VERSION: 2.0.14 + GH_CPU_ARCH: ${{ matrix.targetarch }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ANDROID_SDK_TOOLS_VER: 4333796 + ANDROID_NDK_VER: r10e + UPLOADTOOL_ISPRERELEASE: true + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Checkout xash-extras + if: matrix.targetos != 'android' + uses: actions/checkout@v2 + with: + repository: FWGS/xash-extras + path: xash-extras + + - name: Install dependencies + run: bash scripts/gha/deps_${{ matrix.targetos }}.sh + + - name: Build engine + run: bash scripts/gha/build_${{ matrix.targetos }}.sh + + - name: Upload engine (android) + if: matrix.targetos == 'android' + run: bash scripts/continious_upload.sh xashdroid-${{ matrix.targetarch }}.apk + - name: Upload engine (motomagx) + if: matrix.targetos == 'motomagx' + run: bash scripts/continious_upload.sh xash3d-fwgs-magx.7z + - name: Upload engine (linux) + if: matrix.targetos == 'linux' + run: bash scripts/continious_upload.sh xash3d-fwgs-${{ matrix.targetarch }}.AppImage xashds-linux-${{ matrix.targetarch }} + - name: Upload engine (windows) + if: matrix.targetos == 'win32' + run: bash scripts/continious_upload.sh xash3d-fwgs-win32-${{ matrix.targetarch }}.7z xash3d-fwgs-vc2008-sln-${{ matrix.targetarch }}.7z diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 9eb75911..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,64 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - push: - branches: [master] - pull_request: - # The branches below must be a subset of the branches above - branches: [master] - schedule: - - cron: '0 19 * * 0' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['cpp'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - - run: | - sudo apt update - sudo apt install build-essential python libsdl2-dev libfontconfig-dev libfreetype6-dev - ./waf configure -T release -8 - ./waf build - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.travis.yml b/.travis.yml index b070a7f2..2ac79f6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,211 +3,33 @@ compiler: gcc sudo: false env: global: - - SDL_VERSION=2.0.8 - - DEPLOY_BRANCH=anewengine + - SDL_VERSION=2.0.14 git: depth: 50 submodules: true -jdk: - - oraclejdk8 -jobs: - include: - - stage: init - name: "Initialize webdav cache" - os: linux - cache: false - script: - - sh scripts/yadisk_clear.sh - - stage: build - name: "Build for Windows MSVC" - cache: ccache - os: windows - before_script: - - sh scripts/travis_common_deps.sh - - sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh - script: - - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh - after_script: - - sh scripts/continious_upload.sh xash3d-win32-vc.7z xash3d-vc2008-sln.7z - - # ... - name: "Build for Linux i686" - cache: ccache - os: linux - dist: xenial - addons: - apt: - packages: - - gcc-multilib - - g++-multilib - - libx11-dev:i386 - - libxext-dev:i386 - - x11-utils - - libgl1-mesa-dev - - libasound-dev - - libstdc++6:i386 - - libfuse2:i386 - - zlib1g:i386 - - unzip - before_script: - - export ARCH=i686 - - sh scripts/travis_common_deps.sh - - sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh - script: - - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh full - - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh dedicated - after_script: - - ccache --show-stats - - sh scripts/continious_upload.sh xash3d-fwgs-${ARCH}.AppImage xashds-linux-${ARCH} - - # ... - name: "Build for Android" - cache: ccache - os: linux - dist: xenial - language: java # we want xenial, so just java, not android - jdk: openjdk8 - addons: - apt: - packages: - - clang-9 - - lld-9 - - p7zip-full - sources: - - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' - key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' - before_script: - - export ANDROID_HOME=$TRAVIS_BUILD_DIR/sdk - - sh scripts/travis_common_deps.sh - - sh scripts/travis_android_deps.sh r10e - - export ANDROID_SDK_HOME=$ANDROID_HOME - - export ANDROID_NDK_HOME=$ANDROID_SDK_HOME/ndk-bundle - script: - - cd android - - export ARCHS="armeabi armeabi-v7a x86" - - export TOOLCHAIN="host" - - sh compile.sh release - after_script: - - ccache --show-stats - - sh ../scripts/continious_upload.sh xashdroid.apk - - # ... - name: "Build for Android 64" - cache: ccache - os: linux - dist: xenial - language: java # we want xenial, so just java, not android - jdk: openjdk8 - addons: - apt: - packages: - - clang-9 - - lld-9 - - p7zip-full - sources: - - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' - key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' - before_script: - - export ANDROID_HOME=$TRAVIS_BUILD_DIR/sdk - - sh scripts/travis_common_deps.sh - - sh scripts/travis_android_deps.sh r10e - - export ANDROID_SDK_HOME=$ANDROID_HOME - - export ANDROID_NDK_HOME=$ANDROID_SDK_HOME/ndk-bundle - script: - - cd android - - export ARCHS="aarch64 x86_64" - - export API=21 - - export TOOLCHAIN="host" - - sh compile.sh release - after_script: - - ccache --show-stats - - mv xashdroid.apk xashdroid-64-test.apk - - sh ../scripts/continious_upload.sh xashdroid-64-test.apk - - # ... - name: "Build for Linux amd64" - cache: ccache - os: linux - dist: xenial - addons: - apt: - packages: - - libx11-dev - - libxext-dev - - x11-utils - - libgl1-mesa-dev - - libasound-dev - - libstdc++6 - - libfuse2 - - unzip - before_script: - - export ARCH=x86_64 - - sh scripts/travis_common_deps.sh - - sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh - script: - - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh full - - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh dedicated - after_script: - - ccache --show-stats - - sh scripts/continious_upload.sh xash3d-fwgs-${ARCH}.AppImage xashds-linux-${ARCH} -# - # ... -# name: "Build for Windows MinGW" -# cache: ccache -# os: linux -# dist: xenial -# addons: -# apt: -# packages: -# - mingw-w64-i686-dev -# - binutils-mingw-w64-i686 -# - gcc-mingw-w64-i686 -# - g++-mingw-w64-i686 -# - p7zip-full -# before_script: -# - sh scripts/travis_common_deps.sh -# - sh scripts/travis_mingw_deps.sh -# script: -# - sh scripts/build_mingw_engine.sh -# after_script: -# - ccache --show-stats -# - sh scripts/continious_upload.sh xash3d-mingw.7z -# - # ... -# name: "Build for OSX" -# cache: ccache -# os: osx -# before_script: -# - sh scripts/travis_common_deps.sh -# - sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh -# script: -# - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh -# after_script: -# - sh scripts/continious_upload.sh xash3d-osx.tar.bz2 - - # ... - name: "Build for MotoMAGX" - sudo: true - cache: ccache - os: linux - dist: xenial - addons: - apt: - packages: - - libc6:i386 - - libstdc++6:i386 - - gcc-multilib - - g++-multilib - - p7zip-full - sources: - - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' - key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' - before_script: - - sh scripts/travis_common_deps.sh - - sh scripts/travis_motomagx_deps.sh - script: - - sh scripts/build_motomagx_engine.sh - after_script: - - cd $TRAVIS_BUILD_DIR - - ccache --show-stats - - sh scripts/continious_upload.sh xash3d-magx.7z - - stage: deploy - name: "Deploy to github repo" - os: linux - cache: false - script: - - sh scripts/travis-deploy.sh xash3d-fwgs-i686.AppImage xash3d-fwgs-x86_64.AppImage xash3d-win32-vc.7z xash3d-vc2008-sln.7z xashdroid.apk xashdroid-64-test.apk xashds-linux-i686 xashds-linux-x86_64 xash3d-magx.7z +os: linux +arch: + - aarch64 + - ppc64le + - s390x +addons: + apt: + update: true + packages: + - libx11-dev + - libxext-dev + - x11-utils + - libgl1-mesa-dev + - libasound-dev + - libstdc++6 + - libfuse2 + - unzip +before_script: + - sh scripts/travis/deps_common.sh + - sh scripts/travis/deps_${TRAVIS_OS_NAME}.sh +script: + - sh scripts/travis/build_${TRAVIS_OS_NAME}.sh +after_script: + - ccache --show-stats + - sh scripts/continious_upload.sh xash3d-fwgs-${ARCH}.tar.xz xashds-linux-${ARCH} diff --git a/engine/wscript b/engine/wscript index 1e080128..cf64f7b4 100644 --- a/engine/wscript +++ b/engine/wscript @@ -82,6 +82,9 @@ def configure(conf): if hasattr(conf.options, 'DLLEMU'): conf.define_cond('XASH_DLL_LOADER', conf.options.DLLEMU) + if conf.env.MAGX: + conf.define('XASH_CRASHHANDLER', 0) + conf.env.ENGINE_TESTS = conf.options.ENGINE_TESTS conf.define_cond('XASH_ENGINE_TESTS', conf.env.ENGINE_TESTS) diff --git a/mainui b/mainui index f12659f1..136a544f 160000 --- a/mainui +++ b/mainui @@ -1 +1 @@ -Subproject commit f12659f17f91111b534ed89170480bebc79fbc9e +Subproject commit 136a544f60534cdcd11aea9c236ddd529c71ac11 diff --git a/scripts/build_mingw_engine.sh b/scripts/build_mingw_engine.sh deleted file mode 100755 index 7eea0e71..00000000 --- a/scripts/build_mingw_engine.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. scripts/lib.sh - -# Build engine -cd $TRAVIS_BUILD_DIR -export CC="ccache i686-w64-mingw32-gcc" -export CXX="ccache i686-w64-mingw32-g++" -export CFLAGS="-static-libgcc -no-pthread -msse2 -O1 -g -gdwarf-2" # add sse2 to workaround mingw multiple definition of MemoryBarrier bug -export CXXFLAGS="-static-libgcc -static-libstdc++ -no-pthread -msse2" -export LDFLAGS="-static-libgcc -static-libstdc++ -no-pthread -Wl,--allow-multiple-definition" # workaround some other mingw bugs -export WINRC="i686-w64-mingw32-windres" -rm -rf build # clean build directory -./waf configure -s "SDL2_mingw/i686-w64-mingw32/" --build-type=none --prefix="." --win-style-install -v --enable-utils || die # can't compile VGUI support on MinGW, due to differnet C++ ABI -./waf build -v || die -cp $TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32//bin/SDL2.dll . # Install SDL2 -cp vgui_support_bin/vgui_support.dll . -./waf install || die - -7z a -t7z $TRAVIS_BUILD_DIR/xash3d-mingw.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe diff --git a/scripts/build_osx_engine.sh b/scripts/build_osx_engine.sh deleted file mode 100755 index e5626608..00000000 --- a/scripts/build_osx_engine.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -. scripts/lib.sh - -# Build engine - -cd $TRAVIS_BUILD_DIR -python waf configure -s "$HOME/Library/Frameworks/SDL2.framework/" -T debug --prefix="pkg/" --win-style-install --enable-utils || die -python waf build || die -python waf install || die -cp ~/Library/Frameworks/SDL2.framework/SDL2 pkg/libSDL2.dylib -tar -cjf $TRAVIS_BUILD_DIR/xash3d-osx.tar.bz2 pkg/* diff --git a/scripts/build_windows_engine.sh b/scripts/build_windows_engine.sh deleted file mode 100644 index 34c02e93..00000000 --- a/scripts/build_windows_engine.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -. scripts/lib.sh - -# Build engine -cd $TRAVIS_BUILD_DIR - -# NOTE: to build with other version use --msvc_version during configuration -# NOTE: sometimes you may need to add WinSDK to %PATH% -./waf.bat configure -s "$TRAVIS_BUILD_DIR/SDL2_VC" -T "debug" --prefix=`pwd` --enable-utils || die -./waf.bat build -v || die -echo After build - -./waf.bat install || die -cp $TRAVIS_BUILD_DIR/SDL2_VC/lib/x86/SDL2.dll . # Install SDL2 -cp vgui-dev/lib/win32_vc6/vgui.dll . - -7z a -t7z $TRAVIS_BUILD_DIR/xash3d-win32-vc.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe *.pdb - -echo "Generating VC2008 project" -rm -rf vc2008/ -mkdir vc2008/ -./waf.bat msdev -cp *.sln vc2008/ -find . -name "*.vcproj" -exec cp --parents \{\} vc2008/ \; -rm -rf vc2008/vc2008 # HACKHACK - -7z a -t7z $TRAVIS_BUILD_DIR/xash3d-vc2008-sln.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -r vc2008 diff --git a/scripts/build_freebsd_engine.sh b/scripts/cirrus/build_freebsd.sh similarity index 100% rename from scripts/build_freebsd_engine.sh rename to scripts/cirrus/build_freebsd.sh diff --git a/scripts/continious_upload.sh b/scripts/continious_upload.sh index ff9fc9a9..c51c16af 100755 --- a/scripts/continious_upload.sh +++ b/scripts/continious_upload.sh @@ -6,24 +6,8 @@ set +x -# Disabled until GitHub sends prereleases to email +curl "https://raw.githubusercontent.com/FWGS/uploadtool/gha-fixes/upload.sh" -o upload.sh +chmod +x upload.sh -# wget -O upload.sh "https://raw.githubusercontent.com/FWGS/uploadtool/master/upload.sh" -# chmod +x upload.sh +bash ./upload.sh $* -# export GITHUB_TOKEN=$GH_TOKEN -# ./upload.sh $* - -################################## -# -# Yandex.Disk -# -################################## - -FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH -WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru - -for file in $*; do - echo "Uploading $file..." - curl -T $file $WEBDAV_SRV/$FOLDER_NAME/$file -done diff --git a/scripts/gha/build_android.sh b/scripts/gha/build_android.sh new file mode 100755 index 00000000..03b85d7b --- /dev/null +++ b/scripts/gha/build_android.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +export ANDROID_SDK_HOME=$GITHUB_WORKSPACE/sdk +export ANDROID_NDK_HOME=$ANDROID_SDK_HOME/ndk-bundle + +pushd android +if [[ "$GH_CPU_ARCH" == "32" ]]; then + export ARCHS="armeabi armeabi-v7a x86" +elif [[ "$GH_CPU_ARCH" == "64" ]]; then + export ARCHS="aarch64 x86_64" +elif [[ "$GH_CPU_ARCH" == "32&64" ]]; then + export ARCHS="armeabi armeabi-v7a x86 aarch64 x86_64" +fi + +export API=21 +export TOOLCHAIN=host +export CC=clang-12 +export CXX=clang++-12 +export STRIP=llvm-strip-12 +sh compile.sh release + +if [[ "$GH_CPU_ARCH" == "64" ]]; then + mv xashdroid.apk ../xashdroid-64.apk +else + mv xashdroid.apk ../xashdroid-32.apk +fi diff --git a/scripts/build_linux_engine.sh b/scripts/gha/build_linux.sh similarity index 50% rename from scripts/build_linux_engine.sh rename to scripts/gha/build_linux.sh index fcb63485..6c5f1d64 100755 --- a/scripts/build_linux_engine.sh +++ b/scripts/gha/build_linux.sh @@ -2,39 +2,36 @@ . scripts/lib.sh -if [ "$1" = "dedicated" ]; then - APP=xashds - APPNAME=$APP-linux-$ARCH # since we have no extension, mark executable name that it for linux -else # elif [ "$1" = "full" ]; then - APP=xash3d-fwgs - APPNAME=$APP-$ARCH -fi - -if [ ! "$ARCH" ]; then - ARCH=i686 -fi - -# set up ccache -export CC="ccache gcc" -export CXX="ccache g++" - +APP=xash3d-fwgs +APPDIR=$APP.AppDir +APPIMAGE=$APP-$ARCH.AppImage build_sdl2() { - cd "$TRAVIS_BUILD_DIR"/SDL2_src || die - if [ "$ARCH" = "i686" ]; then + cd "$BUILDDIR"/SDL2_src || die + if [ "$ARCH" = "i386" ]; then export CFLAGS="-msse2 -march=i686 -m32 -ggdb -O2" export LDFLAGS="-m32" fi - ./configure --disable-render --disable-haptic --disable-power --disable-filesystem \ - --disable-file --disable-libudev --disable-dbus --disable-ibus \ - --disable-ime --disable-fcitx \ - --enable-alsa-shared --enable-pulseaudio-shared \ - --enable-wayland-shared --enable-x11-shared \ + ./configure \ + --disable-render \ + --disable-haptic \ + --disable-power \ + --disable-filesystem \ + --disable-file \ + --disable-libudev \ + --disable-dbus \ + --disable-ibus \ + --disable-ime \ + --disable-fcitx \ + --enable-alsa-shared \ + --enable-pulseaudio-shared \ + --enable-wayland-shared \ + --enable-x11-shared \ --prefix / || die # get rid of /usr/local stuff make -j2 || die - mkdir -p "$TRAVIS_BUILD_DIR"/SDL2_linux - make install DESTDIR="$TRAVIS_BUILD_DIR"/SDL2_linux || die + mkdir -p "$BUILDDIR"/SDL2_linux + make install DESTDIR="$BUILDDIR"/SDL2_linux || die export CFLAGS="" export LDFLAGS="" } @@ -42,16 +39,15 @@ build_sdl2() build_engine() { # Build engine - cd "$TRAVIS_BUILD_DIR" || die + cd "$BUILDDIR" || die - if [ "$ARCH" = "x86_64" ]; then # we need enabling 64-bit target only on Intel-compatible CPUs + if [ "$ARCH" = "amd64" ]; then # we need enabling 64-bit target only on Intel-compatible CPUs AMD64="-8" fi - if [ "$APP" = "xashds" ]; then + if [ "$1" = "dedicated" ]; then ./waf configure -T release -d -W $AMD64 || die - elif [ "$APP" = "xash3d-fwgs" ]; then - APPDIR=$APPNAME.AppDir + elif [ "$1" = "full" ]; then ./waf configure --sdl2=SDL2_linux -T release --enable-stb --prefix="$APPDIR" -W $AMD64 --enable-utils || die else die @@ -62,10 +58,7 @@ build_engine() build_appimage() { - APPDIR=$APPNAME.AppDir - APPIMAGE=$APPNAME.AppImage - - cd "$TRAVIS_BUILD_DIR" || die + cd "$BUILDDIR" || die ./waf install || die @@ -73,7 +66,7 @@ build_appimage() python3 scripts/makepak.py xash-extras/ "$APPDIR/extras.pak" cp SDL2_linux/lib/libSDL2-2.0.so.0 "$APPDIR/" - if [ "$ARCH" = "i686" ]; then + if [ "$ARCH" = "i386" ]; then cp vgui-dev/lib/vgui.so "$APPDIR/" fi @@ -101,26 +94,21 @@ EOF cat > "$APPDIR/$APP.desktop" < Xash/run.sh << 'EOF' mypath=${0%/*} @@ -30,4 +30,4 @@ exec $mypath/xash -dev $@ EOF -7z a -t7z $TRAVIS_BUILD_DIR/xash3d-magx.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -r Xash/ +7z a -t7z $GITHUB_WORKSPACE/xash3d-fwgs-magx.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -r Xash/ diff --git a/scripts/gha/build_win32.sh b/scripts/gha/build_win32.sh new file mode 100755 index 00000000..c3934d11 --- /dev/null +++ b/scripts/gha/build_win32.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +. scripts/lib.sh + +# Build engine +cd $BUILDDIR + +if [ "$ARCH" = "amd64" ]; then # we need enabling 64-bit target only on Intel-compatible CPUs + AMD64="-8" +fi + +# NOTE: to build with other version use --msvc_version during configuration +# NOTE: sometimes you may need to add WinSDK to %PATH% +./waf.bat configure -s "SDL2_VC" -T "debug" --prefix=`pwd` --enable-utils $AMD64 || die +./waf.bat build -v || die +./waf.bat install || die + +if [ "$ARCH" = "i386" ]; then + cp SDL2_VC/lib/x86/SDL2.dll . # Install SDL2 + cp vgui-dev/lib/win32_vc6/vgui.dll . +elif [ "$ARCH" = "amd64" ]; then + cp SDL2_VC/lib/x64/SDL2.dll . +else + die +fi + +7z a -t7z $BUILDDIR/xash3d-fwgs-win32-$ARCH.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe *.pdb + +echo "Generating VC2008 project" +rm -rf vc2008/ +mkdir vc2008/ +./waf.bat msdev +cp *.sln vc2008/ +find . -name "*.vcproj" -exec cp --parents \{\} vc2008/ \; +rm -rf vc2008/vc2008 # HACKHACK + +7z a -t7z $BUILDDIR/xash3d-fwgs-vc2008-sln-$ARCH.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -r vc2008 diff --git a/scripts/travis_android_deps.sh b/scripts/gha/deps_android.sh similarity index 56% rename from scripts/travis_android_deps.sh rename to scripts/gha/deps_android.sh index ce9c9b2b..e1809ec0 100755 --- a/scripts/travis_android_deps.sh +++ b/scripts/gha/deps_android.sh @@ -1,41 +1,53 @@ #!/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" -cd $TRAVIS_BUILD_DIR +cd $GITHUB_WORKSPACE git clone --depth 1 --recursive https://github.com/FWGS/hlsdk-xash3d -b mobile_hacks hlsdk || exit 1 echo "Download and unpack Android SDK" -mkdir -p sdk && cd sdk +mkdir -p sdk || exit 1 +pushd sdk wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -qO sdk.zip > /dev/null || exit 1 unzip -q sdk.zip || exit 1 -cd $TRAVIS_BUILD_DIR +popd echo "Download all needed tools and NDK" yes | sdk/tools/bin/sdkmanager --licenses > /dev/null 2>/dev/null # who even reads licenses? :) NDK_BUNDLE="ndk-bundle" -if [ "$1" = "r10e" ]; then +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 [ "$1" = "r10e" ]; then +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" git clone --depth 1 https://github.com/FWGS/xash3d-android-project -b waf android || exit 1 -cd android - -echo "Fetching submodules" -git submodule update --init xash-extras || exit 1 +pushd android mv xash3d-fwgs xash3d-fwgs-sub -ln -s $TRAVIS_BUILD_DIR xash3d-fwgs +ln -s $GITHUB_WORKSPACE xash3d-fwgs echo "Installed Xash3D FWGS source symlink" mv hlsdk-xash3d hlsdk-xash3d-sub -ln -s $TRAVIS_BUILD_DIR/hlsdk hlsdk-xash3d -echo "Install HLSDK source symlink" +ln -s $GITHUB_WORKSPACE/hlsdk hlsdk-xash3d +echo "Installed HLSDK source symlink" -cd $TRAVIS_BUILD_DIR +mv xash-extras xash-extras-sub +ln -s $GITHUB_WORKSPACE/xash-extras xash-extras +echo "Installed xash-extras symlink" + +popd diff --git a/scripts/gha/deps_linux.sh b/scripts/gha/deps_linux.sh new file mode 100755 index 00000000..9fcfd984 --- /dev/null +++ b/scripts/gha/deps_linux.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +cd $GITHUB_WORKSPACE + +if [ "$GH_CPU_ARCH" == "i386" ]; then + sudo dpkg --add-architecture i386 + sudo apt update + sudo apt install gcc-multilib g++-multilib libx11-dev:i386 libxext-dev:i386 x11-utils libgl1-mesa-dev libasound-dev libstdc++6:i386 libfuse2:i386 zlib1g:i386 + + wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-i686.AppImage" -O appimagetool.AppImage +elif [ "$GH_CPU_ARCH" == "amd64" ]; then + sudo apt update + sudo apt install gcc-multilib g++-multilib libx11-dev libxext-dev x11-utils libgl1-mesa-dev libasound-dev libstdc++6 libfuse2 zlib1g + + wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" -O appimagetool.AppImage +else + exit 1 +fi + +chmod +x appimagetool.AppImage + +wget http://libsdl.org/release/SDL2-$SDL_VERSION.zip -O SDL2.zip +unzip -q SDL2.zip +mv SDL2-$SDL_VERSION SDL2_src diff --git a/scripts/gha/deps_motomagx.sh b/scripts/gha/deps_motomagx.sh new file mode 100755 index 00000000..d3771689 --- /dev/null +++ b/scripts/gha/deps_motomagx.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cd $GITHUB_WORKSPACE + +sudo dpkg --add-architecture i386 +sudo apt update +sudo apt install libc6:i386 libstdc++6:i386 gcc-multilib g++-multilib p7zip-full + +sudo mkdir -p /opt/toolchains + +pushd /opt/toolchains/ +sudo git clone https://github.com/a1batross/motomagx_toolchain motomagx --depth=1 +popd + +git clone https://github.com/FWGS/hlsdk-xash3d hlsdk -b mobile_hacks --depth=1 diff --git a/scripts/travis_windows_deps.sh b/scripts/gha/deps_win32.sh old mode 100644 new mode 100755 similarity index 84% rename from scripts/travis_windows_deps.sh rename to scripts/gha/deps_win32.sh index 52644b4d..f73c47ea --- a/scripts/travis_windows_deps.sh +++ b/scripts/gha/deps_win32.sh @@ -1,4 +1,5 @@ -# SDL2 for VC prebuilt +#!/bin/bash + curl http://libsdl.org/release/SDL2-devel-$SDL_VERSION-VC.zip -o SDL2.zip unzip -q SDL2.zip mv SDL2-$SDL_VERSION SDL2_VC diff --git a/scripts/lib.sh b/scripts/lib.sh index ee1bebd0..d62cee6a 100644 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -3,3 +3,15 @@ die() cat build/config.log exit 1 } + +if [ -n "$TRAVIS_BUILD_DIR" ]; then + BUILDDIR=$TRAVIS_BUILD_DIR +elif [ -n "$GITHUB_WORKSPACE" ]; then + BUILDDIR=$GITHUB_WORKSPACE +fi + +if [ -n "$TRAVIS_CPU_ARCH" ]; then + ARCH=$TRAVIS_CPU_ARCH +elif [ -n "$GH_CPU_ARCH" ]; then + ARCH=$GH_CPU_ARCH +fi diff --git a/scripts/travis-deploy.sh b/scripts/travis-deploy.sh deleted file mode 100755 index 94d59ad1..00000000 --- a/scripts/travis-deploy.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash - -die() -{ - echo $1 - exit 1 -} - -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo "Travis should not deploy from pull requests" - exit 0 -fi - -append_readme() -{ - for arg in $FILES; do - echo \* [$arg]\(https://github.com/FWGS/xash3d-deploy/blob/$DEPLOY_BRANCH-$TRAVIS_BRANCH/$arg\?raw\=true\) >> README.md - echo >> README.md - done -} - -generate_continious_tag() -{ - if [ $TRAVIS_BRANCH == "master" ]; then - echo "continuous" - else - echo "continuous-$TRAVIS_BRANCH" - fi -} - -generate_readme() -{ - TAG=$(generate_continuous_tag) -# echo \# Moved to GitHub Releases at [here]\(https://github.com/FWGS/xash3d-fwgs/releases/tag/$TAG\) >> README.md -# echo >> README.md -# echo >> README.md -# echo >> README.md -# echo >> README.md - echo \# $TRAVIS_BRANCH branch autobuilds from $DEPLOY_BRANCH >> README.md - echo >> README.md - echo Short changelog: >> README.md - echo \`\`\` >> README.md - (cd $TRAVIS_BUILD_DIR; TZ=UTC git log --pretty=format:'%h %ad %s' --date iso-local -n 10 $REV_RANGE)| cut -d ' ' -f 1-3,5-100 >> README.md - echo \`\`\` >> README.md - echo >> README.md - echo [Code on GitHub]\(https://github.com/FWGS/xash3d-fwgs/tree/$TRAVIS_COMMIT\) >> README.md - echo >> README.md - echo [Full changelog for this build]\(https://github.com/FWGS/xash3d-fwgs/commits/$TRAVIS_COMMIT\) >> README.md - echo >> README.md - append_readme - echo $TRAVIS_COMMIT > commit.txt -} - -yadisk_download() -{ - FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH - WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru - - for file in $*; do - curl -L $WEBDAV_SRV/$FOLDER_NAME/$file -o $file - done -} - -PUSHED_COMMIT=$(curl --fail https://raw.githubusercontent.com/FWGS/xash3d-deploy/$DEPLOY_BRANCH-$TRAVIS_BRANCH/commit.txt) -echo "Pushed commit: $PUSHED_COMMIT" -if [ ! -z "$PUSHED_COMMIT" ]; then - REV_RANGE="HEAD...$PUSHED_COMMIT" -else - REV_RANGE="HEAD" -fi - -git config --global user.name FWGS-deployer -git config --global user.email FWGS-deployer@users.noreply.github.com - -FILES=$* - -# Create new repo with new files -mkdir xash3d-deploy -cd xash3d-deploy -git init -git remote add travis-deploy-public https://FWGS-deployer:${GH_TOKEN}@github.com/FWGS/xash3d-deploy.git -git checkout -b $DEPLOY_BRANCH-$TRAVIS_BRANCH -yadisk_download $FILES -generate_readme -git add . -git commit -m "Latest travis deploy $TRAVIS_COMMIT" -git push -q --force travis-deploy-public $DEPLOY_BRANCH-$TRAVIS_BRANCH >/dev/null 2>/dev/null - -exit 0 diff --git a/scripts/travis/build_linux.sh b/scripts/travis/build_linux.sh new file mode 100755 index 00000000..70a83ab2 --- /dev/null +++ b/scripts/travis/build_linux.sh @@ -0,0 +1,103 @@ +#!/bin/bash + +. scripts/lib.sh + +APP=xash3d-fwgs +APPDIR=$APP +APPIMAGE=$APP-$ARCH.tar.xz + +build_sdl2() +{ + cd "$BUILDDIR"/SDL2_src || die + if [ "$ARCH" = "i386" ]; then + export CFLAGS="-msse2 -march=i686 -m32 -ggdb -O2" + export LDFLAGS="-m32" + fi + ./configure \ + --disable-render \ + --disable-haptic \ + --disable-power \ + --disable-filesystem \ + --disable-file \ + --disable-libudev \ + --disable-dbus \ + --disable-ibus \ + --disable-ime \ + --disable-fcitx \ + --enable-alsa-shared \ + --enable-pulseaudio-shared \ + --enable-wayland-shared \ + --enable-x11-shared \ + --prefix / || die # get rid of /usr/local stuff + make -j2 || die + mkdir -p "$BUILDDIR"/SDL2_linux + make install DESTDIR="$BUILDDIR"/SDL2_linux || die + export CFLAGS="" + export LDFLAGS="" +} + +build_engine() +{ + # Build engine + cd "$BUILDDIR" || die + + if [ "$ARCH" = "amd64" ]; then # we need enabling 64-bit target only on Intel-compatible CPUs + AMD64="-8" + fi + + if [ "$1" = "dedicated" ]; then + ./waf configure -T release -d -W $AMD64 || die + elif [ "$1" = "full" ]; then + ./waf configure --sdl2=SDL2_linux -T release --enable-stb --prefix="$APPDIR" -W $AMD64 --enable-utils || die + else + die + fi + + ./waf build || die +} + +build_archive() +{ + cd "$BUILDDIR" || die + + ./waf install || die + + # Generate extras.pak + python3 scripts/makepak.py xash-extras/ "$APPDIR/extras.pak" + + cp SDL2_linux/lib/libSDL2-2.0.so.0 "$APPDIR/" + if [ "$ARCH" = "i386" ]; then + cp vgui-dev/lib/vgui.so "$APPDIR/" + fi + + cat > "$APPDIR"/run.sh << 'EOF' +#!/bin/sh + +if [ "$XASH3D_BASEDIR" = "" ]; then + export XASH3D_BASEDIR=$PWD +fi +echo "Xash3D FWGS installed as tarball." +echo "Base directory is $XASH3D_BASEDIR. Set XASH3D_BASEDIR environment variable to override this" + +export XASH3D_EXTRAS_PAK1="${XASH3D_BASEDIR}"/extras.pak +export LD_LIBRARY_PATH="${XASH3D_BASEDIR}":$LD_LIBRARY_PATH +${DEBUGGER} "${XASH3D_BASEDIR}"/xash3d "$@" +exit $? +EOF + + chmod +x "$APPDIR"/xash3d "$APPDIR"/run.sh # Engine launcher & engine launcher script + + echo "Contents of tarball: " + ls -R "$APPDIR" + + tar -cJvf $APPIMAGE $APPDIR/* +} + +rm -rf build # clean-up build directory +build_engine dedicated +mv build/engine/xash xashds-linux-$ARCH + +rm -rf build +build_sdl2 +build_engine full +build_archive diff --git a/scripts/travis_common_deps.sh b/scripts/travis/deps_common.sh similarity index 100% rename from scripts/travis_common_deps.sh rename to scripts/travis/deps_common.sh diff --git a/scripts/travis_linux_deps.sh b/scripts/travis/deps_linux.sh similarity index 100% rename from scripts/travis_linux_deps.sh rename to scripts/travis/deps_linux.sh diff --git a/scripts/travis_mingw_deps.sh b/scripts/travis_mingw_deps.sh deleted file mode 100644 index d78b5507..00000000 --- a/scripts/travis_mingw_deps.sh +++ /dev/null @@ -1,3 +0,0 @@ -# SDL2 for MinGW prebuilt -curl -s http://libsdl.org/release/SDL2-devel-$SDL_VERSION-mingw.tar.gz | tar xzf - -mv SDL2-$SDL_VERSION SDL2_mingw diff --git a/scripts/travis_motomagx_deps.sh b/scripts/travis_motomagx_deps.sh deleted file mode 100644 index 0335b1db..00000000 --- a/scripts/travis_motomagx_deps.sh +++ /dev/null @@ -1,9 +0,0 @@ -sudo mkdir -p /opt/toolchains -cd /opt/toolchains/ -sudo git clone https://github.com/a1batross/motomagx_toolchain motomagx -cd $TRAVIS_BUILD_DIR - -git clone https://github.com/FWGS/hlsdk-xash3d hlsdk -b mobile_hacks --depth=1 -git clone https://github.com/mittorn/ref_soft ref_soft --depth=1 - -sed -i "s|#rsw||" wscript diff --git a/scripts/travis_osx_deps.sh b/scripts/travis_osx_deps.sh deleted file mode 100755 index 0d3dd7b3..00000000 --- a/scripts/travis_osx_deps.sh +++ /dev/null @@ -1,6 +0,0 @@ -# brew install python -curl -s https://www.libsdl.org/release/SDL2-$SDL_VERSION.dmg > SDL2.dmg -hdiutil attach SDL2.dmg -cd /Volumes/SDL2 -mkdir -p ~/Library/Frameworks -cp -r SDL2.framework ~/Library/Frameworks/ diff --git a/scripts/waifulib/xcompile.py b/scripts/waifulib/xcompile.py index 86c343fd..752a0794 100644 --- a/scripts/waifulib/xcompile.py +++ b/scripts/waifulib/xcompile.py @@ -200,16 +200,32 @@ class Android: def cc(self): if self.is_host(): - return 'clang --target=%s%d' % (self.ndk_triplet(), self.api) + s = 'clang' + environ = getattr(self.ctx, 'environ', os.environ) + + if 'CC' in environ: + s = environ['CC'] + + return '%s --target=%s%d' % (s, self.ndk_triplet(), self.api) return self.gen_toolchain_path() + ('clang' if self.is_clang() else 'gcc') def cxx(self): if self.is_host(): - return 'clang++ --target=%s%d' % (self.ndk_triplet(), self.api) + s = 'clang++' + environ = getattr(self.ctx, 'environ', os.environ) + + if 'CXX' in environ: + s = environ['CXX'] + + return '%s --target=%s%d' % (s, self.ndk_triplet(), self.api) return self.gen_toolchain_path() + ('clang++' if self.is_clang() else 'g++') def strip(self): if self.is_host(): + environ = getattr(self.ctx, 'environ', os.environ) + + if 'STRIP' in environ: + return environ['STRIP'] return 'llvm-strip' return os.path.join(self.gen_binutils_path(), 'strip') @@ -372,8 +388,6 @@ def configure(conf): conf.env.INCLUDES_MAGX = [toolchain_path + i for i in ['ezx-z6/include', 'qt-2.3.8/include']] conf.env.LIBPATH_MAGX = [toolchain_path + i for i in ['ezx-z6/lib', 'qt-2.3.8/lib']] conf.env.LINKFLAGS_MAGX = ['-Wl,-rpath-link=' + i for i in conf.env.LIBPATH_MAGX] - for lib in ['qte-mt', 'ezxappbase', 'ezxpm', 'log_util']: - conf.check_cc(lib=lib, use='MAGX', uselib_store='MAGX') conf.env.MAGX = conf.options.MAGX MACRO_TO_DESTOS = OrderedDict({ '__ANDROID__' : 'android' }) @@ -390,6 +404,10 @@ def post_compiler_cxx_configure(conf): if conf.android.ndk_rev == 19: conf.env.CXXFLAGS_cxxshlib += ['-static-libstdc++'] conf.env.LDFLAGS_cxxshlib += ['-static-libstdc++'] + elif conf.options.MAGX: + for lib in ['qte-mt', 'ezxappbase', 'ezxpm', 'log_util']: + conf.check_cc(lib=lib, use='MAGX', uselib_store='MAGX') + return def post_compiler_c_configure(conf): diff --git a/scripts/yadisk_clear.sh b/scripts/yadisk_clear.sh deleted file mode 100755 index 98fdc03c..00000000 --- a/scripts/yadisk_clear.sh +++ /dev/null @@ -1,5 +0,0 @@ -FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH -WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru - -curl -X DELETE $WEBDAV_SRV/$FOLDER_NAME -curl -X MKCOL $WEBDAV_SRV/$FOLDER_NAME