-
-
Notifications
You must be signed in to change notification settings - Fork 4
121 lines (100 loc) · 3.75 KB
/
ci.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: CI
on:
pull_request:
push:
branches:
- main
workflow_call:
defaults:
run:
shell: bash # https://github.com/beeware/briefcase/pull/912
jobs:
pre-commit:
name: Pre-commit checks
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
with:
pre-commit-source: "pre-commit"
unit-tests:
name: Unit tests
needs: pre-commit
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
backend:
- "macOS-Xcode"
- "macOS-app"
- "linux-appimage"
- "linux-flatpak"
- "windows-VisualStudio"
- "windows-app"
- "iOS"
- "android"
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
include:
- runs-on: ubuntu-latest
- pre-command:
- briefcase-target:
- briefcase-run-args:
- backend: macOS-Xcode
runs-on: macos-latest
briefcase-target: "macOS Xcode"
- backend: macOS-app
runs-on: macos-latest
briefcase-target: "macOS app"
- backend: linux-system
runs-on: ubuntu-latest
python-version: "system"
pre-command: "sudo apt-get update -y && sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config"
briefcase-target: "linux system"
- backend: linux-appimage
runs-on: ubuntu-latest
pre-command: "sudo apt-get update -y && sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config libfuse2"
briefcase-target: "linux appimage"
- backend: linux-flatpak
runs-on: ubuntu-latest
pre-command: "sudo apt-get update -y && sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config flatpak flatpak-builder"
briefcase-target: "linux flatpak"
- backend: windows-VisualStudio
runs-on: windows-latest
briefcase-target: "windows VisualStudio"
- backend: windows-app
runs-on: windows-latest
briefcase-target: "windows app"
- backend: iOS
runs-on: macos-latest
briefcase-target: "iOS"
briefcase-run-args: ' -d "iPhone SE (3rd generation)"'
- backend: android
runs-on: macos-latest
briefcase-target: "android"
briefcase-run-args: " -d '{\"avd\":\"beePhone\"}' --Xemulator=-no-window --Xemulator=-no-snapshot --Xemulator=-no-audio --Xemulator=-no-boot-anim --shutdown-on-exit"
exclude:
# Binary packages aren't available for 3.11 on mobile yet
- backend: "android"
python-version: "3.11"
- backend: "iOS"
python-version: "3.11"
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Python
uses: actions/[email protected]
if: matrix.python-version != 'system'
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: ${{ matrix.pre-command }}
- name: Install Briefcase
uses: beeware/.github/.github/actions/install-briefcase@main
- name: Test App
run: briefcase run ${{ matrix.briefcase-target }} --test ${{ matrix.briefcase-run-args }}
- name: Package
run: briefcase package ${{ matrix.briefcase-target }} --update --adhoc-sign
- name: Upload logs
uses: actions/[email protected]
if: failure()
with:
name: build-failure-logs-${{ matrix.backend }}-${{ matrix.python-version }}
path: logs/*