CI: add OpenBSD workflow in openbsd.yml

This commit is contained in:
Thomas Waldmann 2025-11-06 18:24:45 +01:00
parent 5855ca4135
commit 13d6e774a0
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

73
.github/workflows/openbsd.yml vendored Normal file
View file

@ -0,0 +1,73 @@
name: CI OpenBSD
on:
push:
branches: [ master ]
tags:
- '2.*'
pull_request:
branches: [ master ]
paths:
- '**.py'
- '**.pyx'
- '**.c'
- '**.h'
- '**.yml'
- '**.toml'
- '**.cfg'
- '**.ini'
- 'requirements.d/*'
- '!docs/**'
jobs:
openbsd_tests:
name: OpenBSD tests
runs-on: ubuntu-24.04
timeout-minutes: 90
continue-on-error: true
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
# setuptools-scm needs full history for versioning
fetch-depth: 0
fetch-tags: true
- name: Run on OpenBSD
id: openbsd
uses: cross-platform-actions/action@v0.29.0
with:
operating_system: openbsd
version: '7.7'
shell: bash
cpu_count: 3
memory: 6G
run: |
set -euxo pipefail
# On OpenBSD, use pkg_add and set installurl. Use sudo for privileged operations.
# echo "https://ftp.eu.openbsd.org/pub/OpenBSD" | sudo tee /etc/installurl > /dev/null
# crypto / compression libs
sudo -E pkg_add xxhash || true
sudo -E pkg_add lz4 || true
sudo -E pkg_add zstd || true
# toolchain / VCS
sudo -E pkg_add git || true
sudo -E pkg_add rust || true
# OpenSSL 3.4
sudo -E pkg_add openssl%3.4 || true
# Python tooling
sudo -E pkg_add py3-pip || true
sudo -E pkg_add py3-virtualenv || true
export BORG_OPENSSL_NAME=eopenssl34
# Create and activate a virtualenv
python3 -m virtualenv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
# Install development/test dependencies
pip install -r requirements.d/development.txt
# Build Borg (editable)
pip install -e .
# Run tests; skip benchmarks
pytest -v -n auto --benchmark-skip