From b5f1e470d712b9b645cef1f0522eed3ef131302e Mon Sep 17 00:00:00 2001 From: "Matthew J. Milner" Date: Tue, 12 Nov 2024 18:56:51 +0100 Subject: [PATCH] Build manually in normal fashion rather than using pre-made action Signed-off-by: Matthew J. Milner --- .github/workflows/flatpak.yml | 43 +++++++++++++----------- flatpak/org.openchemistry.Avogadro2.yaml | 6 ++-- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index cc8d7ba9..93d3e58f 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -6,58 +6,61 @@ jobs: flatpak: name: "Flatpak" runs-on: ubuntu-latest - container: - image: bilelmoussaoui/flatpak-github-actions:kde-6.7 - options: --privileged steps: + - name: Install dependencies + run: sudo apt update -qq && sudo apt install -y -qq flatpak flatpak-builder + + - name: Configure flatpak + run: flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo + - name: Checkout openchemistry uses: actions/checkout@v4 with: repository: openchemistry/openchemistry submodules: false - path: src + path: openchemistry - name: Checkout avogadroapp uses: actions/checkout@v4 with: - path: src/avogadroapp + path: openchemistry/avogadroapp - name: Checkout avogadrolibs uses: actions/checkout@v4 with: repository: openchemistry/avogadrolibs - path: src/avogadrolibs + path: openchemistry/avogadrolibs - name: Checkout i18n uses: actions/checkout@v4 with: repository: openchemistry/avogadro-i18n - path: src/avogadro-i18n + path: openchemistry/avogadro-i18n - name: Checkout avogadrogenerators uses: actions/checkout@v4 with: repository: openchemistry/avogenerators - path: src/avogadrogenerators + path: openchemistry/avogadrogenerators - name: Checkout crystals uses: actions/checkout@v4 with: repository: openchemistry/crystals - path: src/crystals + path: openchemistry/crystals - name: Checkout fragments uses: actions/checkout@v4 with: repository: openchemistry/fragments - path: src/fragments + path: openchemistry/fragments - name: Checkout molecules uses: actions/checkout@v4 with: repository: openchemistry/molecules - path: src/molecules + path: openchemistry/molecules - name: Checkout Flathub shared-modules uses: actions/checkout@v4 @@ -65,21 +68,23 @@ jobs: repository: flathub/shared-modules path: shared-modules - - name: Setup tmate session + - name: Set up tmate session if: failure() uses: mxschmitt/action-tmate@v3 - name: Move manifest - run: mv src/avogadroapp/flatpak/org.openchemistry.Avogadro2.yaml ./ + run: mv openchemistry/avogadroapp/flatpak/org.openchemistry.Avogadro2.yaml ./ - name: Build with flatpak-builder - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + run: flatpak-builder --force-clean --user --install-deps-from=flathub --arch=x86_64 --default-branch=test --repo=repo builddir org.openchemistry.Avogadro2.yaml + + - name: Create bundle + run: flatpak build-bundle repo Avogadro2.flatpak org.openchemistry.Avogadro2 + + - name: Upload bundle + uses: actions/upload-artifact@v4 with: - bundle: avogadro2.flatpak - branch: nightly - manifest-path: org.openchemistry.Avogadro2.yaml - cache: false - cache-key: flatpak-builder-${{ github.sha }} + path: Avogadro2.flatpak - name: Cleanup if: ${{ always() }} # To ensure this step runs even when earlier steps fail diff --git a/flatpak/org.openchemistry.Avogadro2.yaml b/flatpak/org.openchemistry.Avogadro2.yaml index 1d9ed9d4..ef1ee5d8 100644 --- a/flatpak/org.openchemistry.Avogadro2.yaml +++ b/flatpak/org.openchemistry.Avogadro2.yaml @@ -1,5 +1,4 @@ app-id: org.openchemistry.Avogadro2 -default-branch: nightly runtime: org.kde.Platform sdk: org.kde.Sdk runtime-version: "6.7" @@ -48,9 +47,10 @@ modules: sources: # Avogadro stuff all already collected together as part of GitHub Actions # This means that if using this to build the Flatpak locally, the openchemistry repo and - # its submodules must be cloned into ./src in advance of running flatpak-builder with this manifest + # its submodules must be cloned into ./openchemistry in advance of running flatpak-builder + # with this manifest - type: dir - path: src + path: openchemistry # Now fetch third-party stuff where the source is expected in `openchemistry/thirdparty` # VTK