Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC] Build Linux System package on aarch64 #46

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/install-briefcase/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ inputs:
required: false

outputs:
installed-repo:
value: ${{ steps.install.outputs.repo }}
description: "The source repo of Briefcase that was installed."
installed-version:
value: ${{ steps.install.outputs.version }}
description: "The version or branch of Briefcase that was installed."
Expand Down Expand Up @@ -144,4 +147,5 @@ runs:
python -m pip install -U "git+${REPO}@${REF}"

echo "Installed version: $(briefcase --version)"
echo "repo=${REPO}" >> ${GITHUB_OUTPUT}
echo "version=${REF}" >> ${GITHUB_OUTPUT}
323 changes: 178 additions & 145 deletions .github/workflows/app-build-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:

- name: Install Briefcase
if: ${{ !endsWith(inputs.repository, 'briefcase') }}
id: briefcase
uses: ./beeware-.github/.github/actions/install-briefcase

- name: Create Briefcase project
Expand All @@ -147,53 +148,53 @@ jobs:
# In the steps below, using the builtin functions for comparison (instead of ==)
# allows for case-insensitivity to the inputs for the workflow.

- name: Build macOS app
if: >
startsWith(inputs.runner-os, 'macOS')
&& contains(fromJSON('["", "macOS"]'), inputs.target-platform)
&& contains(fromJSON('["", "app"]'), inputs.target-format)
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create macOS app
briefcase build macOS app
briefcase package macOS app --adhoc-sign

- name: Build macOS Xcode project
if: >
startsWith(inputs.runner-os, 'macOS')
&& contains(fromJSON('["", "macOS"]'), inputs.target-platform)
&& contains(fromJSON('["", "Xcode"]'), inputs.target-format)
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create macOS Xcode
briefcase build macOS Xcode
briefcase package macOS Xcode --adhoc-sign

- name: Build Windows app
if: >
startsWith(inputs.runner-os, 'Windows')
&& contains(fromJSON('["", "Windows"]'), inputs.target-platform)
&& contains(fromJSON('["", "app"]'), inputs.target-format)
run: |
unset WIX # force Briefcase to install and use its own version of WiX

cd tests/apps/verify-${{ inputs.framework }}
briefcase create windows app
briefcase build windows app
briefcase package windows app --adhoc-sign

- name: Build Windows Visual Studio project
if: >
startsWith(inputs.runner-os, 'Windows')
&& contains(fromJSON('["", "Windows"]'), inputs.target-platform)
&& contains(fromJSON('["", "VisualStudio"]'), inputs.target-format)
run: |
unset WIX # force Briefcase to install and use its own version of WiX

cd tests/apps/verify-${{ inputs.framework }}
briefcase create windows VisualStudio
briefcase build windows VisualStudio
briefcase package windows VisualStudio --adhoc-sign
# - name: Build macOS app
# if: >
# startsWith(inputs.runner-os, 'macOS')
# && contains(fromJSON('["", "macOS"]'), inputs.target-platform)
# && contains(fromJSON('["", "app"]'), inputs.target-format)
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create macOS app
# briefcase build macOS app
# briefcase package macOS app --adhoc-sign
#
# - name: Build macOS Xcode project
# if: >
# startsWith(inputs.runner-os, 'macOS')
# && contains(fromJSON('["", "macOS"]'), inputs.target-platform)
# && contains(fromJSON('["", "Xcode"]'), inputs.target-format)
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create macOS Xcode
# briefcase build macOS Xcode
# briefcase package macOS Xcode --adhoc-sign
#
# - name: Build Windows app
# if: >
# startsWith(inputs.runner-os, 'Windows')
# && contains(fromJSON('["", "Windows"]'), inputs.target-platform)
# && contains(fromJSON('["", "app"]'), inputs.target-format)
# run: |
# unset WIX # force Briefcase to install and use its own version of WiX
#
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create windows app
# briefcase build windows app
# briefcase package windows app --adhoc-sign
#
# - name: Build Windows Visual Studio project
# if: >
# startsWith(inputs.runner-os, 'Windows')
# && contains(fromJSON('["", "Windows"]'), inputs.target-platform)
# && contains(fromJSON('["", "VisualStudio"]'), inputs.target-format)
# run: |
# unset WIX # force Briefcase to install and use its own version of WiX
#
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create windows VisualStudio
# briefcase build windows VisualStudio
# briefcase package windows VisualStudio --adhoc-sign

- name: Build Linux System project (Ubuntu, local)
if: >
Expand All @@ -208,106 +209,138 @@ jobs:
briefcase build linux system
briefcase package linux system --adhoc-sign

