From 5907c3ddd85d25a80f90125cb9b2b243d693f582 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 5 Nov 2025 17:56:15 +0100 Subject: [PATCH 1/9] CI: add FreeBSD 14 workflow in freebsd14.yml --- .github/workflows/freebsd14.yml | 125 ++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 .github/workflows/freebsd14.yml diff --git a/.github/workflows/freebsd14.yml b/.github/workflows/freebsd14.yml new file mode 100644 index 0000000000..7180622da4 --- /dev/null +++ b/.github/workflows/freebsd14.yml @@ -0,0 +1,125 @@ +name: FreeBSD 14 CI + +on: + push: + branches: [ master ] + tags: + - '2.*' + pull_request: + branches: [ master ] + paths: + - '**.py' + - '**.pyx' + - '**.c' + - '**.h' + - '**.yml' + - '**.toml' + - '**.cfg' + - '**.ini' + - 'requirements.d/*' + - '!docs/**' + +jobs: + freebsd-14: + name: FreeBSD 14 tests and build + permissions: + contents: read + id-token: write + attestations: write + runs-on: ubuntu-24.04 + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Run on FreeBSD 14 + id: freebsd + uses: cross-platform-actions/action@v0.26.0 + with: + operating_system: freebsd + version: '14.0' + # Use bash for consistent scripting + shell: bash + # Increase resources a bit for building Cython extensions + cpu_count: 3 + memory: 8G + run: | + set -euxo pipefail + # Update package catalog and install dependencies + sudo pkg update -f + sudo pkg install -y \ + git \ + bash \ + gmake \ + pkgconf \ + openssl \ + lz4 \ + zstd \ + xxhash \ + py311-python \ + py311-pip \ + py311-setuptools \ + py311-virtualenv \ + py311-cython + + # Ensure python3 and pip point to the chosen version + sudo ln -sf /usr/local/bin/python3.11 /usr/local/bin/python3 || true + sudo ln -sf /usr/local/bin/python3.11 /usr/local/bin/python || true + sudo ln -sf /usr/local/bin/pip3.11 /usr/local/bin/pip3 || true + sudo ln -sf /usr/local/bin/pip3.11 /usr/local/bin/pip || true + + # Create and activate venv + python -m venv .venv + . .venv/bin/activate + + # Build prerequisites + python -V + pip -V + python -m pip install --upgrade pip wheel + # Install dev requirements and project in editable mode + python -m pip install -r requirements.d/development.txt + python -m pip install -e . + + # Run tests (skip benchmarks which are slow on CI) + python -m pytest -n auto --benchmark-skip + + # Only build PyInstaller binaries for tags + if [[ "${GITHUB_REF:-}" == refs/tags/* ]]; then + python -m pip install 'pyinstaller==6.14.2' + mkdir -p dist/binary + pyinstaller --clean --distpath=dist/binary scripts/borg.exe.spec + # Smoke-test the built binaries and package dir-mode as tarball + pushd dist/binary + echo "single-file binary" + chmod +x borg.exe + ./borg.exe -V + echo "single-directory binary" + chmod +x borg-dir/borg.exe + ./borg-dir/borg.exe -V + tar czf borg.tgz borg-dir + popd + # Prepare artifacts + mkdir -p artifacts + if [ -f dist/binary/borg.exe ]; then + cp -v dist/binary/borg.exe artifacts/borg-freebsd-14-x86_64-gh + fi + if [ -f dist/binary/borg.tgz ]; then + cp -v dist/binary/borg.tgz artifacts/borg-freebsd-14-x86_64-gh.tgz + fi + fi + + - name: Upload FreeBSD artifacts + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v4 + with: + name: freebsd14-dist + path: artifacts/* + if-no-files-found: ignore + + - name: Attest provenance for FreeBSD artifacts + if: startsWith(github.ref, 'refs/tags/') + uses: actions/attest-build-provenance@v3 + with: + subject-path: 'artifacts/*' From b0a3c1e05822dcfa8c6c558f5d53262dae1bf0cc Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 5 Nov 2025 18:21:40 +0100 Subject: [PATCH 2/9] use 14.3 for first steps --- .github/workflows/freebsd14.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd14.yml b/.github/workflows/freebsd14.yml index 7180622da4..917baae654 100644 --- a/.github/workflows/freebsd14.yml +++ b/.github/workflows/freebsd14.yml @@ -39,7 +39,7 @@ jobs: uses: cross-platform-actions/action@v0.26.0 with: operating_system: freebsd - version: '14.0' + version: '14.3' # Use bash for consistent scripting shell: bash # Increase resources a bit for building Cython extensions From c65d77d155887d5ced72cd03836bcc420d3f1be0 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 5 Nov 2025 18:29:19 +0100 Subject: [PATCH 3/9] try 14.2 --- .github/workflows/freebsd14.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd14.yml b/.github/workflows/freebsd14.yml index 917baae654..9efe8a599b 100644 --- a/.github/workflows/freebsd14.yml +++ b/.github/workflows/freebsd14.yml @@ -39,7 +39,7 @@ jobs: uses: cross-platform-actions/action@v0.26.0 with: operating_system: freebsd - version: '14.3' + version: '14.2' # Use bash for consistent scripting shell: bash # Increase resources a bit for building Cython extensions From eab7a66afb30dd4821cc39bbbb75f9c89d8d1711 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 5 Nov 2025 18:34:00 +0100 Subject: [PATCH 4/9] ignore pkg/OS version mismatches --- .github/workflows/freebsd14.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/freebsd14.yml b/.github/workflows/freebsd14.yml index 9efe8a599b..2804c479c2 100644 --- a/.github/workflows/freebsd14.yml +++ b/.github/workflows/freebsd14.yml @@ -48,8 +48,9 @@ jobs: run: | set -euxo pipefail # Update package catalog and install dependencies - sudo pkg update -f - sudo pkg install -y \ + export IGNORE_OSVERSION=yes + sudo -E pkg update -f + sudo -E pkg install -y \ git \ bash \ gmake \ From b451ae6f9a2e602ef89dabbbac26adebedb28070 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 5 Nov 2025 18:41:41 +0100 Subject: [PATCH 5/9] fix pkg names --- .github/workflows/freebsd14.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/freebsd14.yml b/.github/workflows/freebsd14.yml index 2804c479c2..e193e5db99 100644 --- a/.github/workflows/freebsd14.yml +++ b/.github/workflows/freebsd14.yml @@ -50,20 +50,13 @@ jobs: # Update package catalog and install dependencies export IGNORE_OSVERSION=yes sudo -E pkg update -f - sudo -E pkg install -y \ - git \ - bash \ - gmake \ - pkgconf \ - openssl \ - lz4 \ - zstd \ - xxhash \ - py311-python \ - py311-pip \ - py311-setuptools \ - py311-virtualenv \ - py311-cython + sudo -E pkg install -y xxhash liblz4 zstd pkgconf + sudo -E pkg install -y fusefs-libs || true + sudo -E pkg install -y fusefs-libs3 || true + sudo -E pkg install -y rust + sudo -E pkg install -y git bash # fakeroot causes lots of troubles on freebsd + sudo -E pkg install -y python310 py310-sqlite3 + sudo -E pkg install -y python311 py311-sqlite3 py311-pip py311-virtualenv # Ensure python3 and pip point to the chosen version sudo ln -sf /usr/local/bin/python3.11 /usr/local/bin/python3 || true From bc0ab1db5acfdf4e5bc2c3e9d2fe44ca0a125f64 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 6 Nov 2025 18:03:17 +0100 Subject: [PATCH 6/9] freebsd14: mark workflow as continue-on-error --- .github/workflows/freebsd14.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/freebsd14.yml b/.github/workflows/freebsd14.yml index e193e5db99..9ec5c7b5bb 100644 --- a/.github/workflows/freebsd14.yml +++ b/.github/workflows/freebsd14.yml @@ -27,6 +27,7 @@ jobs: id-token: write attestations: write runs-on: ubuntu-24.04 + continue-on-error: true steps: - name: Check out repository uses: actions/checkout@v4 From 4d6115efd7046624ffce5734ffa67b8ab0f5c8de Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 6 Nov 2025 19:02:34 +0100 Subject: [PATCH 7/9] freebsd: rename to freebsd.yml --- .github/workflows/{freebsd14.yml => freebsd.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{freebsd14.yml => freebsd.yml} (100%) diff --git a/.github/workflows/freebsd14.yml b/.github/workflows/freebsd.yml similarity index 100% rename from .github/workflows/freebsd14.yml rename to .github/workflows/freebsd.yml From 9a2cbad4572cdb48961280947b5a9ae85dcc20ae Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 6 Nov 2025 19:03:00 +0100 Subject: [PATCH 8/9] cpa: 0.29.0 --- .github/workflows/freebsd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 9ec5c7b5bb..080592d107 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -37,7 +37,7 @@ jobs: - name: Run on FreeBSD 14 id: freebsd - uses: cross-platform-actions/action@v0.26.0 + uses: cross-platform-actions/action@v0.29.0 with: operating_system: freebsd version: '14.2' From 0ab4bfaa0068f23c48e57a3af8cb6c5f110f8689 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 6 Nov 2025 19:03:19 +0100 Subject: [PATCH 9/9] 14.3 --- .github/workflows/freebsd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 080592d107..0220047a50 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -40,7 +40,7 @@ jobs: uses: cross-platform-actions/action@v0.29.0 with: operating_system: freebsd - version: '14.2' + version: '14.3' # Use bash for consistent scripting shell: bash # Increase resources a bit for building Cython extensions