Commit graph

840 commits

Author SHA1 Message Date
Michael Keller
2b7900b68d CICD: Make Version Information SemVer Compliant.
Make the version information used throughout the application and build
process compliant with the SemVer specifications, so that it can be
processed with libraries.

Signed-off-by: Michael Keller <github@ike.ch>
2024-07-30 11:05:10 +12:00
rmultan
29138b98ae Fix build for android
Patch libgit2 build

Signed-off-by: rmultan <multan.rafal.k@gmail.com>
2024-07-29 23:48:20 +12:00
Michael Keller
fc0a569cb6 CICD: Add Parameters to Android docker Build Script.
Add parameters to the docker build script for Android, to make it
possible to inject custom configuration when calling it from other
scripts.

Signed-off-by: Michael Keller <github@ike.ch>
2024-07-21 14:25:50 +12:00
Dirk Hohndel
d9f50bb8e0 add Ubuntu 24.04 / Noble Numbat to our builds
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-06-05 13:23:52 -07:00
Michael Keller
56f1e7027f Documentation: Update INSTALL and Convert it to Markdown.
Update the instructions for the Windows build and convert the file to
markdown.

Signed-off-by: Michael Keller <github@ike.ch>
2024-05-30 14:22:16 +12:00
Michael Keller
0d6b572a9f Fix script permissions.
Signed-off-by: Michael Keller <mikeller@042.ch>
2024-05-13 12:32:07 +12:00
=Michael Keller
6fc8310705 CICD: Improve Workflows.
Make multiple improvements to the existing workflows:
- create a shared custom action to deal with version number tracking
  and generation;
- use this action to add the branch name to the version for pull
  request builds;
- create a shared workflow for all debian-ish builds to avoid re-use
  by copy / paste;
- remove potential security risks by eliminating the use of
  pre-evaluated expressions (`${{ ... }}`) inside scripts;
- update outdated GitHub action versions;
- improve the consistency by renaming scripts acording to have a `.sh`
  extension;
- improve naming of generated artefacts for pull requests to include
  the correct version.

@dirkh: Unfortunately this is potentially going to break builds when it is
merged, as there is no good way to 'test' a merge build short of
merging.
We'll just have to deal with the fallout of it in a follow-up pull
request.

