Commit graph

539 commits

Author SHA1 Message Date
Michael Keller
dd50ab0106 Fix incorrect script references.
Signed-off-by: Michael Keller <mikeller@042.ch>
2024-05-13 12:39:09 +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
306dad575c CICD: Update the AppImage Build to Use ubuntu 16.04.
Update the linux AppImage build to use ubuntu 16.04, and simplify it to
a single workflow running on a vanilla docker image.

This still uses the upload-artifact@v3 Action that will be EOL in
November 2024, because v4 relies on node 20 which has an unmet glibc
dependency in ubuntu 16.04. But this workflow can be updated to run on
ubuntu 18.04 by a simple search / replace and disabling some 16.04
specific PPAs.

@dirkh, @probonopd: I have moved this here from #4183 to be able to
review and discuss it without the noise of the workflow cleanup.

The workflow now also publishes the AppImage as an artifact on pull
request builds, available under Checks / Details / Summary.

Signed-off-by: Michael Keller <github@ike.ch>
2024-05-12 13:52:12 +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
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
d49092ac70 CICD: Add Script to Find the Changeset ID for a CICD Release Number.
Add a script that finds the changeset ID in the subsurface repository
that a given CICD release was built from.
The option '-c' can be used to check out the changeset, if one is found.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-04-20 10:46:28 +07:00
Berthold Stoeger
5ac64ab2cd cleanup: replace Q_FOREACH and foreach by range base for
Q_FOREACH and foreach are anachronisms.

Range based for may cause a performance regression: it can
lead to a copy of shared containers (one reason why Qt's
COW containers are broken). However, as long as there is no
user noticeable delay, there is no point in analyzing each case.
And also no point in slapping an 'asConst' on every container
that is looped over.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-03-24 17:53:19 +01:00
Dirk Hohndel
fbbbbb997e build-system: sort Usage message and add missing options
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-02-07 15:00:56 -08:00
Michael Keller
9cdb9f7989 CICD: Add a File Containing the Release Title to CICD Releases.
Add a file containing the release title (derived from the pull request
title / commit message) to CICD releases - this is so that it will be
able to pick this up by the process updating the release pages on our
webserver, and show a list of the last few changes for each release.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-31 15:18:21 -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
Michael Keller
c1bfded4a7 CICD: Add GitHub Action to build the Windows (MXE) Builder Docker Image.
Add a GitHub action that builds the docker image to run builds for the
Windows (MXE) version of Subsurface.
Also update the MXE image Dockerfile to the latest version of MXE, and
add a patch to use a current version of mdbtools.
Configure GitHub actions that do not build docker images to not trigger
on changes to the contents of `scripts/docker/`.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-20 21:30:12 -08:00
Michael Keller
6dd5922d15 CICD: Improve the Android Docker Image Build.
Introduce proper reuse of intermediary stages in the multi-stage build.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-19 16:14:35 -08:00
Michael Keller
6c8afabedf CICD: Improve the Release Note Generation
Use .md suffix to get the files displayed as markdown.
Ignore generated artefacts.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-15 17:32:57 -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
Salvador Cuñat
5bae033f07 [scripts - docker] Fix build instructions
Current instruction to get the installer out the container will fail
with bash complaining about cp being a binary. Then would fail too
because subsurface-installer.exe doesn't exist any more.

Proposed instruction should work.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2024-01-10 21:10:31 -08:00
Dirk Hohndel
7d918aeef1 CICD: gracefully handle non merge pushes
Also improve the spacing of the merge text a tiny bit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 19:24:36 -08:00
Dirk Hohndel
eb4f3121bc CICD: clean up the noisy scripts
This all is way too verbose now that it apparently is working.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 19:14:25 -08:00
Dirk Hohndel
8fb504941e the path confusion is vert annoying
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 16:58:08 -08:00
Dirk Hohndel
5b2d1a4506 build-system: get the buildnr file from the right directory
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 13:44:06 -08:00
Dirk Hohndel
ca5f7fa4bf build-system: correctly test that branch was created
That '-b' was exactly the wrong thing to do here...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 13:44:06 -08:00
Dirk Hohndel
744257149f build-system: push to origin instead of explicit URL
Otherwise we don't use the embedded credentials and the push fails.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 13:44:06 -08:00
Dirk Hohndel
c0c447a5b6 build-system: don't discard the get-or-create-build-nr script output
That was the whole point of the previous change.
Also, run the build number creation on a pull request as well (at least for a
while) so we don't need to create new releases in order to test that part of
the process).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 13:44:06 -08:00
Dirk Hohndel
30efede730 build-system: small changes for better debugging
In order to make it easier to see what's happening inside get-atomic-buildnr.sh
write the result to a file that can be read by the caller. Not quite as
elegant, but hopefully more practical to see what's going wrong when no new
build number is created.

