Skip to content

Commit

Permalink
ci: flatpak: Use appropriate branch and runtime version.
Browse files Browse the repository at this point in the history
Use githib to build beta plugins for now, leaving the existing 18.08
x86_64 circleci builder as-is.
  • Loading branch information
Alec Leamas authored and Rasbats committed Mar 5, 2021
1 parent 225821d commit a14051a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/shipdriver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
CLOUDSMITH_STABLE_REPO: ${{ secrets.CLOUDSMITH_STABLE_REPO}}
CLOUDSMITH_UNSTABLE_REPO: ${{ secrets.CLOUDSMITH_UNSTABLE_REPO}}
CLOUDSMITH_BETA_REPO: ${{ secrets.CLOUDSMITH_BETA_REPO}}
FLATPAK_BRANCH: beta

steps:
- name: Git checkout
Expand Down
15 changes: 7 additions & 8 deletions ci/github-build-flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,25 @@ sudo dnf install -y -q cmake flatpak-builder flatpak gcc-c++ tar

# For now, horrible hack: aarch 64 builds are using the updated runtime
# 20.08 and the opencpn beta version using same runtime.
case $(uname -m) in
arm64|aarch64)
if [ "$FLATPAK_BRANCH" = 'beta' ]; then
flatpak install --user -y flathub org.freedesktop.Sdk//20.08 >/dev/null
flatpak remote-add --user --if-not-exists flathub-beta \
https://flathub.org/beta-repo/flathub-beta.flatpakrepo
flatpak install --user -y --or-update flathub-beta \
org.opencpn.OpenCPN >/dev/null
sed -i '/sdk:/s/18.08/20.08/' flatpak/org.opencpn.*.yaml
;;
*)
else
flatpak install --user -y flathub org.freedesktop.Sdk//18.08 >/dev/null
flatpak remote-add --user --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y --or-update flathub \
org.opencpn.OpenCPN >/dev/null
;;
esac
FLATPAK_BRANCH='stable'
fi

# Patch the runtime version so it matches the nightly builds'
sed -i '/^runtime-version/s/:.*/: stable/' flatpak/$MANIFEST
# Patch the runtime version so it matches the nightly builds
# or beta as appropriate.
sed -i "/^runtime-version/s/:.*/: $FLATPAK_BRANCH/" flatpak/$MANIFEST

# Configure and build the plugin tarball and metadata.
mkdir build; cd build
Expand Down
6 changes: 6 additions & 0 deletions flatpak/org.opencpn.OpenCPN.Plugin.shipdriver.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Branches and runtimes:
# - master Nigthly builds, 18.08 runtime
# - beta Flathub beta branch, aarch64 with 20.08 runtime.
# - stable Flathub main branch, x86_64 with 18.08 runtime.
#
id: org.opencpn.OpenCPN.Plugin.shipdriver
runtime: org.opencpn.OpenCPN
runtime-version: stable # official build at flathub
Expand Down

0 comments on commit a14051a

Please sign in to comment.