Commit graph

94 commits

Author SHA1 Message Date
Michael Keller
009e8a32bb Fix Windows versioning as well.
Signed-off-by: Michael Keller <github@ike.ch>
2024-08-02 01:28:37 +12:00
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
=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
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
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
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
0af410d6ce iOS: update minimum iOS version to 12.0
None of the tools we use work with older versions, anyway.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-08-30 09:18:06 -07:00
Dirk Hohndel
7801b0c28a build-system: small changes to the iOS build script
This makes it marginally easier to deal with debug builds and release builds in
parallel. The quick builds work most of the time, but not always.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-08-30 09:18:06 -07:00
Dirk Hohndel
7bdd968e05 build-system/iOS: fix minimum iOS version supported
Qt requires iOS 10, let's not pretend that we can support ancient iOS 6.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
e3a83dcc90 build-system/iOS: remove outdated build-ios directories
The places we build things are still rather inconsistent for historic reasons -
this definitely deserves some more cleaning up.
The top level build-ios dir was completely unused, and the build location for
the googlemaps plugin was inconsistent with all of the other build dirs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
55dc445188 build-system/iOS: create the build directory parallel to subsurface
This seems more consistent with how we do things elsewhere.
Also make sure that the ssrf-version.h file is created in the correct
directory.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
80b5e7990a build-system/iOS: build Kirigami separately for iOS as well
Since the integrated build no longer seems to work, this creates a separate
Kirigami build using qmake (as I couldn't make Kirigami's cmake build work).

The install target tries to install into the Qt install which may not be
possible with a user account, so this instead uses the built library directly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
198096e30e iOS: adjust GitHub Action to new build format
It's frustrating that I can't get the translation.qrc support the translation
files to be created in the build directory. Having them as part of the sources
just feels wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
648402506f build-system/iOS: no longer build in packaging/ios
That always was such a weird choice.
This also adjusts to a minor change in the layout of libgit2 sources.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
0d8324bfb4 iOS: fix libxslt build
We need to build libxml2 without LZMA.
We need to make sure that libxslt finds the libxml2 includes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04 11:09:17 -07:00
Dirk Hohndel
6c5c2bfb18 iOS: clean up build shell script
Address shell linter comments. Follow our usual naming for build dirs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04 11:09:17 -07:00
Dirk Hohndel
5178ea2d15 iOS: add libxml2 build
I don't know why this is suddenly needed and wasn't before, but hopefully
this fixes the broken builds on GitHub.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04 11:09:17 -07:00
Dirk Hohndel
67933e68dd build-system/iOS: don't build libdivecomputer inside the source tree
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09 16:48:55 -08:00
Dirk Hohndel
6fed3d6517 buils-system/iOS: change confusing variable name
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09 16:48:55 -08:00
jan Iversen
7eddaeea21 build-system: iOS, change location of 3rd party builds
move location of 3rd build to follow same pattern as desktop/mobile build

update central .gitignore to silence libdivecomputer/build-ios, this should
really be in libdivecomputer, but it is more easy to put it in a subsurface
controlled file.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
jan Iversen
fa8c7ecc58 build-system: iOS, change location of install-root
move from build-ios/install-root/<arch> to
SSRF_CLONE/install-root/ios/<arch>

move fat libraries, include and bin to SSRF_CLONE/install-root/ios

Call "make" and not "make qmake_all" which is just a FORCE dependency.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
jan Iversen
543e65e987 build-system: iOS, use ~/Qt
packaging/ios/build.sh expected a link ./Qt to the Qt installation.
scripts/build.sh expect ~/Qt to contain the Qt installation

change to ~/Qt and thus no longer need link

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
Dirk Hohndel
6eca1b3ead iOS: fix handling of version option to build.sh
This makes it much more consistent and avoids a silly warning.

