Files
amnezia-client/.github/workflows/deploy.yml
2022-11-27 01:21:40 +03:00

152 lines
3.8 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
host: linux
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-x64:
name: Build-Windows-x64
runs-on: ubuntu-latest
env:
QT_VERSION: 5.15.2
QIF_VERSION: 4.4
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
host: windows
with:
version: '5.15.2'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
dir: '${{ github.workspace }}/Qt/'
install-deps: 'true'
modules: 'qtcharts'
archives: 'qtbase qtsvg'
cache: 'false'
cache-key-prefix: 'install-qt-action-windows64'
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: cmd //c winbuild.bat
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
host: windows
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