Files
amnezia-client/.travis.yml
T

336 lines
11 KiB
YAML
Raw Normal View History

2021-01-27 00:57:02 +03:00
branches:
only:
- master
- dev
2021-01-27 01:18:09 +03:00
- /\d+\.\d+/
2021-01-27 00:57:02 +03:00
jobs:
include:
- name: MacOS
os: osx
2022-08-19 16:17:37 +03:00
osx_image: xcode13.4
language: cpp
2022-08-20 00:51:57 +03:00
2021-01-28 14:18:28 +03:00
env:
2022-08-20 17:24:11 +03:00
- PATH=/usr/local/opt/ccache/libexec:$PATH
2021-05-21 05:33:40 -07:00
- QT_VERSION=5.15.2
2022-08-18 15:10:54 +03:00
- QIF_VERSION=4.4
2021-06-02 17:56:01 +03:00
- QT_BIN_DIR=$HOME/Qt/$QT_VERSION/clang_64/bin
2021-06-02 19:05:26 +03:00
- QIF_BIN_DIR=$QT_BIN_DIR/../../../Tools/QtInstallerFramework/$QIF_VERSION/bin
2021-02-08 12:42:48 -08:00
2022-08-18 17:01:34 +03:00
install:
- |
2022-08-19 22:23:52 +03:00
if [ ! -f $QT_BIN_DIR/qmake ]; then \
2022-08-20 17:24:11 +03:00
brew install p7zip ccache && \
2022-08-18 17:01:34 +03:00
python3 -m pip install --upgrade pip && \
pip install -U aqtinstall requests py7zr && \
pip show aqtinstall && \
2022-08-18 19:02:05 +03:00
aqt install-qt mac desktop $QT_VERSION clang_64 -m all -O $HOME/Qt && \
2022-08-18 19:57:46 +03:00
aqt install-tool mac desktop tools_ifw -O $HOME/Qt ; \
2022-08-18 17:01:34 +03:00
fi
2021-01-27 00:57:02 +03:00
script:
2021-01-28 12:54:09 +03:00
- bash deploy/build_macos.sh
2022-08-20 17:24:11 +03:00
after_script:
- ccache --show-stats
2021-01-28 12:54:09 +03:00
deploy:
provider: releases
token: $GH_TOKEN
2022-08-19 16:17:37 +03:00
cleanup: false
2021-01-28 12:54:09 +03:00
file:
2022-08-19 16:17:37 +03:00
- "AmneziaVPN.dmg"
2021-01-28 12:54:09 +03:00
on:
tags: true
branch: master
2022-08-19 22:45:03 +03:00
cache:
2022-08-20 17:24:11 +03:00
- ccache
- directories:
2022-08-19 22:45:03 +03:00
- $HOME/Qt
- $HOME/Library/Caches/Homebrew
2022-08-18 17:01:34 +03:00
# ------------------------------------------------------
2021-06-02 01:32:25 +03:00
- name: Windows_x64
2021-01-27 00:57:02 +03:00
os: windows
2022-08-19 16:17:37 +03:00
language: cpp
2021-01-27 00:57:02 +03:00
env:
- PATH=/c/Python39:/c/Python39/Scripts:$PATH
2022-08-18 15:10:54 +03:00
- QT_VERSION=5.15.2
- QIF_VERSION=4.4
- QT_BIN_DIR="c:\\Qt\\$QT_VERSION\\msvc2019_64\\bin"
2021-06-02 19:24:50 +03:00
- QIF_BIN_DIR="c:\\Qt\\Tools\\QtInstallerFramework\\${QIF_VERSION}\\bin"
2021-06-02 18:41:08 +03:00
- BUILD_ARCH=64
2022-08-18 17:01:34 +03:00
- MSVC_PATH_WIN="C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community"
2022-08-19 18:35:17 +03:00
- MSVC_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2019/Community"
2022-08-18 17:01:34 +03:00
install:
2022-08-19 18:35:17 +03:00
- 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
2022-08-18 15:31:10 +03:00
- if [ ! -f /C/Qt/$QT_VERSION/msvc2019_64/bin/qmake ]; then choco install python --version 3.9.1; fi
2021-01-27 00:57:02 +03:00
- |
2022-08-18 15:31:10 +03:00
if [ ! -f /C/Qt/$QT_VERSION/msvc2019_64/bin/qmake ]; then \
2021-06-02 18:41:08 +03:00
python -m pip install --upgrade pip && \
pip3 install -U aqtinstall requests py7zr && \
pip3 show aqtinstall && \
2022-08-18 15:20:27 +03:00
aqt install-qt windows desktop $QT_VERSION win64_msvc2019_64 -m all -O /C/Qt && \
2022-08-18 15:31:10 +03:00
aqt install-tool windows desktop tools_ifw -O /C/Qt ; \
2021-01-27 00:57:02 +03:00
fi
2022-08-18 17:01:34 +03:00
script:
2021-06-02 22:34:29 +03:00
- echo set BUILD_ARCH=$BUILD_ARCH > winbuild.bat
2021-06-02 20:25:00 +03:00
- echo set QT_BIN_DIR="$QT_BIN_DIR" >> winbuild.bat
- echo set QIF_BIN_DIR="$QIF_BIN_DIR" >> winbuild.bat
2022-08-18 17:01:34 +03:00
- echo call \""%MSVC_PATH_WIN%\\VC\\Auxiliary\\Build\\vcvars${BUILD_ARCH}.bat\"" >> winbuild.bat
- echo call \""%MSVC_PATH_WIN%\\Common7\\Tools\\VsDevCmd.bat\" -arch=amd64" >> winbuild.bat
2021-06-02 20:25:00 +03:00
- echo call deploy\\build_windows.bat >> winbuild.bat
2021-06-02 20:46:59 +03:00
- cmd //c winbuild.bat
2021-01-27 00:57:02 +03:00
2021-01-28 12:54:09 +03:00
deploy:
provider: releases
token: $GH_TOKEN
2022-08-19 16:17:37 +03:00
cleanup: false
2021-01-28 12:54:09 +03:00
file:
2021-06-02 00:49:42 +03:00
- "AmneziaVPN_x64.exe"
2021-01-28 12:54:09 +03:00
on:
tags: true
branch: master
2021-01-28 13:26:43 +03:00
2022-08-19 22:45:03 +03:00
cache:
directories:
- /C/Qt
- $MSVC_PATH
2022-08-18 17:01:34 +03:00
# ------------------------------------------------------
2021-06-02 01:32:25 +03:00
- name: Windows_x32
os: windows
2022-08-19 16:17:37 +03:00
language: cpp
2021-06-02 00:49:42 +03:00
2021-06-02 01:32:25 +03:00
env:
- PATH=/c/Python39:/c/Python39/Scripts:$PATH
2022-08-18 15:10:54 +03:00
- QT_VERSION=5.15.2
- QIF_VERSION=4.4
- QT_BIN_DIR="c:\\Qt\\${QT_VERSION}\\msvc2019\\bin"
2021-06-02 19:24:50 +03:00
- QIF_BIN_DIR="c:\\Qt\\Tools\\QtInstallerFramework\\${QIF_VERSION}\\bin"
2021-06-02 18:41:08 +03:00
- BUILD_ARCH=32
2022-08-18 17:01:34 +03:00
- MSVC_PATH_WIN="C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community"
2022-08-19 18:35:17 +03:00
- MSVC_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2019/Community"
2021-06-02 00:49:42 +03:00
2022-08-18 17:01:34 +03:00
install:
2022-08-19 18:35:17 +03:00
- 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
2022-08-18 15:31:10 +03:00
- if [ ! -f /C/Qt/$QT_VERSION/msvc2019/bin/qmake ]; then choco install python --version 3.9.1; fi
2021-06-02 01:32:25 +03:00
- |
2022-08-18 15:31:10 +03:00
if [ ! -f /C/Qt/$QT_VERSION/msvc2019/bin/qmake ]; then \
2021-06-02 18:41:08 +03:00
python -m pip install --upgrade pip && \
pip3 install -U aqtinstall requests py7zr && \
pip3 show aqtinstall && \
2022-08-18 17:01:34 +03:00
aqt install-qt windows desktop $QT_VERSION win32_msvc2019 -m all -O /C/Qt && \
2022-08-18 15:31:10 +03:00
aqt install-tool windows desktop tools_ifw -O /C/Qt ; \
2021-06-02 01:32:25 +03:00
fi
2022-08-18 17:01:34 +03:00
script:
- echo set BUILD_ARCH=$BUILD_ARCH > winbuild.bat
2021-06-02 20:25:00 +03:00
- echo set QT_BIN_DIR="$QT_BIN_DIR" >> winbuild.bat
- echo set QIF_BIN_DIR="$QIF_BIN_DIR" >> winbuild.bat
2022-08-18 17:01:34 +03:00
- echo call \""%MSVC_PATH_WIN%\\VC\\Auxiliary\\Build\\vcvars${BUILD_ARCH}.bat\"" >> winbuild.bat
- echo call \""%MSVC_PATH_WIN%\\Common7\\Tools\\VsDevCmd.bat\"" >> winbuild.bat
2021-06-02 20:25:00 +03:00
- echo call deploy\\build_windows.bat >> winbuild.bat
2021-06-02 18:54:39 +03:00
- cmd //c winbuild.bat
2021-06-02 00:49:42 +03:00
2021-06-02 01:32:25 +03:00
deploy:
provider: releases
token: $GH_TOKEN
2022-08-19 16:17:37 +03:00
cleanup: false
2021-06-02 01:32:25 +03:00
file:
- "AmneziaVPN_x32.exe"
on:
tags: true
branch: master
2021-06-02 00:49:42 +03:00
2022-08-19 22:45:03 +03:00
cache:
directories:
- /C/Qt
- $MSVC_PATH
2022-08-19 16:17:37 +03:00
# ------------------------------------------------------
- name: Linux
os: linux
2022-08-19 23:26:34 +03:00
dist: focal
2022-08-19 16:17:37 +03:00
2022-08-19 23:56:45 +03:00
addons:
apt:
packages:
- p7zip
- python3
- python3-pip
2022-08-20 00:51:57 +03:00
- libgl-dev
- mesa-common-dev
2022-08-20 17:24:11 +03:00
- libpulse-dev
2022-08-19 23:56:45 +03:00
2022-08-19 16:17:37 +03:00
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:
- |
2022-08-19 22:23:52 +03:00
if [ ! -f $QT_BIN_DIR/qmake ]; then \
python3 -m pip install --user $(whoami) --upgrade pip && \
export PATH=$HOME/.local/bin:$PATH && \
2022-08-19 22:45:03 +03:00
python3 -m pip install -U aqtinstall requests py7zr && \
python3 -m pip show aqtinstall && \
2022-08-19 23:56:45 +03:00
python3 -m aqt install-qt linux desktop $QT_VERSION gcc_64 -m all -O $HOME/Qt && \
2022-08-19 18:47:39 +03:00
python3 -m aqt install-tool linux desktop tools_ifw -O $HOME/Qt ; \
2022-08-19 16:17:37 +03:00
fi
script:
- bash deploy/build_linux.sh
2022-08-20 17:24:11 +03:00
after_script:
- ccache --show-stats
2022-08-19 16:17:37 +03:00
deploy:
provider: releases
token: $GH_TOKEN
cleanup: false
file:
- "AmneziaVPN.bundle"
on:
tags: true
branch: master
2022-08-19 22:45:03 +03:00
cache:
2022-08-20 17:24:11 +03:00
- ccache
- directories:
2022-08-19 22:45:03 +03:00
- $HOME/Qt
2022-08-19 16:17:37 +03:00
# ------------------------------------------------------
- name: Android
os: linux
language: android
2022-08-20 00:51:57 +03:00
dist: xenial
2022-08-19 16:17:37 +03:00
2022-08-19 23:56:45 +03:00
addons:
apt:
packages:
- p7zip
- python3
- python3-pip
2022-08-20 00:51:57 +03:00
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - tools
# - platform-tools
2022-08-19 16:17:37 +03:00
2022-08-20 00:51:57 +03:00
# The BuildTools version used by your project
- build-tools-30.0.2
2022-08-19 16:17:37 +03:00
2022-08-20 00:51:57 +03:00
# The SDK version used to compile your project
- android-30
2022-08-19 16:17:37 +03:00
2022-08-20 00:51:57 +03:00
# Additional components
- extra
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
2022-08-19 16:17:37 +03:00
env:
- QT_VERSION=5.15.2
- QT_BIN_DIR=$HOME/Qt/$QT_VERSION/android/bin
- USE_ANDROID_NDK_VERSION=21d
2022-08-19 18:35:17 +03:00
- ANDROID_NDK_HOME=$HOME/NDK
2022-08-19 16:17:37 +03:00
install:
- |
2022-08-19 22:23:52 +03:00
if [ ! -f $QT_BIN_DIR/qmake ]; then \
export PATH=$HOME/.local/bin:$PATH && \
2022-08-19 22:45:03 +03:00
python3 -m pip install -U aqtinstall requests py7zr && \
python3 -m pip show aqtinstall && \
2022-08-19 18:47:39 +03:00
python3 -m aqt install-qt linux android $QT_VERSION android_armv7 -m all -O $HOME/Qt && \
python3 -m aqt install-qt linux android $QT_VERSION android_arm64_v8a -m all -O $HOME/Qt && \
python3 -m aqt install-qt linux android $QT_VERSION android_x86_64 -m all -O $HOME/Qt && \
python3 -m aqt install-qt linux android $QT_VERSION android_x86 -m all -O $HOME/Qt ; \
2022-08-19 16:17:37 +03:00
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
2022-08-20 17:24:11 +03:00
after_script:
- ccache --show-stats
2022-08-19 16:17:37 +03:00
deploy:
provider: releases
token: $GH_TOKEN
cleanup: false
file:
- "AmneziaVPN.aab"
on:
tags: true
branch: master
2022-08-19 22:45:03 +03:00
cache:
2022-08-20 17:24:11 +03:00
- ccache
- directories:
2022-08-19 22:45:03 +03:00
- $HOME/Qt
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
- $ANDROID_NDK_HOME
2022-08-19 22:23:52 +03:00
# ------------------------------------------------------
- name: iOS
os: osx
osx_image: xcode13.4
2022-08-19 22:45:03 +03:00
language: cpp
2022-08-19 22:23:52 +03:00
env:
2022-08-20 17:24:11 +03:00
- PATH=/usr/local/opt/ccache/libexec:~/go/bin:$PATH
2022-08-19 22:23:52 +03:00
- QT_VERSION=5.15.2
- QT_BIN_DIR=$HOME/Qt/$QT_VERSION/ios/bin
2022-08-19 23:56:45 +03:00
- QT_IOS_BIN=$QT_BIN_DIR
2022-08-19 22:23:52 +03:00
install:
- |
if [ ! -f $QT_BIN_DIR/qmake ]; then \
2022-08-20 17:24:11 +03:00
brew install p7zip ccache && \
2022-08-19 22:23:52 +03:00
python3 -m pip install --upgrade pip && \
pip install -U aqtinstall requests py7zr && \
pip show aqtinstall && \
2022-08-19 23:26:34 +03:00
aqt install-qt mac ios $QT_VERSION -m all -O $HOME/Qt ; \
2022-08-19 22:23:52 +03:00
fi
2022-08-19 23:56:45 +03:00
- brew install golang
- go install golang.org/x/mobile/cmd/gomobile@latest
- gomobile init
2022-08-19 16:17:37 +03:00
2022-08-19 22:23:52 +03:00
script:
- bash deploy/build_ios.sh
2022-08-20 17:24:11 +03:00
after_script:
- ccache --show-stats
2022-08-19 22:23:52 +03:00
2022-08-19 22:45:03 +03:00
cache:
2022-08-20 17:24:11 +03:00
- ccache
- directories:
2022-08-19 22:45:03 +03:00
- $HOME/Qt
- $HOME/Library/Caches/Homebrew
2021-01-28 13:26:43 +03:00
2021-01-27 00:57:02 +03:00
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
# Cache only .git files under "/usr/local/Homebrew" so "brew update" does not take 5min every build
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi