-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[POC] Build Linux System package on
aarch64
- Loading branch information
Showing
3 changed files
with
486 additions
and
449 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
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 |
---|---|---|
|
@@ -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 | ||
|
@@ -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: > | ||
|
@@ -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 | ||
python3 -m pip install -U pip setuptools wheel | ||
run: | | ||
# 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/* |
Oops, something went wrong.