language: cpp branches: only: - master - dev - /\d+\.\d+/ jobs: include: - name: MacOS os: osx osx_image: xcode12.5 env: - QT_VERSION=5.15.2 - QIF_VERSION=4.4 - QT_BIN_DIR=$HOME/Qt/$QT_VERSION/clang_64/bin - QIF_BIN_DIR=$QT_BIN_DIR/../../../Tools/QtInstallerFramework/$QIF_VERSION/bin install: - | if [ ! -f $HOME/Qt/$QT_VERSION/clang_64/bin/qmake ]; then \ brew install p7zip && \ python3 -m pip install --upgrade pip && \ pip install -U aqtinstall requests py7zr && \ pip show aqtinstall && \ aqt install-qt mac desktop $QT_VERSION clang_64 -m all -O $HOME/Qt && \ aqt install-tool mac desktop tools_ifw -O $HOME/Qt ; \ fi script: - bash deploy/build_macos.sh deploy: provider: releases token: $GH_TOKEN skip_cleanup: true file: - "AmneziaVPN_unsigned.dmg" on: tags: true branch: master # ------------------------------------------------------ - name: Windows_x64 os: windows env: - PATH=/c/Python39:/c/Python39/Scripts:$PATH - QT_VERSION=5.15.2 - QIF_VERSION=4.4 - 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 \ python -m pip install --upgrade pip && \ pip3 install -U aqtinstall requests py7zr && \ pip3 show aqtinstall && \ aqt install-qt windows desktop $QT_VERSION win64_msvc2019_64 -m all -O /C/Qt && \ aqt install-tool windows desktop tools_ifw -O /C/Qt ; \ 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 - 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 - echo call deploy\\build_windows.bat >> winbuild.bat - cmd //c winbuild.bat deploy: provider: releases token: $GH_TOKEN skip_cleanup: true file: - "AmneziaVPN_x64.exe" on: tags: true branch: master # ------------------------------------------------------ - name: Windows_x32 os: windows env: - PATH=/c/Python39:/c/Python39/Scripts:$PATH - QT_VERSION=5.15.2 - QIF_VERSION=4.4 - 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 \ python -m pip install --upgrade pip && \ pip3 install -U aqtinstall requests py7zr && \ pip3 show aqtinstall && \ aqt install-qt windows desktop $QT_VERSION win32_msvc2019 -m all -O /C/Qt && \ aqt install-tool windows desktop tools_ifw -O /C/Qt ; \ 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 - 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 - echo call deploy\\build_windows.bat >> winbuild.bat - cmd //c winbuild.bat deploy: provider: releases token: $GH_TOKEN skip_cleanup: true file: - "AmneziaVPN_x32.exe" on: tags: true branch: master deploy: skip_cleanup: true 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 cache: directories: - $HOME/Qt - /C/Qt - $HOME/Library/Caches/Homebrew - "/C/Program Files (x86)/Microsoft Visual Studio/2019/Community"