Commit graph

125 commits

Author SHA1 Message Date
Mrityunjay Raj
48ca497996 ruff: bump to v0.15.0, migrate config to tool.ruff.lint, fixes #9305 2026-02-13 02:36:43 +05:30
Thomas Waldmann
7ef2c258bb
CI: enable Codecov Test Analytics
Enable JUnit XML generation for `native_tests` and `windows_tests` to allow Codecov to process test analytics.

Upload the generated `test-results.xml` using `codecov/codecov-action`.

The upload step uses `if: !cancelled()` to ensure results are uploaded even if tests fail (to analyze failures), but skipped if the workflow is explicitly cancelled.

Originally brought up in PR #8752 by @katia-sentry, but missed the !cancelled() check.

Also: upgrade to codecov-action@v5.
2026-02-10 17:08:54 +01:00
Thomas Waldmann
d870d9517f
CI: cache needs to consider runner.arch
Seen this on the macOS arm64 runner:

ImportError: dlopen(/Users/runner/work/borg/borg/.tox/py311-none/lib/python3.11/site-packages/_argon2_cffi_bindings/_ffi.abi3.so, 0x0002): tried: '/Users/runner/work/borg/borg/.tox/py311-none/lib/python3.11/site-packages/_argon2_cffi_bindings/_ffi.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/borg/borg/.tox/py311-none/lib/python3.11/site-packages/_argon2_cffi_bindings/_ffi.abi3.so' (no such file), '/Users/runner/work/borg/borg/.tox/py311-none/lib/python3.11/site-packages/_argon2_cffi_bindings/_ffi.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
2026-02-09 12:14:08 +01:00
Thomas Waldmann
a2b47c7439
CI: cache tox environments 2026-01-31 08:06:11 +01:00
Thomas Waldmann
e78c299e71
CI: remove redundant tox runs
Some tox envs are run when opening a PR, so we
do not need to run them again at merge time.
2026-01-31 07:31:09 +01:00
Thomas Waldmann
33a63fa924
CI: parallelize better, avoid unnecessary steps 2026-01-31 07:21:48 +01:00
Thomas Waldmann
85b2ca284e
CI: enable windows testing 2026-01-27 22:35:23 +01:00
Thomas Waldmann
ee3373c5e3
build borg.exe in dist/binary 2026-01-27 22:09:20 +01:00
Thomas Waldmann
d602cf23a5
CI: faster with borg-dir/borg.exe, fixes #9236
The single-file borg.exe needs unpacking each time it is invoked.
borg-dir/borg.exe is alread unpacked.

Also, macOS is slow when a "new" binary is first invoked, so
this should help there even more.
2025-12-26 20:22:52 +01:00
Thomas Waldmann
98aa125386
add requirements file for pyinstaller
make it easy to change pyinstaller version.
2025-12-23 18:52:22 +01:00
Thomas Waldmann
7ccbb33f84
rename tox envs after fuse lib name
Also: on freebsd, run tox env py311-mfusepy
2025-12-20 19:47:36 +01:00
Thomas Waldmann
d27cb58faf
CI: use macos-15-intel to build the x86_64 binary 2025-12-16 20:15:52 +01:00
Thomas Waldmann
ac73be4b09
CI: use macOS 15 for binary builds
Github EOLed all other macOS Intel action runners.

As Apple Silicon users tend to have more
recent OSes, we bump that to macOS 15 also.
2025-12-15 17:40:51 +01:00
Thomas Waldmann
ddcf61b5db
CI: increase timeout 2025-12-15 17:35:12 +01:00
Thomas Waldmann
fefb4dfd8e
freebsd: fix upload name for artifact zip 2025-12-15 17:33:19 +01:00
Thomas Waldmann
c8f5d6219d
CI: FUSE related fixes/improvements (master)
fixes #9182

- install OS fuse support packages as indicated by the tox env.
  on the macOS runners, we do not have any fuse support.
  on the linux runners, we may have fuse2 or fuse3.
  on FreeBSD, we have fuse2.
- install fuse python library for binary build
- first build/upload binaries, then run tests (including binary tests).
  early uploading makes inspection of a malfunctioning binary possible.
- for now, use llfuse, as there is an issue with pyinstaller and pyfuse3.

