Commit graph

194 commits

Author SHA1 Message Date
Michał Sawicz
a57c26ccd4 ci: bring back snap builds for master
That's what populates the ccache cache 🤦

Signed-off-by: Michał Sawicz <michal@sawicz.net>
2024-02-04 11:07:27 -08:00
Michał Sawicz
eb555b25d5 ci: refresh snap ci patch
Signed-off-by: Michał Sawicz <michal@sawicz.net>
2024-02-04 11:07:27 -08:00
Michał Sawicz
a6ac4f4599 snap: fix CI patch
Signed-off-by: Michał Sawicz <michal@sawicz.net>
2024-02-03 19:23:10 -08:00
Michał Sawicz
e2ca662502 snap: rebuild candidate, too
Signed-off-by: Michał Sawicz <michal@sawicz.net>
2024-02-03 19:23:10 -08:00
Michał Sawicz
d04c9785b6 snap: use the rolling release version
Signed-off-by: Michał Sawicz <michal@sawicz.net>
2024-02-03 19:23:10 -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
Dirk Hohndel
a59d033278 fix annoying typo in Copr workflow
This prevented the release from being pushed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-27 20:12: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
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
4bab38b8df CICD: Make it Possible to Run CICD Builds in a Fork.
Use the project name to resolve the target repository to create the release in.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-15 19:53:54 -08:00
Dirk Hohndel
2db8b51eed build-system: missed one release note mention without .md
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-15 17:42:03 -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
Dirk Hohndel
9bf79c460a CICD: don't increment build number for pull requests
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 19:24:01 -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
2f464c114d CICD: attempt to read file content in GH yaml
It is very strange that in some yaml files the $(<release-version) construct
works just fine, but in others it evaluates to an empty string, even though the
file is there an has the correct content.

Attempting to get more debugging info and also use a different expression to
extract the information.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 17:13:53 -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
c2acdafcdf build-system: fix the APK filename for release upload
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 16:58:08 -08:00
Michael Keller
506a96f1f6 CICD: Fix GitHub Actions.
Fix the setting of environment variables in the android build.
Also fix a typo in the AppImage build.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-10 13:44:06 -08:00
Dirk Hohndel
53f6d1d606 build-system: remove pointless assignment
Suggested-by: Michael Keller <github@ike.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 13:44:06 -08:00
Dirk Hohndel
9aa9bec914 build-system: use GitHub Actions outputs
Tempting as it is to think this is just like bash - yaml isn't bash at all.

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
c33e05c1d4 build-system: create release notes only once
Some experimentation showed what should have been obvious. The release
information is additive. So it's enough if ONE of the actions creates release
notes, all the others can simply add additional release artifacts.

To make this more obvious, this commit creates a new action that does nothing
but create the release notes and publish the release. Since it really doesn't
do anything else, it's likely to be the quickest to complete, but that doesn't
matter - the last action that has a body or body_path in the gh-release action
determines the release notes. And we now have exactly one action that does so.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 09:17:49 -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
Michael Keller
867d31bcbc Another Fix for the android Action.
Signed-off-by: Michael Keller <github@ike.ch>
2024-01-10 07:25:23 +13:00
Michael Keller
deab622c3e CICD: Fix the android Action.
Fix the android action.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-10 07:17:05 +13: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
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
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
Michael Keller
e247d4cb3c CICD: Improve the Text for CICD Releases.
- add a note about the artifacts being added asynchronously
- add the commit message

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-08 03:14:01 -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
ec83e157e9 Fixed android build GitHub action.
Signed-off-by: Michael Keller <github@ike.ch>
2024-01-08 20:16:46 +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
Dirk Hohndel
5fcfe5298a remove CICD release warning
I guess the version change worked better than expected. So we should be able to
drop the warning.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-07 17:46:26 -08: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
Dirk Hohndel
de8dc87ecf reorder Copr yaml
We need to have git setup before trying to get the build number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 11:19:35 -08:00
Dirk Hohndel
7b59749bcb Add warning about changes to release announcement
This SHOULD work - but of course I can't test it until I try.

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
504a9b6efe use our monotonic buildnr for the Android builds
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 10:55:24 -08:00
Dirk Hohndel
fa8db5f3f7 change format of nightly build release numbers
They are now the four digit version dash build nr
So major.minor.patch.commitsSinceTag-buildNr

This makes it easier to correlate the release name and a specific manually
built version.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-06 10:55:24 -08:00
Dirk Hohndel
8992ca629d add Ko-Fi as sponsorship option
Documentation about all this on GitHub is a bit confusing.
I'm not entirely sure that this is the way to go. But I can't try
until this gets merged into master.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-29 14:20:52 -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
Michael Keller
3d902864ed CICD: Don't generate build number for pull requests.
Prevent attempts to generate a build number for pull request builds as
they will fail due to the lack of permissions on the
`subsurface/nightly-builds` repository.

Signed-off-by: Michael Keller <github@ike.ch>
2023-12-17 09:05:31 +13:00
Dirk Hohndel
fa609a9e9b Fix workflow issue caused by backwards incompatible component
Thanks to @probonopd for suggesting this fix.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-15 13:48:49 -08:00
Dirk Hohndel
0edb1c71d8 don't try to create a version on pull requests
The necessary keys to do so aren't available (and of course we don't try
to post a release on pull requests, anyway).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-15 13:48:49 -08: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
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
b63b286f2e remove tag creation in Windows workflow
This is being rewritten as we speak - and right now this prevents
the Windows workflow from running.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-11 06:43:18 -08:00