Commit graph

10 commits

Author SHA1 Message Date
=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
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
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
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
4f077ef00e build-system: fix incorrect path to helper script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-08 18:01:03 -08:00
Dirk Hohndel
f1ac55d322 build-system: replace repetitive GH Action code with script call
This is now much easier to maintain.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-08 17:51:54 -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
6bbade9845 only create releases on push
Pull requests can be triggered by anyone - we should not publish code
that comes in through pull requests to either GitHub releases or
Launchpad, Copr, etc.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 10:10:26 -08:00
Dirk Hohndel
cc5a5a22bd add Android .apk to release from GitHub Action
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 01:33:08 -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