Skip to content

Briefcase integration #1

Briefcase integration

Briefcase integration #1

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
FORCE_COLOR: "1"
defaults:
run:
shell: bash
jobs:
ci:
name: Test and Package
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
target: [ "Windows", "macOS", "Ubuntu-24.04", "Fedora-40"]
include:
- target: "Windows"
output-format: "app"
runs-on: "windows-latest"
- target: "macOS"
output-format: "app"
runs-on: "macos-latest"
- target: "Ubuntu-24.04"
platform: "Linux"
output-format: "system"
runs-on: "ubuntu-latest"
pre-command: "sudo apt -y install socat"
briefcase-run-prefix: "xvfb-run"
briefcase-args: "--target ubuntu:24.04"
- target: "Fedora-40"
platform: "Linux"
output-format: "system"
runs-on: "ubuntu-latest"
pre-command: "sudo apt -y install socat"
briefcase-run-prefix: "xvfb-run"
briefcase-args: "--target fedora:40"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.12" # update with your targeted Python version
- name: Install Briefcase
run: |
python -m pip install -U pip setuptools wheel
python -m pip install briefcase
- name: Setup Environment
run: |
# Use GitHub's preinstalled JDK 17 for Android builds
echo JAVA_HOME="${JAVA_HOME_17_X64:-$JAVA_HOME_17_arm64}" | tee -a ${GITHUB_ENV}
${{ matrix.pre-command }}
- name: Build App
run: |
${{ matrix.briefcase-build-prefix }} \
briefcase build \
${{ matrix.platform || matrix.target }} \
${{ matrix.output-format }} \
--test --no-input --log \
${{ matrix.briefcase-args }} \
${{ matrix.briefcase-build-args }}
- name: Test App
run: |
${{ matrix.briefcase-run-prefix }} \
briefcase run \
${{ matrix.platform || matrix.target }} \
${{ matrix.output-format }} \
--test --no-input --log \
${{ matrix.briefcase-args }} \
${{ matrix.briefcase-run-args }}
- name: Package App
run: |
${{ matrix.briefcase-package-prefix }} \
briefcase package \
${{ matrix.platform || matrix.target }} \
${{ matrix.output-format }} \
--update --adhoc-sign --no-input --log \
${{ matrix.briefcase-args }} \
${{ matrix.briefcase-package-args }}
- name: Upload App
# Briefcase cannot create iOS artefacts; instead, apps
# must be packaged and published for iOS through Xcode.
if: matrix.target != 'iOS'
uses: actions/upload-artifact@v4
with:
name: App-${{ matrix.target }}
path: dist
if-no-files-found: error
- name: Upload Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: Log-Failure-${{ matrix.target }}
path: logs/*