diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 801e525b4..3ae870280 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,10 +187,13 @@ jobs: sudo apt-get update sudo apt-get install -y pkg-config build-essential sudo apt-get install -y libssl-dev libacl1-dev libxxhash-dev liblz4-dev libzstd-dev - sudo apt-get install -y libfuse-dev fuse || true # Required for Python llfuse module - sudo apt-get install -y libfuse3-dev fuse3 || true # Required for Python pyfuse3 module sudo apt-get install -y bash zsh fish # for shell completion tests sudo apt-get install -y rclone openssh-server curl + if [[ "$TOXENV" == *"fuse2"* ]]; then + sudo apt-get install -y libfuse-dev fuse # Required for Python llfuse module + elif [[ "$TOXENV" == *"fuse3"* ]]; then + sudo apt-get install -y libfuse3-dev fuse3 # Required for Python pyfuse3 module + fi - name: Install macOS packages if: ${{ runner.os == 'macOS' }} @@ -262,28 +265,21 @@ jobs: - name: Install borgbackup run: | - pip install -e . - - - name: run tox env - run: | - # do not use fakeroot, but run as root. avoids the dreaded EISDIR sporadic failures. see #2482. - #sudo -E bash -c "tox -e py" - tox --skip-missing-interpreters - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - env: - OS: ${{ runner.os }} - python: ${{ matrix.python-version }} - with: - token: ${{ secrets.CODECOV_TOKEN }} - env_vars: OS, python + if [[ "$TOXENV" == *"fuse2"* ]]; then + pip install -ve ".[llfuse]" + elif [[ "$TOXENV" == *"fuse3"* ]]; then + pip install -ve ".[pyfuse3]" + else + pip install -ve . + fi - name: Build Borg fat binaries (${{ matrix.binary }}) if: ${{ matrix.binary && startsWith(github.ref, 'refs/tags/') }} run: | pip install 'pyinstaller==6.14.2' mkdir -p dist/binary + # Ensure locally built binaries in ./dist/binary are found during tox tests + echo "$GITHUB_WORKSPACE/dist/binary" >> "$GITHUB_PATH" pyinstaller --clean --distpath=dist/binary scripts/borg.exe.spec - name: Smoke-test the built binary (${{ matrix.binary }}) @@ -298,6 +294,8 @@ jobs: ./borg-dir/borg.exe -V tar czf borg.tgz borg-dir popd + echo "borg.exe binary in PATH" + borg.exe -V - name: Prepare binaries (${{ matrix.binary }}) if: ${{ matrix.binary && startsWith(github.ref, 'refs/tags/') }} @@ -326,6 +324,21 @@ jobs: path: artifacts/* if-no-files-found: error + - name: run tox env + run: | + # do not use fakeroot, but run as root. avoids the dreaded EISDIR sporadic failures. see #2482. + #sudo -E bash -c "tox -e py" + tox --skip-missing-interpreters + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + env: + OS: ${{ runner.os }} + python: ${{ matrix.python-version }} + with: + token: ${{ secrets.CODECOV_TOKEN }} + env_vars: OS, python + vm_tests: permissions: contents: read @@ -386,8 +399,10 @@ jobs: export IGNORE_OSVERSION=yes sudo -E pkg update -f sudo -E pkg install -y xxhash liblz4 zstd pkgconf - # Install one of the FUSE libraries; fail if neither is available - sudo -E pkg install -y fusefs-libs || sudo -E pkg install -y fusefs-libs3 + sudo -E pkg install -y fusefs-libs + sudo -E kldload fusefs + sudo -E sysctl vfs.usermount=1 + sudo -E chmod 666 /dev/fuse sudo -E pkg install -y rust sudo -E pkg install -y gmake sudo -E pkg install -y git @@ -407,8 +422,8 @@ jobs: pip -V python -m pip install --upgrade pip wheel pip install -r requirements.d/development.txt - pip install -e . - tox -e py311-none + pip install -e ".[llfuse]" + tox -e py311-fuse2 if [[ "${{ matrix.do_binaries }}" == "true" && "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then python -m pip install 'pyinstaller==6.14.2'