-
-
Notifications
You must be signed in to change notification settings - Fork 43
125 lines (122 loc) · 4.16 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
122
123
124
125
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.X"
- name: Install dependencies
run: |
python -m pip install tox
- name: Test with tox
run: |
tox
verify-apps:
name: Build apps
needs: unit-tests
strategy:
matrix:
os_name: ["macOS", "windows", "linux"]
framework: ["toga", "pyside2", "pyside6", "ppb"]
include:
- os_name: macOS
platform: macos-12
briefcase-data-dir: ~/Library/Caches/org.beeware.briefcase
pip-cache-dir: ~/Library/Caches/pip
docker-cache-dir: ~/Library/Containers/com.docker.docker/Data/vms/0/
- os_name: windows
platform: windows-latest
briefcase-data-dir: ~\AppData\Local\BeeWare\briefcase\Cache
pip-cache-dir: ~\AppData\Local\pip\Cache
docker-cache-dir: C:\ProgramData\DockerDesktop
- os_name: linux
# Need to use at least 22.04 to get the bugfix in flatpak for handling spaces in filenames.
platform: ubuntu-22.04
briefcase-data-dir: ~/.cache/briefcase
pip-cache-dir: ~/.cache/pip
# cache action cannot cache docker images (actions/cache#31)
# docker-cache-dir: /var/lib/docker
runs-on: ${{ matrix.platform }}
steps:
- name: Cache Briefcase tools
uses: actions/cache@v3.0.11
with:
key: briefcase-${{ matrix.platform }}
path: |
~/.cookiecutters
${{ matrix.briefcase-data-dir }}
${{ matrix.pip-cache-dir }}
${{ matrix.docker-cache-dir }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4.3.1
with:
python-version: "3.9"
- name: Install system dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get install -y flatpak flatpak-builder
- name: Install Briefcase
run: python -m pip install git+https://github.com/beeware/briefcase.git
- name: Create App
run: |
cd tests/apps
cat verify-${{ matrix.framework }}.config | briefcase new --template ../../
- name: Build App
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create
briefcase build
briefcase package --adhoc-sign
- name: Build Xcode project
if: matrix.os_name == 'macOS'
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create ${{ matrix.os_name }} Xcode
briefcase build ${{ matrix.os_name }} Xcode
briefcase package ${{ matrix.os_name }} Xcode --adhoc-sign
- name: Build Visual Studio project
if: matrix.os_name == 'windows'
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create ${{ matrix.os_name }} VisualStudio
briefcase build ${{ matrix.os_name }} VisualStudio
briefcase package ${{ matrix.os_name }} VisualStudio --adhoc-sign
- name: Build Flatpak project
if: matrix.os_name == 'linux' && matrix.framework == 'toga'
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create ${{ matrix.os_name }} flatpak
briefcase build ${{ matrix.os_name }} flatpak
briefcase package ${{ matrix.os_name }} flatpak --adhoc-sign
- name: Build Android App
if: matrix.framework == 'toga'
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create android
briefcase build android
briefcase package android --adhoc-sign
- name: Build iOS App
if: matrix.platform == 'macos-12' && matrix.framework == 'toga'
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create iOS
briefcase build iOS
briefcase package iOS --adhoc-sign
- name: Build Web App
if: matrix.framework == 'toga'
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create web
briefcase build web
briefcase package web