-
Notifications
You must be signed in to change notification settings - Fork 40
105 lines (92 loc) · 3.1 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Build & Deploy
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest-large
DEPLOY_PATH: pingviewer-Release.dmg
- os: ubuntu-latest
DEPLOY_PATH: pingviewer-Release.AppImage
- os: ubuntu-24-arm
DEPLOY_PATH: pingviewer-Release-Arm.AppImage
- os: windows-latest
DEPLOY_PATH: pingviewer-Release.zip
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Qt
if: matrix.os == 'ubuntu-24-arm'
run: |
sudo apt install -y python3
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '5.15.2'
target: 'desktop'
modules: qtcharts
setup-python: 'true'
- name: Install jinja2
run: |
pip install --user --upgrade pip;
pip install --user jinja2;
- name: Build Linux
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install libxcb-* libfuse-dev
./tools/compile.sh
mv /tmp/pingviewer-x86_64.AppImage pingviewer-Release.AppImage
- name: Build Mac
if: runner.os == 'macOS'
run: |
./tools/compile.sh
mv /tmp/ping* .
- name: Build Windows
if: runner.os == 'Windows'
env:
OPENSSL: 'C:\Program Files\OpenSSL\bin'
SYSTEM32: 'C:\windows\system32'
SYSTEM32_DLLS: 'VCRUNTIME140.dll VCRUNTIME140_1.dll MSVCP140.dll MSVCP140_1.dll'
run: |
env
cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel --target ALL_BUILD --config Release
cp build/Release/pingviewer.exe deploy/pingviewer.exe
if (($env:OPENSSL) -and (Test-Path $env:OPENSSL -pathType container)) {
Copy-Item ${env:OPENSSL}\*.dll -Destination deploy -Force
}
curl -L https://github.com/bluerobotics/stm32flash-code/releases/download/continuous/stm32flash.exe -o deploy/stm32flash.exe
foreach ($I in (${env:SYSTEM32_DLLS} -split ' ')) { copy ${env:SYSTEM32}\$I deploy\ }
windeployqt --qmldir qml --release deploy/pingviewer.exe --verbose=2
- name: Zip windows
uses: vimtor/action-zip@v1
if: runner.os == 'Windows'
with:
files: deploy
dest: ${{ matrix.DEPLOY_PATH }}
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: pingviewer-${{ matrix.os }}
path: ${{ matrix.DEPLOY_PATH }}
- name: Upload continuous to release
uses: svenstaro/upload-release-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.DEPLOY_PATH }}
tag: continuous
overwrite: true
prerelease: true
- name: Upload release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.DEPLOY_PATH }}
tag: ${{ github.ref }}
overwrite: true
prerelease: true