Commit Graph

56 Commits

Author SHA1 Message Date
Patrick
8daa975ab3 CI: Disable Valgrind test for now
This test has consistently failed for months as it takes too long.

While it should be looked into its not helpful to show CI as always failing either.
2022-12-05 14:33:51 +00:00
Jan Macku
668fc7d514 ci(lint): add shell linter - Differential ShellCheck
It performs differential ShellCheck scans and report results directly in pull request.

documentation: https://github.com/redhat-plumbers-in-action/differential-shellcheck

Signed-off-by: Jan Macku <jamacku@redhat.com>
2022-11-22 10:58:52 -06:00
Simon McVittie
751d2b110b workflows: Enable CI for flatpak-1.14.x branch
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-10 13:13:22 +00:00
Simon McVittie
d98b745d43 workflows: Use Meson for the main build
This is somewhat faster than Autotools. We still use Autotools for
the alt, clang and valgrind builds, to make sure we cover both.

As a bonus, the use of undefined behaviour and address sanitizers here
actually works (unlike in Autotools, see #4844) so we're getting test
coverage with detection of common issues like use-after-free.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:12:14 +01:00
Simon McVittie
8a52187145 workflows: Compile with Ubuntu 18.04's GLib, but use 2.60 to run tests
This avoids a race condition in versions older than 2.60, while still
verifying that we can compile successfully with GLib 2.56.

Not having GLib 2.60 means we can't compile libmalcontent on Ubuntu 18.04,
so move the libmalcontent dependency to the main build job (on Ubuntu
22.04, which is new enough). This also means we don't have to compile
it from source every time.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-07 09:21:19 +02:00
Alex
a0c6848ccf Update check.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-09-06 13:08:06 +02:00
Simon McVittie
061102df30 workflows: Build with FUSE 3 on Ubuntu 22.04
This ensures we exercise both code paths.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-08-16 13:27:04 +02:00
Debarshi Ray
120322cb8f CI: Use CodeQL Action v2, not the deprecated v1
See:
https://github.blog/changelog/2022-04-27-code-scanning-deprecation-of-codeql-action-v1/
2022-06-28 18:26:45 -07:00
Phaedrus Leeds
26a8124478 Revert "CI: Temporarily build without libsystemd"
This reverts commit ea879dc38c.

Folks say the issue is fixed on launchpad:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1979579
2022-06-28 18:23:40 -07:00
Phaedrus Leeds
ea879dc38c CI: Temporarily build without libsystemd
To fix the CI until this is resolved:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1979579
2022-06-24 15:11:41 -07:00
Alexander Larsson
4247e61fbe CI: Build appstream dependency
We need appstream >= 0.15.3 to get this fix:
  https://github.com/ximion/appstream/issues/384

Without it the test-suite fails.
2022-06-16 13:49:45 +02:00
Alexander Larsson
300c00c910 Extend the CI build support, including testing the soup backend
This adds a separate, more modern CI build running on ubuntu 22.04
using curl, and leaves the old one around building against soup.

In addition, the modern one uses the system bwrap and dbus-proxy so
that we test these configurations too (and because the modern system
has good versions of these).

I also enabled running parallel make check again, hoping that
whatever made this hang is now fixed. We'll see.
2022-06-16 13:49:45 +02:00
Alexander Larsson
9695923f14 CI: Add libcurl-dev to CI install 2022-06-16 13:49:45 +02:00
Simon McVittie
0b83fdb71f workflows: Take libostree from PPA instead of building it from scratch
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-03 13:56:14 +02:00
Simon McVittie
0a43e98c97 workflows: Use team-maintained Flatpak PPA for ostree dependency
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-03 13:56:14 +02:00
Simon McVittie
968169a774 workflows: Run distcheck
This lets us verify that our ability to do releases hasn't regressed.

Run this as part of the "valgrind" build, since we want to enable
gtk-doc for distcheck, and it's this build that already enables gtk-doc.
We don't want to do this in the main Autotools build, since
that enables AddressSanitizer, which often works badly with the
"scanner" tools in gtk-doc and GObject-Introspection - although this
is currently mitigated by --enable-asan not actually working as
intended (see #4844).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-03 13:56:14 +02:00
Simon McVittie
1e09311621 workflows: Explicitly enable/disable GObject-Introspection
For the build that uses --enable-asan, explicitly disable introspection,
since the GObject-Introspection scanner works poorly with libtool
and AddressSanitizer (see #4844); the only reason this worked until
now is that --enable-asan doesn't currently do anything (again,
see #4844).

For the build that runs tests under valgrind, we already can't use
AddressSanitizer, making this a good place to explicitly enable
introspection, so that we have at least one build with it enabled.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-03 13:56:14 +02:00
Simon McVittie
cb73e098ef workflows: Move gtk-doc enablement from clang to valgrind build
We want to have gtk-doc enabled in the build that will run
`make distcheck`, but the clang/CodeQL build seems like a poor fit for
that, since it runs twice (for C and Python) and has extra
instrumentation. Move it to the build where we will run tests under
valgrind, which is already somewhat slow.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-03 13:56:14 +02:00
Simon McVittie
cbb61761e7 workflows: Remove a TODO
We explicitly enable gtk-doc for one of our builds (the one that uses
clang on Ubuntu 18.04). There's no real need to enable it for more than
one build.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-03 13:56:14 +02:00
Philip Withnall
9c059def69 app: Port to libappstream
libappstream-glib is mostly unmaintained, and libappstream is more
actively developed (and up to date with the AppStream specification).

Port from libappstream-glib to libappstream. Handily, a lot of the APIs
are exactly the same. The main changes are:
 * `AsApp` → `AsComponent`
 * `AsStore` → `AsMetadata`

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

(Mostly done by Philip, then Phaedrus finished this)
2022-02-17 08:29:20 -06:00
Alexander Larsson
914424cae8 CI: build on "main" branch, not "master" 2022-02-11 14:45:32 +01:00
Phaedrus Leeds
8ebb79a2c6 Move build instructions to HACKING.md
The README was getting long and unweildy
2021-11-16 13:33:13 -08:00
Phaedrus Leeds
179b45928c CI: Add 1.12 branch 2021-10-19 10:57:06 -07:00
Alexander Larsson
b4e838a0fd Drop old-glib ci test as ubuntu 16.04 is no longer available
As per https://github.com/actions/virtual-environments/issues/3287
the support for ubuntu-16.04 stopped working on september 20:th, so
our CI job stopped starting.
2021-09-23 13:25:02 +02:00
Alexander Larsson
b6d5e20857 CI: Add mono apt repo to fix build
For whatever reason parts of mono is installed, but the repo is not
configured so there is a version conflict on update:

libglib2.0-cil is already the newest version (2.12.45-0xamarin19+ubuntu1604b1).
libglib2.0-cil set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libglib2.0-cil-dev : Depends: libglib2.0-cil (= 2.12.10-6) but 2.12.45-0xamarin19+ubuntu1604b1 is to be installed
E: Unable to correct problems, you have held broken packages.
2021-06-01 10:54:53 +02:00
Simon McVittie
9a35bbc91c Merge tag '1.10.2', omitting changes in po/
Release 1.10.2

Git-EVTag-v0-SHA512: 849c1f828b993144d61353fc8f233d5f62ef773d4ded35e406797260b55a371cd7dc77cba1a4de912e05e9530f40adf9963789ac896ed3fe19ebce352031b85b
2021-04-26 12:21:28 +01:00
Simon McVittie
cb47d83b72 run: Add option to share /dev/shm between instances of an app-ID
Similar to /tmp, applications might well use /dev/shm as an IPC
rendezvous between instances, which wouldn't have worked without
--device=shm until now.

Because /dev/shm has specific characteristics (in particular it's
meant to always be a tmpfs), we offload the actual storage into a
subdirectory of the real /dev/shm. Because /dev/shm is a shared
directory between all uids, we have to be extra-careful how we
do this, which is why the test coverage here is important.

This is done on an opt-in basis because of its extra complexity.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-04-16 08:57:20 +02:00
Phaedrus Leeds
2ebc79b38e CI: Add 1.10 branch 2021-02-19 09:16:10 +01:00
Alexander Larsson
d5de05b608 CI: Use the new --enable-asan 2021-01-14 12:43:46 +01:00
Alexander Larsson
500af2d0f6 CI: Don't build ostree (ppa is new enough now) 2020-12-21 13:46:11 +01:00
Phaedrus Leeds
b663394a4d Remove LGTM.com infra
We're switching to a GitHub action with the same underlying technology;
see the previous commit.
2020-12-21 09:08:13 +01:00
Phaedrus Leeds
f47274d38b CI: Add action for CodeQL analysis
Use an Action instead of LGTM.com, as suggested here:
https://github.com/flatpak/flatpak/pull/3970#issuecomment-747658238

Re-use the clang build action for resource efficiency.
2020-12-21 09:08:13 +01:00
Philip Withnall
3a83cc3df4 check: Bump OSTree dependency to v2020.8
This avoids having to download `master` and then check out a specific
commit. v2020.8 includes the commit which we were previously building.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-12-15 09:57:41 +00:00
Philip Withnall
1b391485f6 check: Limit clone depth for clones done as part of CI builds
There’s no need to fetch the entire git history for OSTree or malcontent
for each CI job. Do shallow clones and don’t fetch tags. This reduces
the bandwidth requirement for clones in a CI job by roughly a factor of
8.5 (from 19.5MB to 2.3MB)

See https://tecnocode.co.uk/2020/07/09/easily-speed-up-ci-by-reducing-download-size/

This is slightly complicated by the fact that OSTree is currently being
built from a relatively-recent git commit. Once the flatpak CI can
depend on a tagged OSTree release (say, 2020.8),
```
--branch master --shallow-since 2020-10-27
```
can be changed to
```
--branch v2020.8 --depth 1
```

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-12-12 17:06:40 +00:00
Phaedrus Leeds
ea7b262049 CI: Ignore some paths that don't affect build
No need to waste resources running every test after the README
changes.
2020-10-29 16:07:56 +01:00
Alexander Larsson
97099bde37 CI: Build ostree from git (needed for new summary format) 2020-10-29 15:30:35 +01:00
Alexander Larsson
3d65276f79 Add --enable-internal-checks option and use in CI
This enables the internal checks in the generated variant parser.
2020-10-29 15:30:35 +01:00
Alexander Larsson
946cf126b7 CI: Add a valgrind check
This takes a long time, but doesn't have to be mandatory, also we
only run it if the regular make check passes.

Removes some old no-longer needed ci config workaround.

The new test uses ubuntu-20.04 so we get wider distro testing.
2020-08-24 08:55:14 +02:00
Alexander Larsson
333c746f06 Revert "CI: Run make check in parallel (-j NCPU)"
This reverts commit 4401862ac5.
2020-08-24 08:53:12 +02:00
Alexander Larsson
4401862ac5 CI: Run make check in parallel (-j NCPU) 2020-08-21 17:15:38 +02:00
Alexander Larsson
b3dff7aa97 Add 1.8 branch to CI 2020-06-30 11:21:38 +02:00
Alexander Larsson
31612d7568 CI: Add libzstd-dev dependency 2020-06-05 09:35:30 +02:00
Alexander Larsson
392fb03d9c CI: Run on flatpak-1.6.x branch 2020-03-30 13:36:51 +02:00
Alexander Larsson
4b32592677 Enable introspection on old glib test too 2020-03-27 09:39:02 +01:00
Alexander Larsson
4c21621935 Enable gtk-doc in CI test
This doesn't seems to work with asan, so do it in the clang build
2020-03-27 09:39:02 +01:00
Simon McVittie
0d58999756 CI: Do one build out-of-tree
With the gcc build out-of-tree and the clang build in-tree, we're
testing both ways.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-02-27 12:49:12 +00:00
Alexander Larsson
966c6e2a25 CI: Add python3-pyparsing deps 2020-02-17 16:10:50 +01:00
Alexander Larsson
5cfccaad39 CI: Test build with old glib (xenial) 2019-12-23 11:30:45 +01:00
Alexander Larsson
69fae3b380 Work around github repo issue
See:
https://github.community/t5/GitHub-Actions/ubuntu-latest-Apt-repository-list-issues/m-p/41163/highlight/true#M4513
2019-12-13 16:28:37 +01:00
Alexander Larsson
62529fa0ce ci: Drop --trace from make check
Its really hard to read the output with all this spew
2019-10-09 14:25:44 +02:00