Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/unstable' into NOADDR_nodes
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Dec 23, 2024
2 parents 80651b3 + d00c856 commit ba0e235
Show file tree
Hide file tree
Showing 170 changed files with 15,259 additions and 3,849 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ contact_links:
- name: Chat with us on Matrix?
url: https://matrix.to/#/#valkey:matrix.org
about: We are on Matrix too!
- name: Chat with us on Slack?
url: https://join.slack.com/t/valkey-oss-developer/shared_invite/zt-2nxs51chx-EB9hu9Qdch3GMfRcztTSkQ
about: We are on Slack too!
- name: Documentation issue?
url: https://github.com/valkey-io/valkey-doc/issues
about: Report it on the valkey-doc repo.
4 changes: 2 additions & 2 deletions .github/actions/generate-package-build-matrix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ runs:

- name: Get targets
run: |
x86_arch=$(jq -c '[.linux_targets[] | select(.arch=="x86_64")]' utils/releasetools/build-config.json)
x86_arch=$(jq -c '[.linux_targets[] | select(.arch=="x86_64")]' .github/actions/generate-package-build-matrix/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_arch=$(jq -c '[.linux_targets[] | select(.arch=="arm64")]' .github/actions/generate-package-build-matrix/build-config.json)
arm_matrix=$(echo "{ \"distro\" : $arm_arch }" | jq -c .)
echo "ARM_MATRIX=$arm_matrix" >> $GITHUB_ENV
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
{
"linux_targets": [

{
"arch": "x86_64",
"target": "ubuntu18.04",
"target": "ubuntu-20.04",
"type": "deb",
"platform": "bionic"
"platform": "focal"
},
{
"arch": "x86_64",
"target": "ubuntu20.04",
"target": "ubuntu-22.04",
"type": "deb",
"platform": "focal"
"platform": "jammy"
},
{
"arch": "arm64",
"target": "ubuntu18.04",
"arch": "x86_64",
"target": "ubuntu-24.04",
"type": "deb",
"platform": "bionic"
"platform": "noble"
},
{
"arch": "arm64",
"target": "ubuntu20.04",
"type": "deb",
"platform": "focal"
},
{
"arch": "arm64",
"target": "ubuntu22.04",
"type": "deb",
"platform": "jammy"
}
]
}
47 changes: 35 additions & 12 deletions .github/workflows/build-release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,32 @@ name: Build Release Packages
on:
release:
types: [published]

push:
paths:
- '.github/workflows/build-release-packages.yml'
- '.github/workflows/call-build-linux-arm-packages.yml'
- '.github/workflows/call-build-linux-x86-packages.yml'
- '.github/actions/generate-package-build-matrix/build-config.json'
workflow_dispatch:
inputs:
version:
description: Version of Valkey to build
required: true

permissions:
id-token: write
contents: read

jobs:
# This job provides the version metadata from the tag for the other jobs to use.
release-build-get-meta:
name: Get metadata to build
if: github.event_name == 'workflow_dispatch' || github.repository == 'valkey-io/valkey'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.VERSION }}
is_test: ${{ steps.check-if-testing.outputs.IS_TEST }}
steps:

- run: |
echo "Version: ${{ inputs.version || github.ref_name }}"
shell: bash
Expand All @@ -32,8 +39,13 @@ jobs:
- name: Get the version
id: get_version
run: |
VERSION="${INPUT_VERSION}"
if [[ "${{ github.event_name }}" == "push" ]]; then
VERSION=${{ github.ref_name }}
else
VERSION="${INPUT_VERSION}"
fi
if [ -z "${VERSION}" ]; then
echo "Error: No version specified"
exit 1
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
Expand All @@ -43,8 +55,21 @@ jobs:
# only ever be a tag
INPUT_VERSION: ${{ inputs.version || github.ref_name }}

- name: Check if we are testing
id: check-if-testing
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
echo "This is a test workflow -> We will upload to the Test S3 Bucket"
echo "IS_TEST=true" >> $GITHUB_OUTPUT
else
echo "This is a Release workflow -> We will upload to the Release S3 Bucket"
echo "IS_TEST=false" >> $GITHUB_OUTPUT
fi
shell: bash

generate-build-matrix:
name: Generating build matrix
if: github.event_name == 'workflow_dispatch' || github.repository == 'valkey-io/valkey'
runs-on: ubuntu-latest
outputs:
x86_64-build-matrix: ${{ steps.set-matrix.outputs.x86_64-build-matrix }}
Expand All @@ -56,7 +81,7 @@ jobs:
- uses: ./.github/actions/generate-package-build-matrix
id: set-matrix
with:
ref: ${{ inputs.version || github.ref_name }}
ref: ${{ needs.release-build-get-meta.outputs.version }}

release-build-linux-x86-packages:
needs:
Expand All @@ -67,11 +92,10 @@ jobs:
version: ${{ needs.release-build-get-meta.outputs.version }}
ref: ${{ inputs.version || github.ref_name }}
build_matrix: ${{ needs.generate-build-matrix.outputs.x86_64-build-matrix }}
region: us-west-2
secrets:
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 }}
bucket_name: ${{ needs.release-build-get-meta.outputs.is_test == 'true' && secrets.AWS_S3_TEST_BUCKET || secrets.AWS_S3_BUCKET }}
role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}