Also some small README updates.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
3afcff56d4 iOS: build the debug version of Google maps library if needed
When trying to debug on device Xcode really wants a debug build (which is
nearly unusably slow, but that's a different issue).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
a0c47e0fbc iOS: explicitly disable open source SSL implementations
Those aren't allowed on iOS and adding these two flags removes some confusing
warnings that look like errors in the build log.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Rolf Eike Beer
d104506f98 CMake: use builtin method to not use BZip2
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-21 19:30:14 -07:00
Dirk Hohndel
7b4d661ff2 iOS: quiet verbose warnings for libzip
And don't try to build manuals, regression tests and examples, while we are at
it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05 17:54:01 -07:00
Dirk Hohndel
d81a2c812b iOS: fix libzip build instructions
Recent libzip no longer supports autotools.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-04 15:07:04 -07:00
jan Iversen
abc3125b8e ios: add -all to build.sh
-all will build debug and release for the choosen architectures
armv7,arm64,x86_64 without extra parameter and only
x86_64 with -simulator

Use -all to prebuild all 6 variants we support.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-11 09:45:12 -07:00
jan Iversen
ec0511e824 ios: concentrate build dirs
update build.sh to make all builds in build-ios
to keep the git dir as clean as possible

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:18:41 +02:00
jan Iversen
fe7655155f ios: share clones with desktop
Change src dir for clones to subsurface/.. in order to share with
desktop

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:18:41 +02:00
jan Iversen
771bd4bce4 iOS: move get-dep-lib outside ARCH loop
Fetch all 3rd party libs before entering ARCH loop

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-07 18:43:17 +02:00
jan Iversen
d7e31ebbcd iOS: get rid of ios/Subsurface-mobile
Having a split between ios and ios/Subsurface-mobile is just confusing
and without a practical reason

Move files from ios/Subsurface-mobile to ios and update .gitignore

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-20 11:35:28 -07:00
jan Iversen
77b9a62f7f iOS: added get-dep-lib to build.sh
Removed all 3rd party download/clone, and used common
get-dep-lib instead

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17 11:16:50 -07:00
jan Iversen
8341165999 iOS: corrected ^space to tab
Corrected to use correct code style.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-11 07:23:08 -07:00
jan Iversen
1d5d7d0c47 iOS: cleaned/bumped versions
Made versioning identical to scripts/build.sh

Having the same version of 3rd party libraries across platforms
secures a more stable product.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
6019688b98 iOS: removed local build of libxml2
script/build.sh uses the builtin libxml2 and do not build locally,
    updated build.sh and Subsurface-mobile.pro to to the same.

    sadly enough xslt is not distributed for iOS so it must be built.

    Apart from simplifying the script it saves build time

    Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
5aa5398624 iOS: removed local build of sqllite3
script/build.sh uses the builtin sqllite3 and do not build locally,
updated build.sh and Subsurface-mobile.pro to to the same.

Apart from simplifying the script it saves build time

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
a0030a488a iOS: build.sh does not run configure for libdivecomputer
In a "virgin" repo incl. libdivecomputer, starting by running
ios/build.sh caused an error in libdivecomputer,
because autoreconf was never run.

Changed build.sh to check if libdivecomputer/configure exist, if
not run autoreconf

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
ff15d48f69 iOS: Allow change of bundle identifier
This patch allows users to set a bundle identifier,
without opening Xcode (set as env. variable).

If the env. variable is not set (like e.g. on Travis) it defaults
to org....

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:40:45 -07:00
Murillo Bernardes
7d6a48b59f iOS: use recommended variable for bundle ID
We used to hard-code the bundle ID which meant that developers always had to
manually override the bundle ID in order to be able to sign the iOS app for
local testing.  With this change, the official builds will continue to work
without manually opening the project in Xcode, yet other developers will use
the Apple-recommended format in order to set their own bundle ID.

This is based on a suggestion by Murillo Bernardes.

See #1246

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-10 08:19:33 -07:00
jan Iversen
161e5e94fc iOS: update build script
Use git repos and checkout corresponding tags where possible.
Use more reliable servers to download source from.

[Dirk Hohndel: refactored Jan's original commit in #1241]

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-09 14:40:31 +02:00
Dirk Hohndel
b9e57dbeab iOS: fix typo in build script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-27 11:54:01 -07:00
Dirk Hohndel
2137b21e1b iOS: allow building for the simulator & switch debug/release builds
It makes sense to be able to control this with command line options.
On Travis this avoids the signing problem and makes the build much faster.
Still should be enough to catch iOS breakage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-24 15:47:25 -07:00
Dirk Hohndel
2cba24fa1a iOS: don't show all the libgit2 warnings
We aren't concerned about the code quality of libgit2 and with these warnings
the build log overflows.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-24 15:45:35 -07:00
Dirk Hohndel
09edf25366 iOS: build Release by default
And add -debug option to build.sh for debug builds.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-23 09:28:41 -07:00