- name: Build Linux System project (Debian, Dockerized)
- name: Build Linux System project (Ubuntu, aarch64)
if: >
startsWith(inputs.runner-os, 'ubuntu')
&& contains(fromJSON('["", "Linux"]'), inputs.target-platform)
&& contains(fromJSON('["", "system"]'), inputs.target-format)
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create linux system --target debian:bullseye
briefcase build linux system --target debian:bullseye
briefcase package linux system --target debian:bullseye --adhoc-sign

- name: Build Linux System project (RPM, Dockerized)
# fedora:37 ships with Python 3.11 and PySide2 cannot be installed
if: >
startsWith(inputs.runner-os, 'ubuntu')
&& !contains(fromJSON('["PySide2"]'), inputs.framework)
&& contains(fromJSON('["", "Linux"]'), inputs.target-platform)
&& contains(fromJSON('["", "system"]'), inputs.target-format)
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create linux system --target fedora:37
briefcase build linux system --target fedora:37
briefcase package linux system --target fedora:37 --adhoc-sign

- name: Build Linux System project (Arch, Dockerized)
# arch started shipping Python 3.11 on 3 may 2023 and PySide2 cannot be installed
if: >
startsWith(inputs.runner-os, 'ubuntu')
&& !contains(fromJSON('["PySide2"]'), inputs.framework)
&& contains(fromJSON('["", "Linux"]'), inputs.target-platform)
&& contains(fromJSON('["", "system"]'), inputs.target-format)
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create linux system --target archlinux:latest
briefcase build linux system --target archlinux:latest
briefcase package linux system --target archlinux:latest --adhoc-sign

- name: Build AppImage project
if: >
startsWith(inputs.runner-os, 'ubuntu')
&& contains(fromJSON('["", "Linux"]'), inputs.target-platform)
&& contains(fromJSON('["", "AppImage"]'), inputs.target-format)
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create linux AppImage
briefcase build linux AppImage
briefcase package linux AppImage --adhoc-sign

- name: Build Flatpak project
if: >
startsWith(inputs.runner-os, 'ubuntu')
&& contains(fromJSON('["", "Linux"]'), inputs.target-platform)
&& contains(fromJSON('["", "Flatpak"]'), inputs.target-format)
&& startsWith(inputs.framework, 'toga')
run: |
sudo apt-get update -y
sudo apt-get install -y flatpak flatpak-builder

cd tests/apps/verify-${{ inputs.framework }}
briefcase create linux flatpak
briefcase build linux flatpak
briefcase package linux flatpak --adhoc-sign

- name: Build Android App
if: >
contains(fromJSON('["", "Android"]'), inputs.target-platform)
&& contains(fromJSON('["", "Gradle"]'), inputs.target-format)
&& startsWith(inputs.framework, 'toga')
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create android gradle
briefcase build android gradle
briefcase package android gradle --adhoc-sign

- name: Build iOS App
if: >
startsWith(inputs.runner-os, 'macOS')
&& contains(fromJSON('["", "iOS"]'), inputs.target-platform)
&& contains(fromJSON('["", "Xcode"]'), inputs.target-format)
&& startsWith(inputs.framework, 'toga')
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create iOS xcode
briefcase build iOS xcode
briefcase package iOS xcode --adhoc-sign

- name: Build Web App
if: >
contains(fromJSON('["", "web"]'), inputs.target-platform)
&& contains(fromJSON('["", "static"]'), inputs.target-format)
&& startsWith(inputs.framework, 'toga')
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create web static
briefcase build web static
briefcase package web static

