Skip to content

Commit

Permalink
Move Install Valkey into the shared dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Jun 27, 2024
1 parent ccbaa62 commit 5262fc7
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 108 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-node-wrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-python-wrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
22 changes: 1 addition & 21 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/install-shared-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/install-valkey/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,14 @@ 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
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 protoc (protobuf)
uses: arduino/setup-protoc@v3
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
24 changes: 1 addition & 23 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
24 changes: 1 addition & 23 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5262fc7

Please sign in to comment.