Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix redis installation on macos and amazonlinux #1292

Closed
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,18 @@ jobs:
with:
submodules: recursive

- name: Install redis
# TODO: make this step macos compatible: https://github.com/aws/glide-for-redis/issues/781
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/workflows/install-redis
with:
redis-version: ${{ matrix.redis }}

- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: ${{ matrix.os }}
target: ${{ matrix.os == 'ubuntu-latest' && 'x86_64-unknown-linux-gnu' || 'x86_64-apple-darwin' }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
uses: ./.github/workflows/install-redis
with:
redis-version: ${{ matrix.redis }}

- name: Set up dotnet ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v4
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
# TODO: make this step macos compatible: https://github.com/aws/glide-for-redis/issues/781
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/workflows/install-redis
with:
Expand All @@ -85,7 +84,7 @@ jobs:
run: make test

build-amazonlinux-latest:
if: github.repository_owner == 'aws'
# if: github.repository_owner == 'aws'
strategy:
# Run all jobs
fail-fast: false
Expand Down Expand Up @@ -120,11 +119,6 @@ jobs:
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a symbolic Link for redis6 binaries
run: |
ln -s /usr/bin/redis6-server /usr/bin/redis-server
ln -s /usr/bin/redis6-cli /usr/bin/redis-cli

- name: Install Go
run: |
yum -y install wget
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/install-redis/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,16 @@ runs:
~/redis-binaries/${{ inputs.redis-version }}/redis-server
key: ${{ runner.os }}-${{ inputs.redis-version }}-install-redis

- name: Install redis
- name: Build redis
shell: bash
if: steps.cache-redis.outputs.cache-hit != 'true'
run: |
sudo apt-get update
wget https://github.com/redis/redis/archive/${{ inputs.redis-version }}.tar.gz;
tar -xzvf ${{ inputs.redis-version }}.tar.gz;
pushd redis-${{ inputs.redis-version }} && BUILD_TLS=yes make && sudo mv src/redis-server src/redis-cli ~/redis-binaries/${{ inputs.redis-version }} && popd;

- name: Remove the source package
shell: bash
if: steps.cache-redis.outputs.cache-hit != 'true'
run: sudo rm -r redis-${{ inputs.redis-version }}
mkdir -p ~/redis-binaries/${{ inputs.redis-version }}
pushd redis-${{ inputs.redis-version }} && BUILD_TLS=yes make && mv src/redis-server src/redis-cli ~/redis-binaries/${{ inputs.redis-version }} && popd;

- name: Copy executable to place
- name: Install
shell: bash
run: sudo cp ~/redis-binaries/${{ inputs.redis-version }}/redis-server ~/redis-binaries/${{ inputs.redis-version }}/redis-cli /usr/bin/
run: |
echo $HOME/redis-binaries/${{ inputs.redis-version }} >> $GITHUB_PATH
4 changes: 2 additions & 2 deletions .github/workflows/install-shared-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
run: |
brew update
brew upgrade || true
brew install git gcc pkgconfig openssl redis coreutils
brew install git gcc pkgconfig openssl coreutils

- name: Install software dependencies for Ubuntu
shell: bash
Expand All @@ -46,7 +46,7 @@ runs:
shell: bash
if: "${{ inputs.os == 'amazon-linux' }}"
run: |
yum install -y gcc pkgconfig openssl openssl-devel which curl redis6 gettext --allowerasing
yum install -y gcc pkgconfig openssl openssl-devel which curl gettext wget jemalloc-devel lua-devel make gcc tar gzip --allowerasing

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
# TODO: make this step macos compatible: https://github.com/aws/glide-for-redis/issues/781
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/workflows/install-redis
with:
redis-version: ${{ matrix.redis }}
Expand Down Expand Up @@ -102,7 +100,7 @@ jobs:
benchmarks/results/**

build-amazonlinux-latest:
if: github.repository_owner == 'aws'
# if: github.repository_owner == 'aws'
strategy:
# Run all jobs
fail-fast: false
Expand Down Expand Up @@ -137,25 +135,21 @@ jobs:
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
uses: ./.github/workflows/install-redis
with:
redis-version: 6.2.14

- name: Install protoc (protobuf)
uses: arduino/setup-protoc@v3
with:
version: "26.1"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a symbolic Link for redis6 binaries
run: |
ln -s /usr/bin/redis6-server /usr/bin/redis-server
ln -s /usr/bin/redis6-cli /usr/bin/redis-cli

- name: Install Java
run: |
yum install -y java-${{ matrix.java }}

- name: Build rust part
working-directory: java
run: cargo build --release

- name: Build java part
working-directory: java
run: ./gradlew --continue build
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ jobs:
run: |
npm i -g npm@8

- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: "macos-latest"
target: "x86_64-apple-darwin"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
uses: ./.github/workflows/install-redis
with:
redis-version: 6.2.14

- name: Build Node wrapper
uses: ./.github/workflows/build-node-wrapper
with:
Expand Down Expand Up @@ -161,19 +173,27 @@ jobs:
run: |
yum install -y nodejs

- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: "amazon-linux"
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
uses: ./.github/workflows/install-redis
with:
redis-version: 6.2.14

- name: Build Node wrapper
uses: ./.github/workflows/build-node-wrapper
with:
os: "amazon-linux"
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a symbolic Link for redis6 binaries
working-directory: ./node
run: |
ln -s /usr/bin/redis6-server /usr/bin/redis-server
ln -s /usr/bin/redis6-cli /usr/bin/redis-cli

- name: Test compatibility
run: npm test -- -t "set and get flow works"
working-directory: ./node
run: |
npm install --save-dev jest
npm test -- -t "set and get flow works"
30 changes: 24 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ jobs:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: "macos-latest"
target: "x86_64-apple-darwin"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
uses: ./.github/workflows/install-redis
with:
redis-version: 6.2.14

- name: Build Python wrapper
uses: ./.github/workflows/build-python-wrapper
with:
Expand Down Expand Up @@ -175,19 +187,25 @@ jobs:
run: |
yum install -y python3

- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: "amazon-linux"
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
uses: ./.github/workflows/install-redis
with:
redis-version: 6.2.14

- name: Build Python wrapper
uses: ./.github/workflows/build-python-wrapper
with:
os: "amazon-linux"
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a symbolic Link for redis6 binaries
working-directory: ./python
run: |
ln -s /usr/bin/redis6-server /usr/bin/redis-server
ln -s /usr/bin/redis6-cli /usr/bin/redis-cli

- name: Test compatibility with pytest
working-directory: ./python
run: |
Expand Down
Loading