forked from jurplel/qView
-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (59 loc) · 1.88 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build qView
on:
push:
pull_request:
workflow_dispatch:
inputs:
isRelease:
type: boolean
description: 'Is this a release build?'
required: false
default: false
jobs:
build:
strategy:
matrix:
include:
- runner: 'macos-latest'
qtVersion: '6.2.2'
qtModules: 'qtimageformats'
runs-on: ${{ matrix.runner }}
steps:
- name: Set environment variables
shell: bash
run: |
echo "arch=${{ matrix.qtArch }}" >> $GITHUB_ENV
if [ "${{ inputs.isRelease }}" != "true" ]; then
buildNum=JDP.$(date '+%Y-%m-%d').${GITHUB_SHA::7}
echo "nightlyDefines=NIGHTLY=$buildNum" >> $GITHUB_ENV
echo "buildNumString=$buildNum" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qtVersion }}
arch: ${{ matrix.qtArch }}
cache: true
modules: ${{ matrix.qtModules }}
- name: Build qView
shell: pwsh
run: dist/scripts/build.ps1
- name: Deploy qView
shell: pwsh
run: |
if ("${{ matrix.skipPlugins }}" -ne "true") {
Invoke-Expression "& 'dist/scripts/download-plugins.ps1'"
}
if ($IsWindows) {
Invoke-Expression "& 'dist/scripts/windeployqt.ps1' ${{ env.buildNumString }}"
} elseif ($IsMacOS) {
bash dist/scripts/macdeploy.sh ${{ env.buildNumString }}
} else {
bash dist/scripts/linuxdeployqt.sh ${{ env.buildNumString }}
}
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: qView${{ env.buildNumString != '' && '-' || '' }}${{ env.buildNumString }}-${{ runner.os }}${{ matrix.osSuffix }}
path: bin