- name: Upload failure logs
uses: actions/[email protected]
if: failure()
uses: uraimo/run-on-arch-action@v2
with:
name: build-failure-logs-${{ inputs.framework }}-${{ inputs.python-version }}-${{ inputs.target-platform }}-${{ inputs.target-format }}
path: tests/apps/verify-${{ inputs.framework }}/logs/*
arch: "aarch64"
distro: "ubuntu22.04"
githubToken: ${{ github.token }}
dockerRunArgs: |
--workdir "/tests/apps/verify-${{ inputs.framework }}"
--volume "${{ github.workspace }}/dist:/dist"
--volume "${{ github.workspace }}/tests/apps/verify-${{ inputs.framework }}:/tests/apps/verify-${{ inputs.framework }}"
shell: /bin/bash
install: |
apt update && apt install -y git python3-dev python3-pip libcairo2-dev libgirepository1.0-dev
run: |
python3 -m pip install -U pip setuptools wheel
# just install my branch directly for this POC...the steps below would be necessary if merged
python3 -m pip install git+https://github.com/rmartin16/briefcase@arch-checks
#if [ "${{ steps.briefcase.outputs.installed-repo }}" ]; then
# python3 -m pip install git+${{ steps.briefcase.outputs.installed-repo }}@${{ steps.briefcase.outputs.installed-version }}
#else
# python3 -m pip install --no-index --find-links=/dist/ briefcase
#fi
# the image seems to run with a TTY so Briefcase is using the Wait Bar and making a mess.
# fake out no TTY to clean it up for POC.
true | briefcase create linux system | cat
true | briefcase build linux system | cat
true | briefcase package linux system --adhoc-sign | cat

# - name: Build Linux System project (Debian, Dockerized)
# if: >
# startsWith(inputs.runner-os, 'ubuntu')
# && contains(fromJSON('["", "Linux"]'), inputs.target-platform)
# && contains(fromJSON('["", "system"]'), inputs.target-format)
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create linux system --target debian:bullseye
# briefcase build linux system --target debian:bullseye
# briefcase package linux system --target debian:bullseye --adhoc-sign
#
# - name: Build Linux System project (RPM, Dockerized)
# # fedora:37 ships with Python 3.11 and PySide2 cannot be installed
# if: >
# startsWith(inputs.runner-os, 'ubuntu')
# && !contains(fromJSON('["PySide2"]'), inputs.framework)
# && contains(fromJSON('["", "Linux"]'), inputs.target-platform)
# && contains(fromJSON('["", "system"]'), inputs.target-format)
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create linux system --target fedora:37
# briefcase build linux system --target fedora:37
# briefcase package linux system --target fedora:37 --adhoc-sign
#
# - name: Build Linux System project (Arch, Dockerized)
# # arch started shipping Python 3.11 on 3 may 2023 and PySide2 cannot be installed
# if: >
# startsWith(inputs.runner-os, 'ubuntu')
# && !contains(fromJSON('["PySide2"]'), inputs.framework)
# && contains(fromJSON('["", "Linux"]'), inputs.target-platform)
# && contains(fromJSON('["", "system"]'), inputs.target-format)
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create linux system --target archlinux:latest
# briefcase build linux system --target archlinux:latest
# briefcase package linux system --target archlinux:latest --adhoc-sign
#
# - name: Build AppImage project
# if: >
# startsWith(inputs.runner-os, 'ubuntu')
# && contains(fromJSON('["", "Linux"]'), inputs.target-platform)
# && contains(fromJSON('["", "AppImage"]'), inputs.target-format)
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create linux AppImage
# briefcase build linux AppImage
# briefcase package linux AppImage --adhoc-sign
#
# - name: Build Flatpak project
# if: >
# startsWith(inputs.runner-os, 'ubuntu')
# && contains(fromJSON('["", "Linux"]'), inputs.target-platform)
# && contains(fromJSON('["", "Flatpak"]'), inputs.target-format)
# && startsWith(inputs.framework, 'toga')
# run: |
# sudo apt-get update -y
# sudo apt-get install -y flatpak flatpak-builder
#
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create linux flatpak
# briefcase build linux flatpak
# briefcase package linux flatpak --adhoc-sign
#
# - name: Build Android App
# if: >
# contains(fromJSON('["", "Android"]'), inputs.target-platform)
# && contains(fromJSON('["", "Gradle"]'), inputs.target-format)
# && startsWith(inputs.framework, 'toga')
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create android gradle
# briefcase build android gradle
# briefcase package android gradle --adhoc-sign
#
# - name: Build iOS App
# if: >
# startsWith(inputs.runner-os, 'macOS')
# && contains(fromJSON('["", "iOS"]'), inputs.target-platform)
# && contains(fromJSON('["", "Xcode"]'), inputs.target-format)
# && startsWith(inputs.framework, 'toga')
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create iOS xcode
# briefcase build iOS xcode
# briefcase package iOS xcode --adhoc-sign
#
# - name: Build Web App
# if: >
# contains(fromJSON('["", "web"]'), inputs.target-platform)
# && contains(fromJSON('["", "static"]'), inputs.target-format)
# && startsWith(inputs.framework, 'toga')
# run: |
# cd tests/apps/verify-${{ inputs.framework }}
# briefcase create web static
# briefcase build web static
# briefcase package web static
#
# - name: Upload failure logs
# uses: actions/[email protected]
# if: failure()
# with:
# name: build-failure-logs-${{ inputs.framework }}-${{ inputs.python-version }}-${{ inputs.target-platform }}-${{ inputs.target-format }}
# path: tests/apps/verify-${{ inputs.framework }}/logs/*
Loading