mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
175 lines
4.7 KiB
YAML
175 lines
4.7 KiB
YAML
name: Deploy workflow
|
|
|
|
# Controls when the action will run. Workflow runs when manually triggered using the UI
|
|
# or API.
|
|
on: [push] #, pull_request]
|
|
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
# Build-Linux-Ubuntu:
|
|
# name: Build-Linux-Ubuntu
|
|
# runs-on: ubuntu-latest
|
|
|
|
# env:
|
|
# QT_VERSION: 5.15.2
|
|
# QIF_VERSION: 4.4
|
|
|
|
# steps:
|
|
# - name: Install Qt
|
|
# uses: jurplel/install-qt-action@v3
|
|
# with:
|
|
# version: '5.15.2'
|
|
# host: 'linux'
|
|
# target: 'desktop'
|
|
# arch: 'gcc_64'
|
|
# dir: '${{ github.workspace }}/Qt/'
|
|
# install-deps: 'true'
|
|
# modules: 'qtcharts'
|
|
# archives: 'qtbase qtsvg'
|
|
# cache: 'true'
|
|
# cache-key-prefix: 'install-qt-action-linux'
|
|
# setup-python: 'true'
|
|
# tools: 'tools_ifw tools_qtcreator,qt.tools.qtcreator'
|
|
# set-env: 'true'
|
|
# tools-only: 'false'
|
|
# aqtversion: '==2.1.*'
|
|
# py7zrversion: '==0.19.*'
|
|
# extra: '--external 7z'
|
|
|
|
# - uses: actions/checkout@v3
|
|
# with:
|
|
# fetch-depth: 10
|
|
|
|
# - uses: awalsh128/cache-apt-pkgs-action@latest
|
|
# with:
|
|
# packages: p7zip p7zip-full python3 python3-pip libgl-dev mesa-common-dev libpulse-dev libxcb-* libxkbcommon-x11-0
|
|
# version: 1.0
|
|
|
|
# - name: Install Qt
|
|
# run: |
|
|
# if [ ! -f $QT_BIN_DIR/qmake ]; then \
|
|
# python3 -m pip install --user $(whoami) --upgrade pip && \
|
|
# export PATH=$HOME/.local/bin:$PATH && \
|
|
# python3 -m pip install -U aqtinstall requests py7zr && \
|
|
# python3 -m pip show aqtinstall && \
|
|
# python3 -m aqt install-qt linux desktop $QT_VERSION gcc_64 -m all -O $HOME/Qt && \
|
|
# python3 -m aqt install-tool linux desktop tools_ifw -O $HOME/Qt ; \
|
|
# fi
|
|
|
|
# - name: Cache Qt
|
|
# uses: actions/cache@v3
|
|
# id: cache-qt
|
|
# with:
|
|
# key: qt-5.15.2-linux
|
|
# path: "$HOME/Qt"
|
|
|
|
# - name: Build project
|
|
# run: bash deploy/build_linux.sh
|
|
|
|
|
|
|
|
Build-Windows:
|
|
name: Build-Windows
|
|
runs-on: windows-latest
|
|
continue-on-error: true
|
|
|
|
strategy:
|
|
matrix:
|
|
arch: [32, 64]
|
|
include:
|
|
- qt-arch: 'win32_msvc2019'
|
|
arch: 32
|
|
- qt-msvc-path: 'msvc2019'
|
|
arch: 32
|
|
- msvc-arch: 'x86'
|
|
arch: 32
|
|
- qt-arch: 'win64_msvc2019_64'
|
|
arch: 64
|
|
- qt-msvc-path: 'msvc2019_64'
|
|
arch: 64
|
|
- msvc-arch: 'x64'
|
|
arch: 64
|
|
|
|
env:
|
|
QT_VERSION: 5.15.2
|
|
QIF_VERSION: 4.5
|
|
BUILD_ARCH: ${{ matrix.arch }}
|
|
|
|
steps:
|
|
- name: 'Get sources'
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'true'
|
|
fetch-depth: 10
|
|
|
|
- name: 'Install Qt'
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
version: ${{ env.QT_VERSION }}
|
|
host: 'windows'
|
|
target: 'desktop'
|
|
arch: '${{ matrix.qt-arch }}'
|
|
dir: ${{ runner.temp }}
|
|
setup-python: 'true'
|
|
tools: 'tools_ifw'
|
|
set-env: 'true'
|
|
extra: '--external 7z'
|
|
|
|
- name: 'Setup mvsc'
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
with:
|
|
arch: ${{ matrix.msvc-arch }}
|
|
|
|
- name: 'Build project'
|
|
shell: cmd
|
|
run: |
|
|
set BUILD_ARCH=${{ env.BUILD_ARCH }}
|
|
set QT_BIN_DIR="${{ runner.temp }}\\Qt\\${{ env.QT_VERSION }}\\${{ matrix.qt-msvc-path }}\\bin"
|
|
set QIF_BIN_DIR="${{ runner.temp }}\\Qt\\Tools\\QtInstallerFramework\\${{ env.QIF_VERSION }}\\bin"
|
|
call deploy\\build_windows.bat
|
|
|
|
- name: 'Upload artifact'
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: AmneziaVPN_x${{ env.BUILD_ARCH }}
|
|
path: AmneziaVPN_x${{ env.BUILD_ARCH }}.exe
|
|
|
|
# Build-MacOS:
|
|
# name: Build-MacOS
|
|
# runs-on: ubuntu-latest
|
|
|
|
# env:
|
|
# QT_VERSION: 5.15.2
|
|
# QIF_VERSION: 4.4
|
|
|
|
# steps:
|
|
# - name: Install Qt
|
|
# uses: jurplel/install-qt-action@v3
|
|
# with:
|
|
# version: '5.15.2'
|
|
# host: 'mac'
|
|
# target: 'desktop'
|
|
# arch: 'clang_64'
|
|
# dir: '${{ github.workspace }}/Qt/'
|
|
# install-deps: 'true'
|
|
# modules: 'qtcharts'
|
|
# archives: 'qtbase qtsvg'
|
|
# cache: 'true'
|
|
# cache-key-prefix: 'install-qt-action-mac'
|
|
# setup-python: 'true'
|
|
# tools: 'tools_ifw tools_qtcreator,qt.tools.qtcreator'
|
|
# set-env: 'true'
|
|
# tools-only: 'false'
|
|
# aqtversion: '==2.1.*'
|
|
# py7zrversion: '==0.19.*'
|
|
# extra: '--external 7z'
|
|
|
|
# - uses: actions/checkout@v3
|
|
# with:
|
|
# fetch-depth: 10
|
|
|
|
# - name: Build project
|
|
# run: bash deploy/build_macos.sh
|
|
|