From 34ca26f086f850eedefab350e97b7287f202cf78 Mon Sep 17 00:00:00 2001 From: suxb201 Date: Fri, 18 Jul 2025 11:38:57 +0800 Subject: [PATCH] ci: set python 3.9 and update cache keys --- .github/workflows/CI.yml | 45 +++++++++++++++++++++++++++++++++------- README.md | 2 +- README_en.md | 2 +- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0039670..0266578 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,10 +4,8 @@ on: push: tags: - '*' - pull_request: workflow_dispatch: - permissions: contents: read @@ -33,7 +31,15 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: "3.9" + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.platform.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -64,7 +70,15 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: "3.9" + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + key: musllinux-${{ matrix.platform.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -91,8 +105,16 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: "3.9" architecture: ${{ matrix.platform.target }} + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + key: windows-${{ matrix.platform.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -110,7 +132,7 @@ jobs: strategy: matrix: platform: - - runner: macos-12 + - runner: macos-13 target: x86_64 - runner: macos-14 target: aarch64 @@ -118,7 +140,15 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: "3.9" + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + key: macos-${{ matrix.platform.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -149,7 +179,6 @@ jobs: release: name: Release runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" needs: [linux, musllinux, windows, macos, sdist] steps: - uses: actions/download-artifact@v4 diff --git a/README.md b/README.md index 6ef8cb8..60d6f15 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ ## 安装 -需要 Python 3.8 或更高版本。 +需要 Python 3.9 或更高版本。 ```bash pip install resp-benchmark diff --git a/README_en.md b/README_en.md index 1b0b666..170f689 100644 --- a/README_en.md +++ b/README_en.md @@ -24,7 +24,7 @@ A high-performance benchmark tool for testing databases that support the RESP (R ## Installation -Requires Python 3.8 or higher. +Requires Python 3.9 or higher. ```bash pip install resp-benchmark