Commit Graph
22 Commits
Author SHA1 Message Date
Tobias Brunner 6f99862da8 github: Move permissions to the individual jobs
SonarQube complains about workflow-level "allow" permissions.
2026-05-27 13:31:51 +02:00
Tobias Brunner 7faf93b701 github: Evict old entries from ccache
We don't want to build old versions using these caches, so we don't
need old entries (if header files change, there could be lots of
differences that increase the cache size unnecessarily).
2026-05-19 17:24:22 +02:00
Tobias Brunner 3b902ea59b github: Use separate caches for custom-built dependencies
These are shared by many tests, in particular the "all", "coverage",
"no-dbg" and "no-testable-ke" tests, which each would otherwise require
their own large cache.

Similarly, the "codeql" and "sonarcloud" tests rely on the same
dependencies but only the latter uses ccache for the strongSwan build.

Also reduce the maximum size per cache for all workflows to keep them
in check over time (some could even be set lower, we'll have to see
how this develops).
2026-05-12 16:34:22 +02:00
Tobias Brunner daa0b109da github: Only store (and delete) caches for branches not PRs 2026-05-08 14:42:30 +02:00
Tobias Brunner 3a44941d2c github: Remove commit ID from cache keys and manually evict old entries
Let's try this again :)  Since cache entries with the same key are not
updated/replaced and there is no option to do so, we manually delete the
previous entry for the current branch.

This reduces the cache storage for active branches, which can cause
caches of the master branch to get evicted, which in turn will slow down
builds of not only master but also new branches as they can't fall back
on those caches.

Permission has to be explicitly granted in order to delete the cache
entries when not using the legacy all-write tokens that are the default
for old repositories.

The continue-on-error option is set for the step that deletes the old
cache entry as it's expected that cache-hit will be true for a new feature
branch when restoring the cache from the master branch.  However, because
there won't be anything to delete for this branch yet, the command will
fail.  The --succeed-on-no-caches option of the command unfortunately
only works with --all.

For the Linux tests, several jobs use the same cache key.  So there is
a chance that two jobs try to store a new entry concurrently, which will
fail (it works if there was a cache hit and they are slightly off as
previous entries are first deleted).  To avoid that, we store the cache
only for one particular config.

Also made sure that the "openssl" test does not remove "openssl-3/4"
caches by adding a suffix to the former.

For alpine, the repository had to be set explicitly as gh wasn't able to
determine it (didn't detect the Git working dir).
2026-05-07 10:52:08 +02:00
Tobias Brunner e0fb06c9cc Revert "github: Remove commit ID from cache keys"
Without commit ID, no new caches are created as the key is always the
same.

This reverts commit 60f4c86780.
2026-04-21 11:05:19 +02:00
Tobias Brunner 60f4c86780 github: Remove commit ID from cache keys
This reduces the cache storage for active branches and since caches for
different branches are separate and we abort previous builds of the same
branch, this is not necessary to ensure caches can successfully be stored.
2026-04-17 15:18:11 +02:00
Tobias Brunner 521c6e05c5 github: Update actions so they don't use deprecated Node.js 20 2026-04-07 18:57:40 +02:00
Tobias Brunner b36da850b5 github: Only run CI for latest commit in a branch, cancel old runs 2025-08-22 12:21:50 +02:00
Tobias Brunner 9eb5fcd6b6 github: Make sure at least one run with the same content is not skipped 2025-07-07 11:55:01 +02:00
Tobias Brunner 6f912345c1 github: Don't install the NDK as root
On the Ubuntu 24.04 image, this causes the /home/runner/.config/.android
directory to be owned by root, which lets the build fail later.
2025-01-10 16:53:37 +01:00
Tobias Brunner 9d1f325a77 github: Update GitHub-provided actions for Node.js update 2024-02-29 09:06:59 +01:00
Tobias Brunner 0d61efdf02 github: Use NDK version in build.gradle to build OpenSSL
Also fix the path to the sdkmanager (the old one was removed in the latest
images and the incorrect path caused a weird sudo error) and install
Java 17 as that's necessary for newer versions of the Gradle plugin.
2024-01-16 11:01:01 +01:00
Tobias Brunner 7361078d3d android: Update Gradle plugin 2023-02-09 18:04:07 +01:00
Tobias Brunner b1482f5204 github: Fix path to Android lint report
Has a -debug suffix now.
2022-12-02 16:09:41 +01:00
Tobias Brunner ef525ff980 github: Update GitHub-provided actions so they don't use deprecated Node.js 12 2022-12-02 16:09:41 +01:00
Tobias Brunner 0fea6a7f8e github: Adapt to switch to Ubuntu 22.04 for ubuntu-latest
Ubuntu 22.04 ships OpenSSL 3, which requires debug symbols so we can
whitelist leaks because we don't deinitialize the library.  And because
the shipped library is not built with `-fno-omit-frame-pointer`, the
build with AddressSanitizer can't use its fast stack unwind method.
However, the previous workaround for DTLS handling with glibc apparently
isn't necessary anymore.

In the custom OpenSSL build we drop no-stdio as that lets the configure
check for libldns fail because ERR_print_errors_fp@OPENSSL_3.0.0 is not
found.

For ccache, the default path to the cache directory has changed.

Also simplified the NM tests as there is only one build since
085daf4743 ("nm: Remove old libnm-glib compat stuff").
2022-12-02 16:09:04 +01:00
Tobias Brunner 71b0c031c2 android: Slightly increase NDK version
This version was installed in the base image until Aug 1st (the other we
installed was not actually used for a while).
2022-08-18 09:42:34 +02:00
Tobias Brunner b4a34ff5ea github: Remove github.ref from cache keys
According to the documentation for actions/cache, the lookup is already
scoped to the current branch (with fallback to any base branch including
the default branch).
2021-08-23 17:53:33 +02:00
Tobias Brunner c603704bb3 github: Always upload lint results from Android build 2021-05-05 18:09:44 +02:00
Tobias Brunner 8468b43891 github: Prevent duplicate CI runs
This cancels previous runs of the same branch and skips runs of the same
content (e.g. after merges or tags).
2020-12-15 10:42:43 +01:00
Tobias Brunner de401e0e89 github: Migrate from Travis CI to Github Actions
On travis-ci.com (travis-ci.org will be discontinued by the end of the
year) we are now charged for each minute.  We only got 10000 credits in
a trial plan, which we used up with a few builds.  Minutes also cost a
different amount of credits on different platforms: 10 on Linux,
but 50 on macOS (installing the dependencies on macOS alone took 12-15
minutes on Travis for some reason, takes about half on Github's runners).

No native Windows build yet as we have the same issue as on AppVeyor where
threading/streaming tests might get stuck.  And there is also only a
single Windows platform to test on.  Plus building/testing on Windows is
very slow (and getting ccache to work seems tricky).

The 'sw_collector' test case had to be disabled because we can't access
/usr/local/share on the Github build hosts (the process is just blocked
in readdir() and eventually times out).

Unfortunately, we can't test on different architectures anymore (in
particular ARM and the big-endian IBM Z/x390x).
2020-12-15 10:42:43 +01:00