-
Notifications
You must be signed in to change notification settings - Fork 1
122 lines (106 loc) · 3.29 KB
/
python-app.yml
File metadata and controls
122 lines (106 loc) · 3.29 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: CI
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
FORCE_COLOR: "1"
defaults:
run:
shell: bash
jobs:
ci:
name: Package
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
target: ["Ubuntu", "Windows", "macOS"]
include:
- target: "Ubuntu"
platform: "Linux"
output-format: "system"
runs-on: "ubuntu-latest"
pre-command: |
sudo apt-get update --fix-missing
sudo apt-get install -y \
socat libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 \
libcanberra-gtk3-module build-essential git uuid-dev \
libblkid-dev libmount-dev
briefcase-run-prefix: "xvfb-run"
briefcase-args: "--target ubuntu"
- target: "Windows"
output-format: "app"
runs-on: "windows-latest"
- target: "macOS"
output-format: "app"
runs-on: "macos-latest"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Briefcase
run: |
python -m pip install --upgrade pip
python -m pip install briefcase==0.3.26
- name: Setup Environment
run: ${{ matrix.pre-command }}
- name: Build App
run: |
${{ matrix.briefcase-run-prefix }} \
briefcase build \
${{ matrix.platform || matrix.target }} \
${{ matrix.output-format }} \
${{ matrix.briefcase-args }}
- name: Package App (Linux / macOS)
if: matrix.target != 'Windows'
run: |
if [ "${{ matrix.target }}" = "macOS" ]; then
briefcase package macOS app \
--update \
--no-input \
--log \
--adhoc-sign \
${{ matrix.briefcase-args }}
else
briefcase package \
${{ matrix.platform || matrix.target }} \
${{ matrix.output-format }} \
--update \
--no-input \
--log \
${{ matrix.briefcase-args }}
fi
- name: Install NSIS (Windows)
if: matrix.target == 'Windows'
run: |
choco install nsis --version=3.10 -y
- name: Package App (Windows NSIS)
if: matrix.target == 'Windows'
shell: pwsh
run: |
$makensis = "C:\Program Files (x86)\NSIS\makensis.exe"
if (!(Test-Path $makensis)) {
Write-Error "makensis.exe not found"
exit 1
}
& $makensis insightwallet.nsi
- name: Upload App (Linux / macOS)
if: matrix.target != 'Windows'
uses: actions/upload-artifact@v4
with:
name: InsightWallet-${{ matrix.target }}
path: dist
if-no-files-found: warn
- name: Upload App (Windows)
if: matrix.target == 'Windows'
uses: actions/upload-artifact@v4
with:
name: InsightWallet-Windows
path: |
build/*.exe
if-no-files-found: warn