Commit Graph

44 Commits

Author SHA1 Message Date
David Sterba 3461f5aa95 btrfs-progs: ci: add run-name for codespell workflow
Print the workflow name on the Actions page instead of the last commit
subject.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-30 19:56:08 +02:00
Yaroslav Halchenko 17a37d3983 btrfs-progs: ci: add action to codespell devel on push and PRs
Run spellchecking on devel branch on push or on a pull-request.

Author: Yaroslav Halchenko <debian@onerussian.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-30 19:56:08 +02:00
Yaroslav Halchenko c4190ca330 btrfs-progs: ci: do apt-get update before trying to install
To ensure that package indexes are up to date.

That should help to avoid recent failed CI runs, which failed to install
certain packages as local cache is out-of-date and remote mirrors no
longer provide that specific (and out-of-date) version of package:

 E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_255.4-1ubuntu8.1_amd64.deb  404  Not Found [IP: 52.147.219.192 80]

Signed-off-by: Yaroslav Halchenko <debian@onerussian.com>
[ Minor modification on the commit message. ]
Signed-off-by: Qu Wenruo <wqu@suse.com>
[ Move cache update to a separate command. ]
Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-30 19:56:08 +02:00
David Sterba fb9c0feec8 btrfs-progs: ci: build html manual page previews if source changed
Similar to the manual page on terminal preview, also do the html output
that will be on the RTD page. Due to the way how it's displayed in the
CI action summary the CSS is missing and there are some visual
artifacts, e.g. in the option lists or special characters.

Issue: #824
Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-30 19:53:32 +02:00
David Sterba 2eadd15e6b btrfs-progs: ci: build manual page previews if source changed
Extend CI workflow of devel branch to generate manual page preview as it
would be rendered in a terminal. The output is in the workflow summary
page, for each file changed (if any).

Issue: #824
Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-30 19:53:32 +02:00
David Sterba 84841dc8b4 btrfs-progs: ci: promote fast CI image build to be the default one
Promote the fast workflow so it's in the place of ci-build-test.yml,
make it run for most branches.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-30 19:53:32 +02:00
David Sterba 7d3dc34beb btrfs-progs: ci: delete slow image build test workflow
The workflow defined in ci-build-test.yml builds a fresh docker image,
this could update packages that are not yet in my docker hub source image.
The purpose of this workflow is to test namely backward compatibility
(LTS distros) so there are no expected differences regarding package
versions.

There's another workflow with the same goal but based on different
docker images, that are updated on a few-weekly basis (updaed by
ci/images-* scripts). This is much faster and can be also enabled for
pull requests.

Remove the original workflow as it's not useful anymore.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-30 19:53:32 +02:00
David Sterba 84903a9bb0 btrfs-progs: ci: fix lcov warnings on unexecuted blocks
There's a report on the CI after base ubuntu image update:

geninfo: WARNING:
/home/runner/work/btrfs-progs/btrfs-progs/common/device-scan.c:429:
unexecuted block on non-branch line with non-zero hit count.  Use
"geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
	(use "geninfo --ignore-errors gcov,gcov ..." to suppress this warning)

Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-24 19:20:11 +02:00
David Sterba 989fcbe942 btrfs-progs: ci: enable RockyLinux 9 build tests
Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-24 19:18:14 +02:00
David Sterba 859d78e5a7 btrfs-progs: ci: move Leap image to 15.6
The support of Leap 15.4 has ended, not much point to test build there
so move it to 15.6 (upper bound). The lower bound is still 15.3 to catch
potential backward compatibility problems.

