Repository navigation
151 lines (128 loc) · 4.68 KB
/
Copy pathci.yml
File metadata and controls
151 lines (128 loc) · 4.68 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CI
on:
pull_request:
push:
branches:
- main
workflow_call:
# Cancel active CI runs for a PR before starting another run
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
FORCE_COLOR: "1"
permissions: {}
jobs:
pre-commit:
name: Pre-commit checks
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
permissions:
contents: read
with:
pre-commit-source: "pre-commit"
unit-tests:
name: Unit tests
needs: pre-commit
permissions:
contents: read
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
backend:
- "macOS-Xcode"
- "macOS-app"
# AppImage builds (a) take over an hour, because the need to compile Numpy and
# Pandas from source, and (b) are only here as a light validation that
# Standalone Python is working. A Flatpak build also validates this, but
# completes in minutes.
# - "linux-appimage"
- "linux-flatpak"
- "windows-VisualStudio"
- "windows-app"
- "iOS"
- "android"
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
include:
- runs-on: ubuntu-24.04
- pre-command:
- briefcase-target:
- briefcase-run-args:
- backend: macOS-Xcode
runs-on: macos-26
briefcase-target: "macOS Xcode"
- backend: macOS-app
runs-on: macos-26
briefcase-target: "macOS app"
- backend: linux-system
runs-on: ubuntu-24.04
python-version: "system"
pre-command: "sudo apt update -y && sudo apt install -y --no-install-recommends python3-dev python3-pip libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 libcanberra-gtk3-module"
briefcase-target: "linux system"
# - backend: linux-appimage
# runs-on: ubuntu-24.04
# pre-command: "sudo apt update -y && sudo apt install -y --no-install-recommends libfuse2 libthai-dev libegl1"
# briefcase-target: "linux appimage"
- backend: linux-flatpak
runs-on: ubuntu-24.04
pre-command: "sudo apt update -y && sudo apt install -y --no-install-recommends flatpak flatpak-builder elfutils"
briefcase-target: "linux flatpak"
- backend: windows-VisualStudio
runs-on: windows-2025
briefcase-target: "windows VisualStudio"
- backend: windows-app
runs-on: windows-2025
briefcase-target: "windows app"
- backend: iOS
runs-on: macos-26
briefcase-target: "iOS"
briefcase-run-args: ' -d "iPhone 17e::iOS 26.5"'
- backend: android
runs-on: ubuntu-24.04
briefcase-target: "android"
briefcase-run-args: >
--device '{"avd":"beePhone","device_type":"pixel"}'
--Xemulator=-no-window
--Xemulator=-no-snapshot
--Xemulator=-no-audio
--Xemulator=-no-boot-anim
--shutdown-on-exit
pre-command: |
# allow access to KVM to run the emulator
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
exclude:
- backend: android
python-version: "3.15"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
if: matrix.python-version != 'system'
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Dependencies
run: ${{ matrix.pre-command }}
- name: Install Briefcase
uses: beeware/.github/.github/actions/install-briefcase@main
- name: Test App
timeout-minutes: 15
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/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: failure()
with:
name: build-failure-logs-${{ matrix.backend }}-${{ matrix.python-version }}
path: logs/*