Signed-off-by: Michael Keller <github@ike.ch>
2024-05-13 10:19:59 +12:00
=Michael Keller
a83349015a CICD: Improve the GitHub Actions for Linux.
Do a few things:
- add a build for Debian trixie (as discussed in #4182);
- add a build for Ubuntu 24.04;
- rename the build definitions to match the build names;
- update the artifact uploads to use a non-deprecated version of the
  action, and name the artifact appropriately;
- remove a stale workflow file.

Signed-off-by: Michael Keller <github@ike.ch>
2024-05-11 12:51:33 +12:00
Michael Keller
5ac1922d84 Cleanup: Improve (Android) Build Scripts.
Add a script for building the Android APK in the docker container.
Also make some improvements to the Windows build scripts, and update the
documentation for both builds.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-05-06 00:45:51 +12:00
Michael Keller
d92777a3ff Packaging: Cleanup Windows Build Scripts.
Do some housekeeping and cleanup on the build scripts for Windows:
- remove Windows 32bit builds as support for this has been removed from
  the mxe container;
- fix some warnings in the smtk2ssrf installer configuration;
- sanitise the output colour of the smtk2ssrf build script;
- add a docker based build script for the Windows installers;
- remove outdated and deprecated documentation and scripts.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-04-26 07:42:59 -07:00
Michael Keller
8a5009786e Fix Translation Error in Android Build.
Same as iOS.

Signed-off-by: Michael Keller <github@ike.ch>
2024-03-16 13:32:02 +13:00
Dirk Hohndel
153bcdec42 fix incorrect Italian localization on iOS
Stupid cut and paste error...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-03-15 07:50:29 -07:00
Dirk Hohndel
7a74a6c426 enable Korean translations for Subsurface and Subsurface-mobile
A great thank you to Wonchan Lee!

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-02-19 14:46:48 -08:00
Dirk Hohndel
63f4761a13 build-system: add helper script to sign CICD macOS builds
This once again is reasonably specific to the way I have things set up but
might help someone else trying to figure out how to get things done.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-02-04 15:33:32 -08:00
Dirk Hohndel
6318a983eb remove Ubuntu Lunar as build target (EOL)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-29 15:11:33 -08:00
Dirk Hohndel
21095b18fc enable creating current releases for Ubuntu and Fedora
While for the other platforms we can simply copy our binaries (maybe
after signing them), for Fedora and Ubuntu we have to trigger fresh
builds.

The most logical way that I could think of to do this was to push the
same commit corresponding with the intended current release into a
branch named 'current' and have that trigger Copr and Launchpad builds
that post into our release repos.

So 'master' keeps moving forward, keeps creating new build numbers.
At some point we pick a build number that we want to be the next
'current' release. We then update the current branch to the commit that
corresponds to that build number and push the current branch which
triggers new builds in the correct repos on Copr and Launchpad.

This commit removes the silly 'push' argument from the make-package
scripts (after all, they are used to push those packages to the
respective build services) and instead use the branch name as argument
to those scripts - allowing us to pick which repo to push into.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-27 19:36:47 -08:00
Robert C. Helling
4fdaf3e8de Downloader: Install perl modules and set up environment
Signed-off-by: Robert C. Helling <helling@lmu.de>
2024-01-27 15:38:41 -08:00
Michael Keller
05ef933ff7 CICD: Move Windows Build to New Container.
Move the GitHub Action that builds the Windows artefacts to use the new
subsurface/mxe-build:3.1.0 container.
Also rename references to the old container in scripts and
documantation.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-24 00:05:26 +13:00
Dirk Hohndel
bd1763680e Ubuntu: remove obsolete dependency
It appears that this dependency is no longer provided (as of Mantis), but also
no longer needed (as a build without it appears to completed). Let's see if
that fixes our Mantis build issue.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-21 13:37:33 -08:00
Alexander Wilms
c92ebd1f3b Change AppStream metainfo file extension and path
The legacy /usr/share/appdata/*.appdata.xml path has been superseded by
/usr/share/metainfo/*.metainfo.xml

https://freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location

Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
2024-01-14 15:59:29 -08:00
Michael Keller
b5efaf661c CICD: Improve Location of Scripts for the Android Build Environment.
Move around the scripts required for the setup of the build environment
for android to satisfy docker's requirement of locality.
This allows the removal of an extra copy step, and avoids the creation
of extra artefacts, while still providing the same functionality.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-08 23:05:44 +13:00
Michael Keller
d867701233 Update GitHub action to include signing.
Signed-off-by: Michael Keller <github@ike.ch>
2024-01-08 19:46:37 +13:00
Michael Keller
1eed75c599 Docker Build Changes.
Signed-off-by: Michael Keller <github@ike.ch>
2024-01-08 19:46:37 +13:00
Michael Keller
6f260bdfaf CICD: Add APK Signing for the Android CICD Pipeline.
Add signing of the android APK to the scripts used by the CICD pipeline.
Also update the example for running these scripts locally, and add the artefacts generated by doing so to .gitignore.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-08 19:46:37 +13:00
Dirk Hohndel
d066241ad8 iOS: use M.m.p short version and M.m.p.b full version
All version information has to be integers, but at least the full version
allows a fourth digit which we can increment for local commits.

Update the plist fragment and script accordingly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-07 17:46:26 -08:00
Dirk Hohndel
61169151a0 create a fresh version file on every build
Don't just append to the existing file.
This was incorrect for both iOS and Android.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-07 17:46:26 -08:00
Dirk Hohndel
ef35c3e8cb update copyright year and version details
While the update to the copyright year really isn't required, it just looks
better.

By using the canonical instead of the git version in user visible strings we
are creating more consistency in how we refer to the version.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-07 16:01:55 -08:00
Michael Keller
e8dd3389a7 CICD: Update the android Build Docker Image.
Update the android build docker image:
- rebase on ubuntu 22.04;
- add tooling required to sign APKs;
- changes to make the container re-usable;
- change to a multi-stage build to keep the image size smaller;
- generic improvements to the Dockerfile

Also update the example script for how to use the container.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-06 20:16:57 -08:00
Dirk Hohndel
2a7628483e don't quote globs...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 12:33:31 -08:00
Dirk Hohndel
c4cb913426 adjust Launchpad package make script to new version logic
Also address some shellcheck issues.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 11:42:26 -08:00
Dirk Hohndel
5075e7f127 adjust Copr package make script to new version logic
Also address some shellcheck issues.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 11:42:15 -08:00
Dirk Hohndel
62477d8c65 Complete redesign of Subsurface version numbers
- for now all versions start with v6.0
- CICD builds use the monolithic build number as patch level, e.g. v6.0.12345
- local builds use the following algorithm
  - find the newest commit with a CICD build number that is included in the
    working tree
  - count the number of commits in the working tree since that commit
  - if there are no commits since the last CICD build, the local build version
    will be v6.0.12345-local
  - if there are N commits since the last CICD build, it will be
    v6.0.12345-N-local
- test builds in the CICD that don't create artifacts simply use a dummy release
  in order to not incorrectly increment the build number and also not to waste
  time and resources by manually checking out the nightly-build repo for each of
  these builds.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 10:55:24 -08:00
Dirk Hohndel
58fb49f243 retire the mobile version
Both Subsurface and Subsurface-mobile will share the same version number moving
forward.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 10:55:24 -08:00
Dirk Hohndel
60f1deb116 fix iOS simulator builds
With this hopefully the GitHub Action will pass again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-02 20:47:32 -08:00
Dirk Hohndel
b67aebd462 recreate a working iOS device build
The current XCode and Qt 5.15.2 (the newest version that we can use due to Kirigami
and the lack of binaries for the later open source releases of Qt 5.15) have some
issues. Work around those.

Also, don't create fat armv7/arm64 binaries anymore for iOS - there are no supported
armv7 devices anymore.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-02 20:47:32 -08:00
Michael Keller
b3d2a8cdcb Build system: Fix Local Build Script for android.
Change the name of the `GITHUB_WORKSPACE` environment variable in the
android build script to `OUTPUT_DIR`, which is more intuitive when the
script is used for local builds.
Also test if the variable is defined before attempting to use it as the
target of the build output.

Signed-off-by: Michael Keller <github@ike.ch>
2023-12-19 00:00:54 +13:00
Dirk Hohndel
57b355b314 Merge branch 'CICD-updates'
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-12 09:29:13 -08:00
Dirk Hohndel
3a98b8a722 more macOS build fixes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:54 -08:00
Dirk Hohndel
2ffba35d45 Build a macOS DMG in a GitHub Action
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:42 -08:00
Jef Driesen
c572148ab6 Always rebuild when local changes are present
Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
2023-12-10 15:56:44 +13:00
Jef Driesen
19dd25c71c Get the SHA1 when no tag is present
The 'git describe' command finds the most recent tag instead of the
SHA1. When trying to build from a repository without any tags, for
example in a fork, this causes the build to fail.

Use the '--always' option to fallback to the SHA1 in case no tag is
present.

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
2023-12-10 15:56:44 +13:00
Dirk Hohndel
1d150b106d create the APK with an apk build
Using the apk that is built as a side effect of an aab build does not work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 17:39:32 -08:00
Dirk Hohndel
f0ef8b51fc Fix Android APK renaming
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 09:53:25 -08:00
Dirk Hohndel
f252af1dd1 prevent the 'latest' tag from messing with our version
We need to use git describe in a way that only refers to vX.Y.Z style tags.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 04:00:32 -08:00
Dirk Hohndel
c609bc9446 more logical naming for the Android apk
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 03:27:54 -08:00
Dirk Hohndel
2d63591ab8 build Windows artifact with new container
This should get us a current version of Qt and many other newer libraries.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 01:47:27 -08:00
Dirk Hohndel
b0228b51ed launchpad build: link against dynamic libgit2 system library
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
41b5bbb226 add Launchpad PPA build
Could it be this easy? There's no way it's this easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
243d6bfd2b stop building our own libgit2 for Ubuntu
It's embarrassing that we kept doing this for so long. Debian and Ubuntu
have had new enough versions of libgit2 for a very long time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
8bf8f18962 trigger Fedora COPR build from GitHub
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00