From 5262fc782d749ecb8d8d4473e284bbb36f27df3e Mon Sep 17 00:00:00 2001 From: barshaul Date: Thu, 27 Jun 2024 17:49:35 +0000 Subject: [PATCH] Move Install Valkey into the shared dependencies --- .../workflows/build-node-wrapper/action.yml | 5 ++++ .../workflows/build-python-wrapper/action.yml | 5 ++++ .github/workflows/csharp.yml | 9 +------ .github/workflows/go.yml | 22 +---------------- .../install-shared-dependencies/action.yml | 15 ++++++++---- .github/workflows/install-valkey/action.yml | 2 +- .github/workflows/java.yml | 16 ++----------- .github/workflows/node.yml | 24 +------------------ .github/workflows/python.yml | 24 +------------------ .github/workflows/rust.yml | 14 +---------- 10 files changed, 28 insertions(+), 108 deletions(-) diff --git a/.github/workflows/build-node-wrapper/action.yml b/.github/workflows/build-node-wrapper/action.yml index e471ca5e1a..7462f47f65 100644 --- a/.github/workflows/build-node-wrapper/action.yml +++ b/.github/workflows/build-node-wrapper/action.yml @@ -29,6 +29,10 @@ inputs: description: "Specified target for rust toolchain, ex. x86_64-apple-darwin" type: string required: true + engine-version: + description: "Engine version to install" + required: true + type: string publish: description: "Enable building the wrapper in release mode" required: false @@ -56,6 +60,7 @@ runs: os: ${{ inputs.os }} target: ${{ inputs.target }} github-token: ${{ inputs.github-token }} + engine-version: ${{ inputs.engine-version }} - name: Create package.json file uses: ./.github/workflows/node-create-package-file diff --git a/.github/workflows/build-python-wrapper/action.yml b/.github/workflows/build-python-wrapper/action.yml index f1a60d605c..72863c6a43 100644 --- a/.github/workflows/build-python-wrapper/action.yml +++ b/.github/workflows/build-python-wrapper/action.yml @@ -13,6 +13,10 @@ inputs: description: "Specified target for rust toolchain, ex. x86_64-apple-darwin" type: string required: true + engine-version: + description: "Engine version to install" + required: true + type: string publish: description: "Enable building the wrapper in release mode" required: false @@ -34,6 +38,7 @@ runs: os: ${{ inputs.os }} target: ${{ inputs.target }} github-token: ${{ inputs.github-token }} + engine-version: ${{ inputs.engine-version }} - name: Install Python software dependencies shell: bash diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index bacd6166e6..b490bc47a9 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -80,13 +80,6 @@ jobs: with: redis-version: ${{ matrix.engine.version }} - - name: Install Valkey - if: ${{ matrix.engine.type == 'valkey' }} - uses: ./.github/workflows/install-valkey - with: - engine-version: ${{ matrix.engine.version }} - target: ${{ matrix.host.TARGET }} - - name: Set up dotnet ${{ matrix.dotnet }} uses: actions/setup-dotnet@v4 with: @@ -98,7 +91,7 @@ jobs: os: ${{ matrix.host.OS }} target: ${{ matrix.host.TARGET }} github-token: ${{ secrets.GITHUB_TOKEN }} - # install-redis: ${{ ((matrix.engine.type == 'valkey' || matrix.host.OS == 'ubuntu') && 'false') || 'true' }} + engine-version: ${{ matrix.engine.version }} - name: Format working-directory: ./csharp diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9830de07b5..3c2f969a0c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -70,28 +70,13 @@ jobs: go-version: ${{ matrix.go }} cache-dependency-path: go/go.sum - - name: Install redis - if: ${{ matrix.engine.type == 'redis' && matrix.host.OS == 'ubuntu' }} - # TODO: make this step macos compatible: https://github.com/aws/glide-for-redis/issues/781 - uses: ./.github/workflows/install-redis - with: - redis-version: ${{ matrix.engine.version }} - - - name: Install Valkey - if: ${{ matrix.engine.type == 'valkey' }} - uses: ./.github/workflows/install-valkey - with: - engine-version: ${{ matrix.engine.version }} - target: ${{ matrix.host.TARGET }} - - - name: Install shared software dependencies uses: ./.github/workflows/install-shared-dependencies with: os: ${{ matrix.host.OS }} target: ${{ matrix.host.TARGET }} github-token: ${{ secrets.GITHUB_TOKEN }} - # install-redis: ${{ ((matrix.engine.type == 'valkey' || matrix.host.OS == 'ubuntu') && 'false') || 'true' }} + engine-version: ${{ matrix.engine.version }} - name: Install tools for Go ${{ matrix.go }} working-directory: ./go @@ -148,12 +133,7 @@ jobs: os: "amazon-linux" target: "x86_64-unknown-linux-gnu" github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Valkey - uses: ./.github/workflows/install-valkey - with: engine-version: "7.2.5" - target: "x86_64-unknown-linux-gnu" - name: Install Go run: | diff --git a/.github/workflows/install-shared-dependencies/action.yml b/.github/workflows/install-shared-dependencies/action.yml index 17b6e2e264..c0f5227f6e 100644 --- a/.github/workflows/install-shared-dependencies/action.yml +++ b/.github/workflows/install-shared-dependencies/action.yml @@ -21,11 +21,10 @@ inputs: - aarch64-apple-darwin - aarch64-unknown-linux-musl - x86_64-unknown-linux-musl - # install-redis: - # description: "Indicates if redis should be installed from the package manager" - # required: false - # type: boolean - # default: "true" + engine-version: + description: "Engine version to install" + required: true + type: string github-token: description: "GITHUB_TOKEN, GitHub App installation access token" @@ -87,3 +86,9 @@ runs: with: target: ${{ inputs.target }} github-token: ${{ inputs.github-token }} + + - name: Install Valkey + uses: ./.github/workflows/install-valkey + with: + engine-version: ${{ inputs.engine-version }} + target: ${{ inputs.target }} diff --git a/.github/workflows/install-valkey/action.yml b/.github/workflows/install-valkey/action.yml index ac463fc289..8ba5f1d083 100644 --- a/.github/workflows/install-valkey/action.yml +++ b/.github/workflows/install-valkey/action.yml @@ -2,7 +2,7 @@ name: Install Valkey inputs: engine-version: - description: "valkey version to install" + description: "Engine version to install" required: true type: string target: diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 09c45b8f70..2a5ae5d208 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -83,13 +83,6 @@ jobs: uses: ./.github/workflows/install-redis with: redis-version: ${{ matrix.engine.version }} - - - name: Install Valkey - if: ${{ matrix.engine.type == 'valkey' }} - uses: ./.github/workflows/install-valkey - with: - engine-version: ${{ matrix.engine.version }} - target: ${{ matrix.host.TARGET }} - name: Install shared software dependencies uses: ./.github/workflows/install-shared-dependencies @@ -97,7 +90,7 @@ jobs: os: ${{ matrix.host.OS }} target: ${{ matrix.host.TARGET }} github-token: ${{ secrets.GITHUB_TOKEN }} - # install-redis: ${{ ((matrix.engine.type == 'valkey' || matrix.host.OS == 'ubuntu') && 'false') || 'true' }} + engine-version: ${{ matrix.engine.version }} - name: Install protoc (protobuf) uses: arduino/setup-protoc@v3 @@ -164,6 +157,7 @@ jobs: os: "amazon-linux" target: "x86_64-unknown-linux-gnu" github-token: ${{ secrets.GITHUB_TOKEN }} + engine-version: "7.2.5" - name: Install protoc (protobuf) uses: arduino/setup-protoc@v3 @@ -175,12 +169,6 @@ jobs: run: | yum install -y java-${{ matrix.java }} - - name: Install Valkey - uses: ./.github/workflows/install-valkey - with: - engine-version: "7.2.5" - target: "x86_64-unknown-linux-gnu" - - name: Build rust part working-directory: java run: cargo build --release diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index e8d144b1f0..f80e37ad07 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -58,19 +58,6 @@ jobs: with: submodules: recursive - # - name: Install redis - # if: ${{ matrix.engine.type == 'redis' }} - # uses: ./.github/workflows/install-redis - # with: - # redis-version: ${{ matrix.engine.version }} - - - name: Install Valkey - if: ${{ matrix.engine.type == 'valkey' }} - uses: ./.github/workflows/install-valkey - with: - engine-version: ${{ matrix.engine.version }} - target: "x86_64-unknown-linux-gnu" - - name: Use Node.js 16.x uses: actions/setup-node@v3 with: @@ -82,6 +69,7 @@ jobs: os: "ubuntu" target: "x86_64-unknown-linux-gnu" github-token: ${{ secrets.GITHUB_TOKEN }} + engine-version: ${{ matrix.engine.version }} - name: test run: npm test @@ -146,12 +134,7 @@ jobs: arch: "arm64" target: "aarch64-apple-darwin" github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Valkey - uses: ./.github/workflows/install-valkey - with: engine-version: "7.2.5" - target: "aarch64-apple-darwin" - name: Test compatibility run: npm test -- -t "set and get flow works" @@ -187,12 +170,7 @@ jobs: os: "amazon-linux" target: "x86_64-unknown-linux-gnu" github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Valkey - uses: ./.github/workflows/install-valkey - with: engine-version: "7.2.5" - target: "x86_64-unknown-linux-gnu" - name: Test compatibility run: npm test -- -t "set and get flow works" diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 45e1aea7bd..add52d2afb 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -60,19 +60,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - # - name: Install redis - # if: ${{ matrix.engine.type == 'redis' }} - # uses: ./.github/workflows/install-redis - # with: - # redis-version: ${{ matrix.engine.version }} - - - name: Install Valkey - if: ${{ matrix.engine.type == 'valkey' }} - uses: ./.github/workflows/install-valkey - with: - engine-version: ${{ matrix.engine.version }} - target: "x86_64-unknown-linux-gnu" - name: Set up Python 3.10 uses: actions/setup-python@v4 @@ -109,6 +96,7 @@ jobs: os: "ubuntu" target: "x86_64-unknown-linux-gnu" github-token: ${{ secrets.GITHUB_TOKEN }} + engine-version: ${{ matrix.engine.version }} - name: Type check with mypy working-directory: ./python @@ -161,12 +149,7 @@ jobs: os: "macos" target: "aarch64-apple-darwin" github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Valkey - uses: ./.github/workflows/install-valkey - with: engine-version: "7.2.5" - target: "aarch64-apple-darwin" - name: Test compatibility with pytest working-directory: ./python @@ -204,12 +187,7 @@ jobs: os: "amazon-linux" target: "x86_64-unknown-linux-gnu" github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Valkey - uses: ./.github/workflows/install-valkey - with: engine-version: "7.2.5" - target: "x86_64-unknown-linux-gnu" - name: Test compatibility with pytest working-directory: ./python diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1227a3be8d..1d512610ed 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -52,24 +52,12 @@ jobs: with: submodules: recursive - # - name: Install redis - # if: ${{ matrix.engine.type == 'redis' }} - # uses: ./.github/workflows/install-redis - # with: - # redis-version: ${{ matrix.engine.version }} - - - name: Install Valkey - if: ${{ matrix.engine.type == 'valkey' }} - uses: ./.github/workflows/install-valkey - with: - engine-version: ${{ matrix.engine.version }} - target: "x86_64-unknown-linux-gnu" - - name: Install shared software dependencies uses: ./.github/workflows/install-shared-dependencies with: os: "ubuntu" target: "x86_64-unknown-linux-gnu" + engine-version: ${{ matrix.engine.version }} - uses: Swatinem/rust-cache@v2