The hub image exists (https://hub.docker.com/r/kdave/ci-opensuse-leap-15.6-x86_64).

Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-24 19:18:03 +02:00
David Sterba f642ec86e6 btrfs-progs: ci: switch workflow runner image to ubuntu-24.04
There's an update to CI hosted runners,
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md

- kernel 6.8
- e2fsprogs 1.47
- gcc 13.2
- clang 18.1.3

Switch the workflow files to use it as ubuntu-latest still points to the
22.04 version. The updated versions let us avoid workarounds due to old
version if e2fsprogs.

The musl 32bit build seems to fail so pin the version to the last one
where it's known to work.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-24 19:18:00 +02:00
David Sterba e4d372eb88 btrfs-progs: ci: enable sanitizer checks for master branch
The CI passes on the 6.9 pre-release branch, we can enable it for all
future releases.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-07 01:14:08 +02:00
David Sterba e5b6c383c2 btrfs-progs: ci: disable library tests for D=asan build
Due to unknown cause the libbtrfsutil and libbtrfs are not built with
sanitizer libraries and the ASAN test does not succeed. This needs to be
analyzed why, for now disable it so CI can continue.

$ make D=asan test-libbtrfsutil
    [PY]     libbtrfsutil
==235341==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-07 01:14:04 +02:00
David Sterba 8d9bc85215 btrfs-progs: ci: add workflow for UBSAN and ASAN
Run tests with enabled sanitizers. There are still known problems with
leaks that will make the whole fail. This needs to be fixed before the
workflow can be enabled for devel or master.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-05-30 19:03:48 +02:00
David Sterba cfbbd48150 btrfs-progs: ci: verify experimental build
Pick a few platforms to verify build of configure --experimental

Signed-off-by: David Sterba <dsterba@suse.com>
2024-04-18 19:16:15 +02:00
David Sterba 328e3e632c btrfs-progs: ci: save test logs to artifacts on failure
Wherever it makes sense, save the logs as artifacts when something
fails (most likely the main step with real tests).

Signed-off-by: David Sterba <dsterba@suse.com>
2024-01-31 18:35:31 +01:00
David Sterba 5b344c3e1a btrfs-progs: ci: update checkout action to v4
Signed-off-by: David Sterba <dsterba@suse.com>
2024-01-30 19:32:58 +01:00
David Sterba f2f30d15b6 btrfs-progs: ci: add faster CI distro image build tests
Now docker hub images can be pulled for build tests (sources are
downloaded) and this is faster than rebuilding them each time so this
can be enabled for all ci/* and devel branches.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-01-26 06:05:46 +01:00
David Sterba d6a31c522a btrfs-progs: ci: extend pattern for branches picked by devel workflow
Add a possibility to test branches independent of devel, the pattern is
prefix "ci/" or "CI/".

[ci skip]

Signed-off-by: David Sterba <dsterba@suse.com>
2024-01-22 17:45:35 +01:00
David Sterba 2608354dc3 btrfs-progs: ci: temporarily disable Tumbleweed crypto backend test
The CI test uses openssl 3.2 but it still hasn't made it to Tumbleweed,
it's still waiting in the queue. It'll be enabled again.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-01-17 20:20:57 +01:00
David Sterba 2b16f7d4ad btrfs-progs: tests: enable convet tests again in devel and coverage
The convert tests weren't enabled in the CI due to some problems that
seem to be fixed now. Add it to the default and coverage workflows, the
run time is about 2 minutes which is acceptable for coverage and for
devel it's running in parallel.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-01-17 03:28:14 +01:00
David Sterba f9ebee6838 btrfs-progs: ci: install RTD sphinx theme for devel workflow
With the recent updates to documentation build the theme must be now
installed as a package. Disable building documentation in all workflows
that do functional tests.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-12-06 16:03:37 +01:00
David Sterba bc70e12877 btrfs-progs: ci: add clang to devel build tests
Add clang as compiler for the basic build checks in the CI.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-12-04 18:55:47 +01:00
David Sterba b512558c02 btrfs-progs: build: add target for all internal APIs
There are several APIs that have tests, add a single build target for
convenience and enable that in the CI.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-12-01 01:39:27 +01:00
David Sterba 32880fa518 btrfs-progs: crypto: add openssl as crypto provider
https://www.openssl.org/ Is a well known cryptography library and since
freshly released version 3.2 it also supports variable digest size of
blake2b, so we can now add it among the crypto providers.

Configure with --with-crypto=openssl.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-11-30 22:04:45 +01:00
David Sterba 5221aedc00 btrfs-progs: crypto: add Botan as crypto provider
https://botan.randombit.net/ Botan is a cryptography library with C
bindings and provides what we need (sha256 and blake2b), among many
others. Add it to the list of crypto backends if somebody wants to use
it.

Currently the version 2.19 is the latest one. Botan3 3.2.0 exists but
does not seem to be widely available in distros yet.

Configure with --with-crypto=botan.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-11-30 22:04:45 +01:00
David Sterba d185801b45 btrfs-progs: ci: split functional tests for devel workflow
We can run more tests in parallel, the overall CI run time will be
shorter (from 12m to 5m) at the cost of building the same sources.
Also build documentation only once.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-11-03 18:04:37 +01:00
David Sterba eed542859f btrfs-progs: ci: split devel tests to groups
The tests are run in one job, we can make it parallel by grouping
related tests together.

- musl test, using docker, does not have to wait for build
- simple tests, library, ioctl, api, ...
- the rest are functional tests

Signed-off-by: David Sterba <dsterba@suse.com>
2023-11-03 18:04:37 +01:00
David Sterba 78c227e7d2 btrfs-progs: ci: run CI image tests in parallel
We can speed up the CI tests by running them as separate build jobs,
they only need to checkout the sources.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-10-02 18:05:38 +02:00
David Sterba d0bf814100 btrfs-progs: ci: build static binaries only for latest release
The release-test branch is used for pre-release checks so don't pollute
the workflows list with unverified builds. The static build checks will
be done within the other workflows but no binaries need to be published.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-09-13 19:43:26 +02:00
David Sterba 4c24d928d4 btrfs-progs: ci: build static binaries on oldest supported x86-64 architecture
As mentioned on https://wiki.tnonline.net/w/Btrfs/Statically_built_btrfs-progs
the static binaries could be built on with flags so they're available on
most x86-64 models (intel, AMD).

Signed-off-by: David Sterba <dsterba@suse.com>
2023-09-01 12:11:59 +02:00
David Sterba 65306da75c btrfs-progs: ci: add workflow for pull-request
Reduced version of devel checks, unrestricted.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-28 17:24:58 +02:00
David Sterba fedd4cc596 btrfs-progs: ci: upload coverage workflow results to codecov.io
Needed to work:

- install github app Codecov, accept permissions
- copy token from codecov.io to repository secrets
- allow actions permissions to run either verified marketplace creators
  or list codecov/codecov-action@*
- set up repository as active on codecov.io, watch results eg.
  https://app.codecov.io/gh/kdave/btrfs-progs/tree/coverage-test/

Signed-off-by: David Sterba <dsterba@suse.com>
2023-07-26 15:00:48 +02:00
David Sterba 57d9311b4d btrfs-progs: ci: add workflow for code coverage
Enable gcov build and run all tests, collect lcov results as artifacts.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-07-26 15:00:48 +02:00
David Sterba 5636dce4f6 btrfs-progs: ci: enable fuzz tests
Signed-off-by: David Sterba <dsterba@suse.com>
2023-07-26 15:00:48 +02:00
David Sterba 7446f2ce71 btrfs-progs: ci: build check all crypto backends
On relese tests also check all the backends, use Tumbleweed as it's
known to work there and provide all supported library versions.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-07-26 15:00:48 +02:00
David Sterba 3139c26079 btrfs-progs: ci: run more workflows after pushing master branch
Run release tests after pushing master branch to verify that everything
is ok, also trigger the static build so there are binaries built with
the new version tag.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-06-15 13:41:52 +02:00
David Sterba adfc8a943a btrfs-progs: ci: enable more tests for devel workflow
More complete test coverage:

- json an string table formatters
- fuzz tests (no mount)
- libbtrfs build test
- libbtrfsutil python test
- ioctl build test
- hash tests

Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 19:53:44 +02:00
David Sterba 475cc44e0b btrfs-progs: ci: enable 32bit build test for pre-release
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-24 19:58:50 +02:00
David Sterba 1868bc796b btrfs-progs: ci: add attr to devel workflow
The package attr provides setfattr and getfattr that's used by some
tests, otherwise the CI runs fail.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-24 19:54:07 +02:00
David Sterba dac797348a btrfs-progs: ci: calculate sha256 checksums for static binaries
Calculate checksums for static binaries that are published as release
artifacts. Do that when they're built in the workflow so the checksum
appears in the build log and also provide the artifacts of the checksums
so they can be published along the releases.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-02 14:01:39 +02:00
David Sterba 16126bcff6 btrfs-progs: ci: build static versions as artifacts
Build static binaries (published as artifacts):

- btrfs.static - the main tool
- btrfs.box.static - all-in-one tool (functionality selected by file name)

There are a few problems:

- unstable URL, i.e. not one location to get the binaries from, multiple
  steps need on web or by using API

- downloaded files are in .zip (compression cannot be disabled with
  upload-artifact@v3)

- permissions of the file inside .zip are lost, manual chmod needed
  after extraction

- artifacts can be downloaded only for logged users

Issue: #593
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-13 16:33:19 +02:00
David Sterba ce5061d2e5 btrfs-progs: ci: add workflow for CI image build tests
For a release test check that all compatibility build targets work. This
may take long as it's pulling lots of data (no caching yet) so it's not
run on devel.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-12 18:47:00 +02:00
David Sterba eec7613e61 btrfs-progs: ci: build workflow Github actions for devel
Add basic build tests and runtime tests devel, triggered by branch push.
For workflow testing there's a stub triggered by push of devel-ci.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-22 15:21:37 +01:00