From 03998bcc373d8a073a346f4409de79024b044da9 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 15 Mar 2024 15:12:48 +0100 Subject: [PATCH] github CI: misc updates - move most Linux tests to ubuntu 22.04 - macOS: run on macos-14 (on Apple Silicon!) - macOS: use OpenSSL 3.0 from brew - macOS: run with Python 3.11 - trigger CI run for changed .toml files - use up-to-date github actions - remove libb2 references - since borg 1.2, we use blake2 indirectly via python stdlib --- .github/workflows/ci.yml | 37 ++++++++++++++------------- .github/workflows/codeql-analysis.yml | 12 ++++----- .github/workflows/windows.yml | 2 +- docs/global.rst.inc | 1 - 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16a9aad1d3..cc85639bc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ on: - '**.c' - '**.h' - '**.yml' + - '**.toml' - '**.cfg' - '**.ini' - 'requirements.d/*' @@ -23,6 +24,7 @@ on: - '**.c' - '**.h' - '**.yml' + - '**.toml' - '**.cfg' - '**.ini' - 'requirements.d/*' @@ -31,15 +33,15 @@ on: jobs: lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Lint with flake8 run: | pip install flake8 @@ -58,38 +60,38 @@ jobs: - os: ubuntu-20.04 python-version: '3.9' toxenv: py39-fuse3 - - os: ubuntu-20.04 + - os: ubuntu-22.04 python-version: '3.10' toxenv: py310-fuse3 - - os: ubuntu-20.04 + - os: ubuntu-22.04 python-version: '3.11' toxenv: py311-fuse2 - os: ubuntu-22.04 python-version: '3.12' toxenv: py312-fuse3 - - os: macos-12 - python-version: '3.8' - toxenv: py38-none # note: no fuse testing, due to #6099, see also #6196. + - os: macos-14 + python-version: '3.11' + toxenv: py311-none # note: no fuse testing, due to #6099, see also #6196. env: # Configure pkg-config to use OpenSSL from Homebrew - PKG_CONFIG_PATH: "/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH" + PKG_CONFIG_PATH: "/usr/local/opt/openssl@3.0/lib/pkgconfig:$PKG_CONFIG_PATH" TOXENV: ${{ matrix.toxenv }} runs-on: ${{ matrix.os }} timeout-minutes: 180 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # just fetching 1 commit is not enough for setuptools-scm, so we fetch all fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('requirements.d/development.txt') }} @@ -103,7 +105,6 @@ jobs: sudo apt-get update sudo apt-get install -y libssl-dev libacl1-dev liblz4-dev libzstd-dev pkg-config build-essential sudo apt-get install -y libxxhash-dev || true - sudo apt-get install -y libb2-dev || true 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 @@ -113,7 +114,7 @@ jobs: brew install pkg-config || brew upgrade pkg-config brew install zstd || brew upgrade zstd brew install lz4 || brew upgrade lz4 - brew install openssl@1.1 || brew upgrade openssl@1.1 + brew install openssl@3.0 || brew upgrade openssl@3.0 - name: Install Python requirements run: | @@ -123,7 +124,7 @@ jobs: env: # we already have that in the global env, but something is broken and overwrites that. # so, set it here, again. - PKG_CONFIG_PATH: "/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH" + PKG_CONFIG_PATH: "/usr/local/opt/openssl@3.0/lib/pkgconfig:$PKG_CONFIG_PATH" run: | # pip install -e . python setup.py -v develop @@ -131,13 +132,13 @@ jobs: env: # we already have that in the global env, but something is broken and overwrites that. # so, set it here, again. - PKG_CONFIG_PATH: "/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH" + PKG_CONFIG_PATH: "/usr/local/opt/openssl@3.0/lib/pkgconfig:$PKG_CONFIG_PATH" 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@v1 + uses: codecov/codecov-action@v4 env: OS: ${{ runner.os }} python: ${{ matrix.python-version }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7a791c6405..c96dc6b0cf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,7 +14,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: actions: read contents: read @@ -29,16 +29,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # just fetching 1 commit is not enough for setuptools-scm, so we fetch all fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('requirements.d/development.txt') }} @@ -64,6 +64,6 @@ jobs: python3 -m venv ../borg-env source ../borg-env/bin/activate pip3 install -r requirements.d/development.txt - pip3 install -e . + pip3 install -ve . - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f42df65a87..ce7f6f2ced 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,7 +8,7 @@ jobs: run: shell: msys2 {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: msys2/setup-msys2@v2 diff --git a/docs/global.rst.inc b/docs/global.rst.inc index 14725f7312..b0a1f05d12 100644 --- a/docs/global.rst.inc +++ b/docs/global.rst.inc @@ -15,7 +15,6 @@ .. _libattr: https://savannah.nongnu.org/projects/attr/ .. _liblz4: https://github.com/Cyan4973/lz4 .. _libzstd: https://github.com/facebook/zstd -.. _libb2: https://github.com/BLAKE2/libb2 .. _OpenSSL: https://www.openssl.org/ .. _`Python 3`: https://www.python.org/ .. _Buzhash: https://en.wikipedia.org/wiki/Buzhash