release-build-linux-arm-packages:
needs:
Expand All @@ -82,8 +106,7 @@ jobs:
version: ${{ needs.release-build-get-meta.outputs.version }}
ref: ${{ inputs.version || github.ref_name }}
build_matrix: ${{ needs.generate-build-matrix.outputs.arm64-build-matrix }}
region: us-west-2
secrets:
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 }}
bucket_name: ${{ needs.release-build-get-meta.outputs.is_test == 'true' && secrets.AWS_S3_TEST_BUCKET || secrets.AWS_S3_BUCKET }}
role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
39 changes: 17 additions & 22 deletions .github/workflows/call-build-linux-arm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@ on:
description: The build targets to produce as a JSON matrix.
type: string
required: true
region:
description: The AWS region to push packages into.
type: string
required: true
secrets:
token:
description: The Github token or similar to authenticate with.
bucket_name:
description: The S3 bucket to push packages into.
required: true
role_to_assume:
description: The role to assume for the S3 bucket.
required: true
bucket:
description: The name of the S3 bucket to push packages into.
required: false
access_key_id:
description: The S3 access key id for the bucket.
required: false
secret_access_key:
description: The S3 secret access key for the bucket.
required: false

permissions:
id-token: write
contents: read

jobs:
Expand All @@ -46,6 +45,12 @@ jobs:
with:
ref: ${{ inputs.version }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ inputs.region }}
role-to-assume: ${{ secrets.role_to_assume }}

- name: Make Valkey
uses: uraimo/run-on-arch-action@v2
with:
Expand All @@ -65,15 +70,5 @@ jobs:
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-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_name }}/releases/
41 changes: 18 additions & 23 deletions .github/workflows/call-build-linux-x86-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,27 @@ on:
description: The build targets to produce as a JSON matrix.
type: string
required: true
region:
description: The AWS region to upload the packages to.
type: string
required: true
secrets:
token:
description: The Github token or similar to authenticate with.
bucket_name:
description: The name of the S3 bucket to upload the packages to.
required: true
role_to_assume:
description: The role to assume for the S3 bucket.
required: true
bucket:
description: The name of the S3 bucket to push packages into.
required: false
access_key_id:
description: The S3 access key id for the bucket.
required: false
secret_access_key:
description: The S3 secret access key for the bucket.
required: false

permissions:
id-token: write
contents: read

jobs:
build-valkey:
# Capture source tarball and generate checksum for it
name: Build package ${{ matrix.distro.target }} ${{ matrix.distro.arch }}
runs-on: "ubuntu-latest"
runs-on: ${{matrix.distro.target}}
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.build_matrix) }}
Expand All @@ -46,6 +45,12 @@ jobs:
with:
ref: ${{ inputs.version }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ inputs.region }}
role-to-assume: ${{ secrets.role_to_assume }}

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

Expand All @@ -63,15 +68,5 @@ jobs:
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-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_name }}/releases/
31 changes: 21 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: make
# Fail build if there are warnings
# build with TLS just for compilation coverage
run: make -j4 all-with-unit-tests SERVER_CFLAGS='-Werror' BUILD_TLS=yes
run: make -j4 all-with-unit-tests SERVER_CFLAGS='-Werror' BUILD_TLS=yes USE_FAST_FLOAT=yes
- name: test
run: |
sudo apt-get install tcl8.6 tclx
Expand Down Expand Up @@ -77,10 +77,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: make
- name: prepare-development-libraries
run: sudo apt-get install librdmacm-dev libibverbs-dev
- name: make-rdma-module
run: make -j4 BUILD_RDMA=module
- name: make-rdma-builtin
run: |
sudo apt-get install librdmacm-dev libibverbs-dev
make -j4 BUILD_RDMA=module
make distclean
make -j4 BUILD_RDMA=yes
- name: clone-rxe-kmod
run: |
mkdir -p tests/rdma/rxe
Expand Down Expand Up @@ -108,23 +112,30 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: make
run: make -j3 all-with-unit-tests SERVER_CFLAGS='-Werror'
# Build with additional upcoming features
run: make -j3 all-with-unit-tests SERVER_CFLAGS='-Werror' USE_FAST_FLOAT=yes

build-32bit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: make
# Fast float requires C++ 32-bit libraries to compile on 64-bit ubuntu
# machine i.e. "-cross" suffixed version. Cross-compiling c++ to 32-bit
# also requires multilib support for g++ compiler i.e. "-multilib"
# suffixed version of g++. g++-multilib generally includes libstdc++.
# *cross version as well, but it is also added explicitly just in case.
run: |
sudo apt-get update && sudo apt-get install libc6-dev-i386
make -j4 SERVER_CFLAGS='-Werror' 32bit
sudo apt-get update
sudo apt-get install libc6-dev-i386 libstdc++-11-dev-i386-cross gcc-multilib g++-multilib
make -j4 SERVER_CFLAGS='-Werror' 32bit USE_FAST_FLOAT=yes
build-libc-malloc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: make
run: make -j4 SERVER_CFLAGS='-Werror' MALLOC=libc
run: make -j4 SERVER_CFLAGS='-Werror' MALLOC=libc USE_FAST_FLOAT=yes

build-almalinux8-jemalloc:
runs-on: ubuntu-latest
Expand All @@ -134,8 +145,8 @@ jobs:

- name: make
run: |
dnf -y install epel-release gcc make procps-ng which
make -j4 SERVER_CFLAGS='-Werror'
dnf -y install epel-release gcc gcc-c++ make procps-ng which
make -j4 SERVER_CFLAGS='-Werror' USE_FAST_FLOAT=yes
format-yaml:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit ba0e235

Please sign in to comment.