mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-24 02:00:24 +07:00
Travis builds for Linux and Android
This commit is contained in:
+111
-19
@@ -1,5 +1,3 @@
|
||||
language: cpp
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@@ -10,7 +8,8 @@ jobs:
|
||||
include:
|
||||
- name: MacOS
|
||||
os: osx
|
||||
osx_image: xcode12.5
|
||||
osx_image: xcode13.4
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
- QT_VERSION=5.15.2
|
||||
@@ -35,9 +34,9 @@ jobs:
|
||||
deploy:
|
||||
provider: releases
|
||||
token: $GH_TOKEN
|
||||
skip_cleanup: true
|
||||
cleanup: false
|
||||
file:
|
||||
- "AmneziaVPN_unsigned.dmg"
|
||||
- "AmneziaVPN.dmg"
|
||||
on:
|
||||
tags: true
|
||||
branch: master
|
||||
@@ -45,7 +44,8 @@ jobs:
|
||||
# ------------------------------------------------------
|
||||
- name: Windows_x64
|
||||
os: windows
|
||||
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
- PATH=/c/Python39:/c/Python39/Scripts:$PATH
|
||||
- QT_VERSION=5.15.2
|
||||
@@ -53,11 +53,9 @@ jobs:
|
||||
- QT_BIN_DIR="c:\\Qt\\$QT_VERSION\\msvc2019_64\\bin"
|
||||
- QIF_BIN_DIR="c:\\Qt\\Tools\\QtInstallerFramework\\${QIF_VERSION}\\bin"
|
||||
- BUILD_ARCH=64
|
||||
- MSVC_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2019/Community"
|
||||
- MSVC_PATH_WIN="C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community"
|
||||
|
||||
install:
|
||||
- if [ ! -f "$MSVC_PATH/VC/Auxiliary/Build/vcvars64.bat" ]; then choco install --ignorepackagecodes --no-progress -y visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --nocache --installPath $MSVC_PATH_WIN"; fi
|
||||
- if [ ! -f /C/Qt/$QT_VERSION/msvc2019_64/bin/qmake ]; then choco install python --version 3.9.1; fi
|
||||
- |
|
||||
if [ ! -f /C/Qt/$QT_VERSION/msvc2019_64/bin/qmake ]; then \
|
||||
@@ -69,8 +67,6 @@ jobs:
|
||||
fi
|
||||
|
||||
script:
|
||||
- dir "%MSVC_PATH%\VC\Auxiliary\Build"
|
||||
- dir "%MSVC_PATH%\Common7\Tools"
|
||||
- echo set BUILD_ARCH=$BUILD_ARCH > winbuild.bat
|
||||
- echo set QT_BIN_DIR="$QT_BIN_DIR" >> winbuild.bat
|
||||
- echo set QIF_BIN_DIR="$QIF_BIN_DIR" >> winbuild.bat
|
||||
@@ -82,7 +78,7 @@ jobs:
|
||||
deploy:
|
||||
provider: releases
|
||||
token: $GH_TOKEN
|
||||
skip_cleanup: true
|
||||
cleanup: false
|
||||
file:
|
||||
- "AmneziaVPN_x64.exe"
|
||||
on:
|
||||
@@ -92,6 +88,7 @@ jobs:
|
||||
# ------------------------------------------------------
|
||||
- name: Windows_x32
|
||||
os: windows
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
- PATH=/c/Python39:/c/Python39/Scripts:$PATH
|
||||
@@ -100,11 +97,9 @@ jobs:
|
||||
- QT_BIN_DIR="c:\\Qt\\${QT_VERSION}\\msvc2019\\bin"
|
||||
- QIF_BIN_DIR="c:\\Qt\\Tools\\QtInstallerFramework\\${QIF_VERSION}\\bin"
|
||||
- BUILD_ARCH=32
|
||||
- MSVC_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2019/Community"
|
||||
- MSVC_PATH_WIN="C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community"
|
||||
|
||||
install:
|
||||
- if [ ! -f "$MSVC_PATH/VC/Auxiliary/Build/vcvars64.bat" ]; then choco install --ignorepackagecodes --no-progress -y visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --nocache --installPath $MSVC_PATH_WIN"; fi
|
||||
- if [ ! -f /C/Qt/$QT_VERSION/msvc2019/bin/qmake ]; then choco install python --version 3.9.1; fi
|
||||
- |
|
||||
if [ ! -f /C/Qt/$QT_VERSION/msvc2019/bin/qmake ]; then \
|
||||
@@ -116,8 +111,6 @@ jobs:
|
||||
fi
|
||||
|
||||
script:
|
||||
- dir "%MSVC_PATH%\VC\Auxiliary\Build"
|
||||
- dir "%MSVC_PATH%\Common7\Tools"
|
||||
- echo set BUILD_ARCH=$BUILD_ARCH > winbuild.bat
|
||||
- echo set QT_BIN_DIR="$QT_BIN_DIR" >> winbuild.bat
|
||||
- echo set QIF_BIN_DIR="$QIF_BIN_DIR" >> winbuild.bat
|
||||
@@ -129,15 +122,112 @@ jobs:
|
||||
deploy:
|
||||
provider: releases
|
||||
token: $GH_TOKEN
|
||||
skip_cleanup: true
|
||||
cleanup: false
|
||||
file:
|
||||
- "AmneziaVPN_x32.exe"
|
||||
on:
|
||||
tags: true
|
||||
branch: master
|
||||
|
||||
deploy:
|
||||
skip_cleanup: true
|
||||
# ------------------------------------------------------
|
||||
- name: Linux
|
||||
os: linux
|
||||
|
||||
env:
|
||||
- QT_VERSION=5.15.2
|
||||
- QIF_VERSION=4.4
|
||||
- QT_BIN_DIR=$HOME/Qt/$QT_VERSION/gcc_64/bin
|
||||
- QIF_BIN_DIR=$QT_BIN_DIR/../../../Tools/QtInstallerFramework/$QIF_VERSION/bin
|
||||
|
||||
install:
|
||||
- |
|
||||
if [ ! -f $HOME/Qt/$QT_VERSION/gcc_64/bin/qmake ]; then \
|
||||
apt install -yy p7zip python3 && \
|
||||
python3 -m pip install --upgrade pip && \
|
||||
pip install -U aqtinstall requests py7zr && \
|
||||
pip show aqtinstall && \
|
||||
aqt install-qt linux desktop $QT_VERSION clang_64 -m all -O $HOME/Qt && \
|
||||
aqt install-tool linux desktop tools_ifw -O $HOME/Qt ; \
|
||||
fi
|
||||
|
||||
script:
|
||||
- bash deploy/build_linux.sh
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
token: $GH_TOKEN
|
||||
cleanup: false
|
||||
file:
|
||||
- "AmneziaVPN.bundle"
|
||||
on:
|
||||
tags: true
|
||||
branch: master
|
||||
|
||||
# ------------------------------------------------------
|
||||
- name: Android
|
||||
os: linux
|
||||
language: android
|
||||
|
||||
components:
|
||||
# Uncomment the lines below if you want to
|
||||
# use the latest revision of Android SDK Tools
|
||||
# - tools
|
||||
# - platform-tools
|
||||
|
||||
# The BuildTools version used by your project
|
||||
- build-tools-30.0.2
|
||||
|
||||
# The SDK version used to compile your project
|
||||
- android-30
|
||||
|
||||
# Additional components
|
||||
- extra
|
||||
- extra-google-google_play_services
|
||||
- extra-google-m2repository
|
||||
- extra-android-m2repository
|
||||
|
||||
env:
|
||||
- QT_VERSION=5.15.2
|
||||
- QT_BIN_DIR=$HOME/Qt/$QT_VERSION/android/bin
|
||||
- USE_ANDROID_NDK_VERSION=21d
|
||||
|
||||
install:
|
||||
- |
|
||||
if [ ! -f $HOME/Qt/$QT_VERSION/android/bin/qmake ]; then \
|
||||
apt install -yy p7zip python3 && \
|
||||
python3 -m pip install --upgrade pip && \
|
||||
pip install -U aqtinstall requests py7zr && \
|
||||
pip show aqtinstall && \
|
||||
aqt install-qt linux android $QT_VERSION armv7 -m all -O $HOME/Qt && \
|
||||
aqt install-qt linux android $QT_VERSION arm64_v8a -m all -O $HOME/Qt && \
|
||||
aqt install-qt linux android $QT_VERSION x86_64 -m all -O $HOME/Qt && \
|
||||
aqt install-qt linux android $QT_VERSION x86 -m all -O $HOME/Qt && \
|
||||
fi
|
||||
- |
|
||||
export TERM=dumb &&
|
||||
curl -L https://dl.google.com/android/repository/android-ndk-r${USE_ANDROID_NDK_VERSION}-linux-x86_64.zip -O &&
|
||||
unzip ./android-ndk-r${USE_ANDROID_NDK_VERSION}-linux-x86_64.zip > /dev/null &&
|
||||
rm android-ndk-r${USE_ANDROID_NDK_VERSION}-linux-x86_64.zip &&
|
||||
export ANDROID_NDK_HOME=`pwd`/android-ndk-r${USE_ANDROID_NDK_VERSION} &&
|
||||
export LOCAL_ANDROID_NDK_HOME="$ANDROID_NDK_HOME" &&
|
||||
export LOCAL_ANDROID_NDK_HOST_PLATFORM="linux-x86_64" &&
|
||||
export PATH=$PATH:${ANDROID_NDK_HOME} &&
|
||||
env
|
||||
|
||||
script:
|
||||
- bash deploy/build_android.sh
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
token: $GH_TOKEN
|
||||
cleanup: false
|
||||
file:
|
||||
- "AmneziaVPN.aab"
|
||||
on:
|
||||
tags: true
|
||||
branch: master
|
||||
|
||||
|
||||
|
||||
before_cache:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
|
||||
@@ -149,4 +239,6 @@ cache:
|
||||
- $HOME/Qt
|
||||
- /C/Qt
|
||||
- $HOME/Library/Caches/Homebrew
|
||||
- "/C/Program Files (x86)/Microsoft Visual Studio/2019/Community"
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- $HOME/.android/build-cache
|
||||
|
||||
Reference in New Issue
Block a user