Also:
- remove || true - this just hides errors, not what we want.
2025-12-15 17:29:11 +01:00
TW
425fa1c77a
fix pynacl/libsodium build on freebsd (#9214)
Some checks failed
Lint / lint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.7) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled
2025-12-06 15:30:26 +01:00
Thomas Waldmann
9a0122995c
CI: netbsd: enable xattrs on TMPDIR 2025-11-21 12:41:59 +01:00
Thomas Waldmann
9f0b3c4ff3
CI: remove "|| true" 2025-11-09 15:12:23 +01:00
Thomas Waldmann
b0ddb15733
CI: rather use tox as test runner
so that pytest options are centrally managed in tox configuration.

let tox build venv and install requirements.

tox does this anyway, so we save some time if we
do not need the venv for other purposes also
(like e.g. building binaries).

Also:
- default XDISTN to "auto". XDISTN is still used by Vagrantfile.
- some other optimisations, like less package manager calls.
- use XDISTN=1 for haiku
- fix freebsd binary build condition
2025-11-08 00:07:19 +01:00
Thomas Waldmann
a3e6f63e2a
CI: integrate all OSes into ci.yml 2025-11-07 18:59:15 +01:00
Thomas Waldmann
63e582be6a
CI: add Haiku workflow in haiku.yml 2025-11-07 12:59:04 +01:00
Thomas Waldmann
6dee31c968
CI: add NetBSD workflow in netbsd.yml 2025-11-06 22:35:09 +01:00
Thomas Waldmann
13d6e774a0
CI: add OpenBSD workflow in openbsd.yml 2025-11-06 22:35:08 +01:00
Thomas Waldmann
5855ca4135
CI: add FreeBSD workflow in freebsd.yml 2025-11-06 22:34:59 +01:00
Thomas Waldmann
add19da678
CI: do dynamic code analysis, #6819
Use:
- AddressSanitizer ASan
- UndefinedBehaviorSanitizer UBSan
2025-11-03 20:42:13 +01:00
Thomas Waldmann
4be4609445
CI: run also for tag pushes
Simplifies tag-based binary building and attestation.
2025-11-02 18:45:35 +01:00
Thomas Waldmann
a5c8aed7cf
CI: add GitHub artifact attestations for release binaries (fixes #9134)
- grant id-token and attestations permissions to posix_tests job
- add actions/attest-build-provenance@v1 step for built artifacts

This publishes SLSA-style provenance for our tag builds (only when binaries
are produced) so users can verify the origin of downloaded borg binaries.
2025-11-02 17:17:23 +01:00
Thomas Waldmann
c4a9582fdf
build binaries on github
also:

- speed up CI for PRs
- update README for binaries
2025-10-16 00:37:46 +02:00
Thomas Waldmann
f401ca00f9
backport action: remove debugging step
Some checks failed
Lint / lint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
CI / linux (ubuntu-22.04, 3.10, mypy) (push) Has been cancelled
CI / linux (ubuntu-22.04, 3.10, py310-fuse2) (push) Has been cancelled
CI / linux (ubuntu-22.04, 3.11, docs) (push) Has been cancelled
CI / linux (ubuntu-22.04, 3.11, py311-fuse3) (push) Has been cancelled
CI / linux (ubuntu-24.04, 3.12, py312-fuse3) (push) Has been cancelled
CI / linux (ubuntu-24.04, 3.13, py313-fuse3) (push) Has been cancelled
CI / linux (ubuntu-24.04, 3.14, py314-fuse3) (push) Has been cancelled
CI / macOS (macos-14, 3.11, py311-none) (push) Has been cancelled
CI / windows (push) Has been cancelled
2025-10-12 16:24:36 +02:00
Thomas Waldmann
ee4083eaa7
backport action: fix label_pattern 2025-10-12 16:19:19 +02:00
Thomas Waldmann
126dc4974a
debug backport action 2025-10-12 16:06:25 +02:00
Thomas Waldmann
947007c567
test on Python 3.14 (w/o -dev) 2025-10-09 12:43:16 +02:00
Thomas Waldmann
d27409784e
github actions: use korthout/backport-action 2025-09-23 18:53:08 +02:00
Thomas Waldmann
2c7bec0149
manual corrections/reverts 2025-09-23 14:56:35 +02:00
Thomas Waldmann
f9ec04ddf6
github workflows: fix typos and grammar 2025-09-23 14:53:51 +02:00
Thomas Waldmann
b5d0261222
CI: add local servers for s3 and sftp testing 2025-09-11 14:40:24 +02:00
Thomas Waldmann
74689d6ea9
support python 3.14 2025-06-12 12:06:45 +02:00
Thomas Waldmann
338f9b1db9
add bandit, a security-oriented static analysis tool 2025-06-01 18:00:35 +02:00
Thomas Waldmann
5940bad06e
CI: disable windows for now
The file:// repo URLs are still broken on windows.
2025-05-23 06:47:59 +02:00
Thomas Waldmann
18844717d2
CI: upload coverage for windows tests 2025-05-21 22:40:55 +02:00
Thomas Waldmann
5c681b921c
completions: test validity of shell completion files
CI: install zsh and fish so we can test shell completions
2025-05-19 21:03:14 +02:00
Thomas Waldmann
3df7702519
tests: fix and enable windows CI, fixes #8728
thanks a lot to @sothix for helping with this!

removed pytest-forked, is not found anymore:
error: target not found: mingw-w64-ucrt-x86_64-python-pytest-forked

use a virtual env to avoid mixup of user with system packages.

remove old workaround for setuptools (SETUPTOOLS_USE_DISTUTILS: stdlib).

fix pip install

use --system-site-packages as a workaround for broken pip install python-cffi.

do not upgrade pip setuptools build wheel

use python -m pytest to use the one from the venv
2025-05-19 11:00:11 +02:00
Ronny Pfannschmidt
4d2197b536 update codeql to v3 due to deprecation 2025-05-09 23:11:23 +02:00
Thomas Waldmann
a90473600d
remove support for / testing on Python 3.9
Python 3.9 will run out of upstream support 2025-10 anyway.
So we can also drop it right now and have faster CI testing.
2025-04-24 20:55:02 +02:00
Thomas Waldmann
41f150ff7f
macos: fix broken brew pkg-config upgrade
it looks like in brew they removed pkg-config formula and added
an alias to the pkgconf formula (which also provides a pkg-config
cli command).

the transition was not seamless:

on github actions CI:

Installing pkg-config
==> Downloading https://ghcr.io/v2/homebrew/core/pkgconf/manifests/2.3.0_1
==> Fetching pkgconf
==> Downloading https://ghcr.io/v2/homebrew/core/pkgconf/blobs/sha256:5f83615f295e78e593c767d84f3eddf61bfb0b849a1e6a5ea343506b30b2c620
==> Pouring pkgconf--2.3.0_1.arm64_sonoma.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /opt/homebrew
Could not symlink bin/pkg-config
Target /opt/homebrew/bin/pkg-config
is a symlink belonging to pkg-config@0.29.2. You can unlink it:
  brew unlink pkg-config@0.29.2

To force the link and overwrite all conflicting files:
  brew link --overwrite pkgconf

To list all files that would be deleted:
  brew link --overwrite pkgconf --dry-run

Possible conflicting files are:
/opt/homebrew/bin/pkg-config -> /opt/homebrew/Cellar/pkg-config@0.29.2/0.29.2_3/bin/pkg-config
/opt/homebrew/share/aclocal/pkg.m4 -> /opt/homebrew/Cellar/pkg-config@0.29.2/0.29.2_3/share/aclocal/pkg.m4
/opt/homebrew/share/man/man1/pkg-config.1 -> /opt/homebrew/Cellar/pkg-config@0.29.2/0.29.2_3/share/man/man1/pkg-config.1
==> Summary
🍺  /opt/homebrew/Cellar/pkgconf/2.3.0_1: 27 files, 474KB
Installing pkg-config has failed!
2024-11-24 18:11:39 +01:00
Thomas Waldmann
e1347ef9ab
CI: use "3.13" (w/o "-dev") 2024-10-23 23:21:18 +02:00
Thomas Waldmann
7be254efe5
github CI: temporarily disabled windows CI, #8474 2024-10-15 20:36:17 +02:00
Thomas Waldmann
4c1a0b1ca0
msys2: disable SETUPTOOLS_USE_DISTUTILS=stdlib hack
The msys2 changelog says it is only needed for setuptools < 70.2.0:

https://www.msys2.org/docs/python/#known-issues

https://setuptools.pypa.io/en/stable/history.html#v70-2-0
2024-09-19 12:36:18 +02:00
Thomas Waldmann
de249f611e
CI: enable windows build 2024-09-15 22:56:06 +02:00