-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from drewbrew/add-ci
Add CI
- Loading branch information
Showing
7 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
env: | ||
python_version: "3.9" | ||
|
||
defaults: | ||
run: | ||
shell: bash # https://github.com/beeware/briefcase/pull/912 | ||
|
||
jobs: | ||
verify-apps: | ||
name: Build apps | ||
strategy: | ||
matrix: | ||
os_name: ["macOS", "windows", "linux"] | ||
framework: ["toga"] | ||
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/[email protected] | ||
with: | ||
key: briefcase-${{ matrix.platform }} | ||
path: | | ||
~/.cookiecutters | ||
${{ matrix.briefcase-data-dir }} | ||
${{ matrix.pip-cache-dir }} | ||
${{ matrix.docker-cache-dir }} | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.python_version }} | ||
- name: Install packages | ||
run: pip install briefcase | ||
- name: Build Android App | ||
run: | | ||
cd tests/apps/verify-${{ matrix.framework }} | ||
briefcase create android | ||
briefcase build android | ||
briefcase package android --adhoc-sign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[tool.briefcase] | ||
project_name = "Hello Toga" | ||
bundle = "org.beeware" | ||
version = "0.0.1" | ||
url = "https://beeware.org/" | ||
license = "BSD license" | ||
author = 'Brutus' | ||
author_email = "[email protected]" | ||
|
||
[tool.briefcase.app.verify-toga] | ||
formal_name = "Hello Toga" | ||
description = "A Toga test app" | ||
icon = "src/verify_toga/resources/verify-toga" | ||
sources = ['src/verify_toga'] | ||
requires = [ | ||
] | ||
|
||
[tool.briefcase.app.verify-toga.android] | ||
requires = [ | ||
'toga-android>=0.3.0.dev38' | ||
] | ||
template = "../../.." |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from verify_toga.app import main | ||
|
||
if __name__ == '__main__': | ||
main().main_loop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
A Toga test app | ||
""" | ||
import toga | ||
from toga.style import Pack | ||
from toga.style.pack import COLUMN, ROW | ||
|
||
|
||
class HelloToga(toga.App): | ||
|
||
def startup(self): | ||
""" | ||
Construct and show the Toga application. | ||
Usually, you would add your application to a main content box. | ||
We then create a main window (with a name matching the app), and | ||
show the main window. | ||
""" | ||
main_box = toga.Box() | ||
|
||
self.main_window = toga.MainWindow(title=self.formal_name) | ||
self.main_window.content = main_box | ||
self.main_window.show() | ||
|
||
|
||
def main(): | ||
return HelloToga() |
Empty file.
Binary file not shown.