Skip to content

Commit

Permalink
Try building flatpaks
Browse files Browse the repository at this point in the history
  • Loading branch information
layday committed May 13, 2024
1 parent e253cfd commit fef79db
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 29 deletions.
4 changes: 0 additions & 4 deletions .github/actions/prepare-ci/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ runs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-install-version || matrix.python-version }}
- name: Install libgirepository
run: sudo apt-get install -y libgirepository1.0-dev
if: matrix.os == 'ubuntu-latest'
shell: bash
33 changes: 13 additions & 20 deletions .github/workflows/freeze.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,19 @@ jobs:
briefcase-build-opts: ""
briefcase-package-opts: "--adhoc-sign"
- os: ubuntu-22.04
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-44
options: --privileged
python-version: "3.12"
briefcase-build-opts: "linux appimage --no-docker"
briefcase-package-opts: "linux appimage"
briefcase-build-opts: "linux flatpak"
briefcase-package-opts: "linux flatpak"
- os: windows-2022
python-version: "3.12"
briefcase-build-opts: ""
briefcase-package-opts: ""
fail-fast: false
runs-on: ${{ matrix.build-env.os }}
container: ${{matrix.build-env-container }}
steps:
- name: Clone the repo
uses: actions/checkout@v4
Expand All @@ -111,32 +115,21 @@ jobs:
with:
name: ${{ needs.build-package.outputs.wheel-name }}
path: ./dist
- name: Install briefcase Linux dependencies
run: sudo apt-get update --fix-missing && sudo apt-get install -y
patchelf pkgconf
libgtk-3-dev libwebkit2gtk-4.1-dev
libgirepository1.0-dev gir1.2-javascriptcoregtk-4.1 gir1.2-webkit2-4.1
if: startsWith(matrix.build-env.os, 'ubuntu-')
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.build-env.python-version }}
- name: Install nox
run: pipx install nox uv
- name: Patch in the wheel dependency
- name: Install nox and briefcase
run: pipx install nox 'briefcase @ git+https://github.com/layday/briefcase@instawow'
- name: Patch in the version and wheel
run: >-
nox -s patch_frontend_spec --
${{ startsWith(github.ref, 'refs/tags/') && '--version ${{ needs.build-package.outputs.wheel-version }}' || ''}}
--wheel-file '${{ steps.download-wheel.outputs.download-path }}/${{ needs.build-package.outputs.wheel-name }}'
- name: Patch in the version number
run: >-
nox -s patch_frontend_spec --
--version ${{ needs.build-package.outputs.wheel-version }}
if: startsWith(github.ref, 'refs/tags/')
- name: Install and run briefcase
- name: Run briefcase
run: |
python -m pip install 'briefcase @ git+https://github.com/layday/briefcase@instawow'
python -m briefcase build ${{ matrix.build-env.briefcase-build-opts }}
python -m briefcase package ${{ matrix.build-env.briefcase-package-opts }}
briefcase build ${{ matrix.build-env.briefcase-build-opts }}
briefcase package ${{ matrix.build-env.briefcase-package-opts }}
working-directory: instawow-gui
- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
9 changes: 4 additions & 5 deletions instawow-gui/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ requires = [
"std-nslog",
]

[tool.briefcase.app.instawow-gui-wrapper.linux]
linuxdeploy_plugins = [
"DEPLOY_GTK_VERSION=3 gtk",
"./linuxdeploy-plugin-zzzinstawowwebkit2gtk.sh",
]
[tool.briefcase.app.instawow-gui-wrapper.linux.flatpak]
flatpak_runtime = "org.gnome.Platform"
flatpak_runtime_version = "45"
flatpak_sdk = "org.gnome.Sdk"

0 comments on commit fef79db

Please sign in to comment.