Make sure that post-releasenotes is successfull by actually posting a release
artifact (apparently the gh release action otherwise quietly fails).

Try to ensure we find the Android APK when uploading to the release.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 11:54:44 -08:00
Dirk Hohndel
14e715be6e build-system: assemble release notes using gh CLI
Instead of using a thirdparty action and painfully passing things around,
simply use the GitHub CLI (gh) and assemble the release notes on the fly.

This makes for much simpler and much easier to maintain code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-09 17:14:42 -08:00
Dirk Hohndel
13603a0878 build-system: avoid output that confuses the script
The get-or-create-buildnr.sh script writes a nice message to stdout which is useful
when using it interactively - but it broke the scripting; so redirect that output.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-08 21:38:38 -08:00
Dirk Hohndel
7286a76233 build-system: simplify GitHub Actions
Move both code and the release note text into files that can be shared between
multiple actions.

This should make the actions smaller and easier to read and since this is used
in several actions it should make things much easier to maintain.

In order to test this without too much unnecessary noise, this commit only
changes the android workflow - the others will be changed in a later commit
once his has been tested and works (again, this can really only be tested by
merging the PR into master).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-08 17:51:54 -08:00
Dirk Hohndel
4527abe936 build-system: helper script for atomic build number
This way we don't have to replicate the same code in several .yml files for
GitHub Actions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-08 17:51:54 -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
7d751a8160 Re-activated the GitHub action to build and publish the docker image.
Signed-off-by: Michael Keller <github@ike.ch>
2024-01-06 20:16:57 -08:00
Michael Keller
8e8c69f749 Added git configuration for the new CICD build setup.
Signed-off-by: Michael Keller <github@ike.ch>
2024-01-06 20:16:57 -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
aea2f36de2 rename variable in get-version script
Yeah... that looks better. Thanks @mikeller.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 10:55:24 -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
8a2dd8db74 Finally remove some of the Travis related scripts
These haven't been used in many years.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 10:55:24 -08:00
Dirk Hohndel
fe4c602117 minor cleanups to get-or-create-build-nr script
Deal with shellcheck warnings and make the script less noisy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 10:55:24 -08:00
Salvador Cuñat
e3a32f7e92 [smtk-import] Move to current mdbtools github repo
Original mdbtools developer gave up the project some time ago, and it's
continued with his permission in a forked repo:
	https://github.com/mdbtools/mdbtools.git

There was a nasty bug in libmdb, triggered under some rare circustances,
that is solved in the new repo which is, BTW, under current
development.

Move our scripts to the new repo and set our working version to the
latest release tag, currently, "v1.0.0"

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2023-12-17 11:05:32 +13:00
Dirk Hohndel
94c47f64ac create script to determine build number
What a pain. It turns out that github.run_number is counting the number of
times a specific workflow has been run - but that's different for different
workflows, so using that won't get us a single tag with all the corresponding
build artifacts.  And sadly I can't find a simple atomic way to increase a
GitHUb repo variable, so I came up with this somewhat convoluted dance, using
the the fact that a push to an existing brach that isn't a fast-forward will
fail.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-11 13:44:41 -08:00
Dirk Hohndel
d2f2f22dc1 don't build the macOS version twice on GitHub
We need some additional options when building the package, so let that script
handle the details and use the generic build script mainly for the dependencies.

Also let's not mix building for testing and building the DMG - just so I can
stay somewhat sane.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:54 -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
f5c1f7204a use current version of libftdi1
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
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
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
9cfe656342 update MXE build container
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 01:33:08 -08:00
Dirk Hohndel
ede732418b build-system: use gcc 10 for MXE builds
It's unclear if this will be enough to use gcc 10 by default when building
Subsurface using this container.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-11-06 07:56:05 +13:00
Salvador Cuñat
5d708c0d92 Build script: Qt has tagged versions currently
It looks like Qt company has LGPLed versions tagged wich simplifies
things a bit while building, e.g. 5.15.3 current workaround matches
"v5.15.3-lts-lgpl" tag.

Background: Debian Sid is currently at Qt 5.15.8 which is impossible to
build from scratch with current script as only a few git versions are
tagged in the script format "v5.15.8".

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2023-06-25 09:47:56 -07:00
rmorris
a1a834568a Correct paths, to allow libmtp to build
Signed-off-by: rmorris <rmorris@rkmorris.us>
2023-02-09 05:17:23 -08:00
Doug Junkins
d537e16cb1 macOS: support newer SDKs
Update to match Xcode command-line-tools SDKs from 10.X to 16.X

Signed-off-by: Doug Junkins <douglas.junkins@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-11-26 11:40:51 -08:00