Skip to content

Commit

Permalink
Addressing Feedback.
Browse files Browse the repository at this point in the history
Signed-off-by: Roshan Khatri <[email protected]>
  • Loading branch information
roshkhatri committed Apr 16, 2024
1 parent 8f95cff commit b0f23aa
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 35 deletions.
21 changes: 10 additions & 11 deletions .github/actions/generate-package-build-matrix/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Composite action to generate the matrix of targets to build packages for.
description: Remove any duplication of this information so we only have to update in one place.
name: Generate target matrix.
description: Matrix creation for building Valkey for different architectures and platforms.

inputs:
ref:
description: The commit, tag or branch of Valkey to checkout for building we then use to determine version for.
description: The commit, tag or branch of Valkey to checkout to determine what version to use.
required: true
outputs:
x86_64-build-matrix:
Expand All @@ -13,7 +13,6 @@ outputs:
description: The arm64 build matrix.
value: ${{ steps.set-matrix.outputs.armmatrix }}


runs:
using: "composite"
steps:
Expand All @@ -25,13 +24,13 @@ runs:

- name: Get targets
run: |
x86_arch=$(jq -c '[.linux_targets[] | select(.arch=="x86_64")]' utils/releasetools/build-config.json)
x86_matrix=$(echo "{ \"distro\" : $x86_arch }" | jq -c .)
echo "X86_MATRIX=$x86_matrix" >> $GITHUB_ENV
x86_arch=$(jq -c '[.linux_targets[] | select(.arch=="x86_64")]' utils/releasetools/build-config.json)
x86_matrix=$(echo "{ \"distro\" : $x86_arch }" | jq -c .)
echo "X86_MATRIX=$x86_matrix" >> $GITHUB_ENV
arm_arch=$(jq -c '[.linux_targets[] | select(.arch=="arm64")]' utils/releasetools/build-config.json)
arm_matrix=$(echo "{ \"distro\" : $arm_arch }" | jq -c .)
echo "ARM_MATRIX=$arm_matrix" >> $GITHUB_ENV
arm_arch=$(jq -c '[.linux_targets[] | select(.arch=="arm64")]' utils/releasetools/build-config.json)
arm_matrix=$(echo "{ \"distro\" : $arm_arch }" | jq -c .)
echo "ARM_MATRIX=$arm_matrix" >> $GITHUB_ENV
shell: bash

- id: set-matrix
Expand All @@ -42,4 +41,4 @@ runs:
echo $ARM_MATRIX
echo $ARM_MATRIX| jq .
echo "armmatrix=$ARM_MATRIX" >> $GITHUB_OUTPUT
shell: bash
shell: bash
12 changes: 6 additions & 6 deletions .github/workflows/build-release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
- name: Get the version
id: get_version
run: |
VERSION="${INPUT_VERSION}"
if [ -z "${VERSION}" ]; then
exit 1
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
VERSION="${INPUT_VERSION}"
if [ -z "${VERSION}" ]; then
exit 1
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
env:
# Use the dispatch variable in preference, if empty use the context ref_name which should
Expand Down Expand Up @@ -83,4 +83,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
bucket: ${{ secrets.AWS_S3_BUCKET }}
access_key_id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
secret_access_key: ${{ secrets.AWS_S3_ACCESS_KEY }}
secret_access_key: ${{ secrets.AWS_S3_ACCESS_KEY }}
10 changes: 5 additions & 5 deletions .github/workflows/call-build-linux-arm-packages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Reusable workflow to build binary packages into S3 bucket
name: Builds Linux arm binary packages into S3 bucket.

on:
workflow_call:
Expand Down Expand Up @@ -32,7 +32,7 @@ on:
jobs:
build-valkey:
# Capture source tarball and generate checksum for it
name: Build package ${{ matrix.distro.target }} ${{ matrix.distro.arch }}
name: Build package ${{ matrix.distro.target }} ${{ matrix.distro.arch }}
runs-on: 'ubuntu-latest'
permissions:
contents: read
Expand All @@ -50,7 +50,7 @@ jobs:
with:
arch: aarch64
distro: ${{matrix.distro.target}}
install: apt-get update && apt-get install -y build-essential libssl-dev libjemalloc-dev
install: apt-get update && apt-get install -y build-essential libssl-dev
run: make -C src all BUILD_TLS=yes

- name: Create Tarball and SHA256sums
Expand All @@ -70,9 +70,9 @@ jobs:
- name: Configure AWS credentials
run: |
aws configure set region us-east-1
aws configure set region us-west-2
aws configure set aws_access_key_id ${{ secrets.access_key_id }}
aws configure set aws_secret_access_key ${{ secrets.secret_access_key }}
- name: Sync to S3
run: aws s3 sync packages-files s3://${{secrets.bucket}}/releases/
run: aws s3 sync packages-files s3://${{secrets.bucket}}/releases/
19 changes: 6 additions & 13 deletions .github/workflows/call-build-linux-x86-packages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Reusable workflow to build binary packages into S3 bucket
name: Builds Linux X86 binary packages into S3 bucket.

on:
workflow_call:
Expand Down Expand Up @@ -32,7 +32,7 @@ on:
jobs:
build-valkey:
# Capture source tarball and generate checksum for it
name: Build package ${{ matrix.distro.target }} ${{ matrix.distro.arch }}
name: Build package ${{ matrix.distro.target }} ${{ matrix.distro.arch }}
runs-on: 'ubuntu-latest'
permissions:
contents: read
Expand All @@ -46,11 +46,8 @@ jobs:
ref: ${{ inputs.version }}

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential libssl-dev jq wget

- name: Set JEMALLOC Flags
run: JEMALLOC_CONFIGURE_OPTS="--with-lg-page=16"

run: sudo apt-get update && sudo apt-get install -y build-essential libssl-dev jq wget awscli

- name: Make Valkey
run: make -C src all BUILD_TLS=yes

Expand All @@ -64,16 +61,12 @@ jobs:
sha256sum $TAR_FILE_NAME.tar.gz > $TAR_FILE_NAME.tar.gz.sha256
mkdir -p packages-files
cp -rfv $TAR_FILE_NAME.tar* packages-files/
- name: Install AWS cli.
run: |
sudo apt-get install -y awscli
- name: Configure AWS credentials
run: |
aws configure set region us-east-1
aws configure set region us-west-2
aws configure set aws_access_key_id ${{ secrets.access_key_id }}
aws configure set aws_secret_access_key ${{ secrets.secret_access_key }}
- name: Sync to S3
run: aws s3 sync packages-files s3://${{secrets.bucket}}/releases/
run: aws s3 sync packages-files s3://${{secrets.bucket}}/releases/

0 comments on commit b0f23aa

Please sign in to comment.