mirror of
https://github.com/borgbackup/borg.git
synced 2026-04-23 07:07:52 -04:00
151 lines
4.8 KiB
YAML
151 lines
4.8 KiB
YAML
name: Canary (Unlocked Requirements)
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 7 * * *' # Run at 07:00 UTC
|
|
workflow_dispatch: # Allow manual trigger
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
canary_tests:
|
|
name: Canary (${{ matrix.os }}, ${{ matrix.python-version }}, ${{ matrix.toxenv }})
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 360
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# A representative subset of environments
|
|
- os: ubuntu-22.04
|
|
python-version: '3.10'
|
|
toxenv: py310-llfuse
|
|
- os: ubuntu-24.04
|
|
python-version: '3.12'
|
|
toxenv: py312-pyfuse3
|
|
- os: ubuntu-24.04
|
|
python-version: '3.14'
|
|
toxenv: py314-mfusepy
|
|
- os: macos-15
|
|
python-version: '3.14'
|
|
toxenv: py314-none
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install Linux packages
|
|
if: ${{ runner.os == 'Linux' }}
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y pkg-config build-essential
|
|
sudo apt-get install -y libssl-dev libacl1-dev liblz4-dev
|
|
if [[ "${{ matrix.toxenv }}" == *"llfuse"* ]]; then
|
|
sudo apt-get install -y libfuse-dev fuse
|
|
elif [[ "${{ matrix.toxenv }}" == *"pyfuse3"* || "${{ matrix.toxenv }}" == *"mfusepy"* ]]; then
|
|
sudo apt-get install -y libfuse3-dev fuse3
|
|
fi
|
|
|
|
- name: Install macOS packages
|
|
if: ${{ runner.os == 'macOS' }}
|
|
shell: bash
|
|
run: |
|
|
brew bundle install || true
|
|
|
|
- name: Install Python requirements (UNLOCKED)
|
|
shell: bash
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools wheel
|
|
# Use UNLOCKED requirements to catch upstream breakages
|
|
pip install -r requirements.d/development.txt
|
|
|
|
- name: Install borgbackup
|
|
shell: bash
|
|
run: |
|
|
if [[ "${{ matrix.toxenv }}" == *"llfuse"* ]]; then
|
|
pip install -e ".[llfuse,cockpit]"
|
|
elif [[ "${{ matrix.toxenv }}" == *"pyfuse3"* ]]; then
|
|
pip install -e ".[pyfuse3,cockpit]"
|
|
elif [[ "${{ matrix.toxenv }}" == *"mfusepy"* ]]; then
|
|
pip install -e ".[mfusepy,cockpit]"
|
|
else
|
|
pip install -e ".[cockpit]"
|
|
fi
|
|
|
|
- name: Run tests (Canary)
|
|
shell: bash
|
|
run: |
|
|
if [[ "${{ matrix.toxenv }}" == *"-windows" ]]; then
|
|
python -m pytest -n4 --benchmark-skip -vv -rs -k "not remote" --cov=borg --cov-config=pyproject.toml --cov-report=xml --junitxml=test-results.xml
|
|
else
|
|
# Force tox to use the unlocked requirements in its environment creation
|
|
# by overriding the deps if possible, or just trusting it uses development.txt
|
|
# which we already installed in the root. Actually tox creates its own venv.
|
|
# We need to tell tox to use the unlocked file.
|
|
tox -e ${{ matrix.toxenv }} --override "env_run_base.deps=[-rrequirements.d/development.txt]"
|
|
fi
|
|
|
|
windows_canary:
|
|
|
|
if: true # can be used to temporarily disable the build
|
|
name: Canary (Windows)
|
|
runs-on: windows-latest
|
|
timeout-minutes: 180
|
|
|
|
env:
|
|
PY_COLORS: 1
|
|
MSYS2_ARG_CONV_EXCL: "*"
|
|
MSYS2_ENV_CONV_EXCL: "*"
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: UCRT64
|
|
update: true
|
|
|
|
- name: Install system packages
|
|
run: ./scripts/msys2-install-deps development
|
|
|
|
- name: Build python venv
|
|
run: |
|
|
# building cffi / argon2-cffi in the venv fails, so we try to use the system packages
|
|
python -m venv --system-site-packages env
|
|
. env/bin/activate
|
|
# python -m pip install --upgrade pip
|
|
# pip install --upgrade setuptools build wheel
|
|
pip install -r requirements.d/pyinstaller.txt
|
|
|
|
- name: Build
|
|
run: |
|
|
# build borg.exe
|
|
. env/bin/activate
|
|
pip install -e ".[cockpit,s3,sftp,rest,rclone]"
|
|
mkdir -p dist/binary
|
|
pyinstaller -y --clean --distpath=dist/binary scripts/borg.exe.spec
|
|
# build sdist and wheel in dist/...
|
|
python -m build
|
|
|
|
- name: Run tests
|
|
run: |
|
|
# Ensure locally built binary in ./dist/binary/borg-dir is found during tests
|
|
export PATH="$GITHUB_WORKSPACE/dist/binary/borg-dir:$PATH"
|
|
borg.exe -V
|
|
. env/bin/activate
|
|
python -m pytest -n4 --benchmark-skip -vv -rs -k "not remote" --cov=borg --cov-config=pyproject.toml --cov-report=xml --junitxml=test-results.xml
|