From d330691b870bdf29949823df7840f9c3f5e760db Mon Sep 17 00:00:00 2001 From: Roshan Khatri Date: Sat, 13 Apr 2024 03:28:07 +0000 Subject: [PATCH] release tool --- .github/workflows/build-release-packages.yml | 103 -- .../call-build-linux-arm-packages.yml | 78 -- .../call-build-linux-x86-packages.yml | 79 -- .../workflows/call-build-macos-packages.yml | 71 -- .github/workflows/ci.yml | 93 -- .github/workflows/codeql-analysis.yml | 38 - .github/workflows/coverity.yml | 33 - .github/workflows/daily.yml | 1054 ----------------- .github/workflows/external.yml | 88 -- .github/workflows/reply-schemas-linter.yml | 25 - .github/workflows/run-release-tool.yml | 85 ++ 11 files changed, 85 insertions(+), 1662 deletions(-) delete mode 100644 .github/workflows/build-release-packages.yml delete mode 100644 .github/workflows/call-build-linux-arm-packages.yml delete mode 100644 .github/workflows/call-build-linux-x86-packages.yml delete mode 100644 .github/workflows/call-build-macos-packages.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 .github/workflows/coverity.yml delete mode 100644 .github/workflows/daily.yml delete mode 100644 .github/workflows/external.yml delete mode 100644 .github/workflows/reply-schemas-linter.yml create mode 100644 .github/workflows/run-release-tool.yml diff --git a/.github/workflows/build-release-packages.yml b/.github/workflows/build-release-packages.yml deleted file mode 100644 index 7797b32d17..0000000000 --- a/.github/workflows/build-release-packages.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: Build Release Packages - -on: - push: - tags: - - '*' - - workflow_dispatch: - inputs: - version: - description: Version of Valkey to build - required: true - -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 - runs-on: ubuntu-latest - outputs: - version: ${{ steps.get_version.outputs.VERSION }} - steps: - - - run: | - echo "Version: ${{ inputs.version || github.ref_name }}" - shell: bash - - # This step is to consolidate the three different triggers into a single "version" - # 1. If manual dispatch - use the version provided. - # 3. If tag trigger, use that tag. - - name: Get the version - id: get_version - run: | - 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 - # only ever be a tag - INPUT_VERSION: ${{ inputs.version || github.ref_name }} - - generate-build-matrix: - name: Generating build matrix - runs-on: ubuntu-latest - outputs: - x86_64-build-matrix: ${{ steps.set-matrix.outputs.x86_64-build-matrix }} - arm64-build-matrix: ${{ steps.set-matrix.outputs.arm64-build-matrix }} - macos-build-matrix: ${{ steps.set-matrix.outputs.macos-build-matrix }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - # Set up the list of target to build so we can pass the JSON to the reusable job - - uses: ./.github/actions/generate-package-build-matrix - id: set-matrix - with: - ref: ${{ inputs.version || github.ref_name }} - - release-build-linux-x86-packages: - needs: - - release-build-get-meta - - generate-build-matrix - uses: ./.github/workflows/call-build-linux-x86-packages.yml - with: - 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 }} - 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 }} - - release-build-linux-arm-packages: - needs: - - release-build-get-meta - - generate-build-matrix - uses: ./.github/workflows/call-build-linux-arm-packages.yml - with: - version: ${{ needs.release-build-get-meta.outputs.version }} - ref: ${{ inputs.version || github.ref_name }} - build_matrix: ${{ needs.generate-build-matrix.outputs.arm64-build-matrix }} - 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 }} - - # release-build-linux-macos-packages: - # needs: - # - release-build-get-meta - # - generate-build-matrix - # uses: ./.github/workflows/call-build-macos-packages.yml - # with: - # version: ${{ needs.release-build-get-meta.outputs.version }} - # ref: ${{ inputs.version || github.ref_name }} - # build_matrix: ${{ needs.generate-build-matrix.outputs.macos-build-matrix }} - # 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 }} diff --git a/.github/workflows/call-build-linux-arm-packages.yml b/.github/workflows/call-build-linux-arm-packages.yml deleted file mode 100644 index ed31c9a994..0000000000 --- a/.github/workflows/call-build-linux-arm-packages.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Reusable workflow to build binary packages into S3 bucket - -on: - workflow_call: - inputs: - version: - description: The version of Valkey to create. - type: string - required: true - ref: - description: The commit, tag or branch of Valkey to checkout for building that creates the version above. - type: string - required: true - build_matrix: - description: The build targets to produce as a JSON matrix. - type: string - required: true - secrets: - token: - description: The Github token or similar to authenticate with. - 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 - -jobs: - build-valkey: - # Capture source tarball and generate checksum for it - name: Build package ${{ matrix.distro.target }} ${{ matrix.distro.arch }} - runs-on: 'ubuntu-latest' - permissions: - contents: read - strategy: - fail-fast: false - matrix: ${{ fromJSON(inputs.build_matrix) }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ inputs.version }} - - - name: Make Valkey - uses: uraimo/run-on-arch-action@v2 - with: - arch: aarch64 - distro: ${{matrix.distro.target}} - install: apt-get update && apt-get install -y build-essential libssl-dev - run: make -C src all BUILD_TLS=yes MALLOC=libc - - - name: Create Tarball and SHA256sums - run: | - TAR_FILE_NAME=valkey-${{inputs.version}}-${{matrix.distro.platform}}-${{ matrix.distro.arch}} - mkdir -p $TAR_FILE_NAME/bin $TAR_FILE_NAME/share - cp -rfv src/valkey-* $TAR_FILE_NAME/bin - cp -v /home/runner/work/valkey/valkey/COPYING $TAR_FILE_NAME/share/LICENSE - tar -czvf $TAR_FILE_NAME.tar.gz $TAR_FILE_NAME - 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 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/ \ No newline at end of file diff --git a/.github/workflows/call-build-linux-x86-packages.yml b/.github/workflows/call-build-linux-x86-packages.yml deleted file mode 100644 index f27ea87381..0000000000 --- a/.github/workflows/call-build-linux-x86-packages.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Reusable workflow to build binary packages into S3 bucket - -on: - workflow_call: - inputs: - version: - description: The version of Valkey to create. - type: string - required: true - ref: - description: The commit, tag or branch of Valkey to checkout for building that creates the version above. - type: string - required: true - build_matrix: - description: The build targets to produce as a JSON matrix. - type: string - required: true - secrets: - token: - description: The Github token or similar to authenticate with. - required: true - bucket: - description: The name of the S3 (US-East) 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 - -jobs: - build-valkey: - # Capture source tarball and generate checksum for it - name: Build package ${{ matrix.distro.target }} ${{ matrix.distro.arch }} - runs-on: 'ubuntu-latest' - permissions: - contents: read - strategy: - fail-fast: false - matrix: ${{ fromJSON(inputs.build_matrix) }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - 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" - - - name: Make Valkey - run: make -C src all BUILD_TLS=yes - - - name: Create Tarball and SHA256sums - run: | - TAR_FILE_NAME=valkey-${{inputs.version}}-${{matrix.distro.platform}}-${{ matrix.distro.arch}} - mkdir -p $TAR_FILE_NAME/bin $TAR_FILE_NAME/share - cp -rfv src/valkey-* $TAR_FILE_NAME/bin - cp -v /home/runner/work/valkey/valkey/COPYING $TAR_FILE_NAME/share/LICENSE - tar -czvf $TAR_FILE_NAME.tar.gz $TAR_FILE_NAME - 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 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/ \ No newline at end of file diff --git a/.github/workflows/call-build-macos-packages.yml b/.github/workflows/call-build-macos-packages.yml deleted file mode 100644 index 859232a8f2..0000000000 --- a/.github/workflows/call-build-macos-packages.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Reusable workflow to build binary packages into S3 bucket - -on: - workflow_call: - inputs: - version: - description: The version of Valkey to create. - type: string - required: true - ref: - description: The commit, tag or branch of Valkey to checkout for building that creates the version above. - type: string - required: true - build_matrix: - description: The build targets to produce as a JSON matrix. - type: string - required: true - secrets: - token: - description: The Github token or similar to authenticate with. - required: true - bucket: - description: The name of the S3 (US-East) 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 - -jobs: - build-valkey: - name: Build package ${{ matrix.distro.target }} ${{ matrix.distro.arch }} - runs-on: 'macos-latest' - permissions: - contents: read - strategy: - fail-fast: false - matrix: ${{ fromJSON(inputs.build_matrix) }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ inputs.version }} - - - name: Install dependencies - run: brew install openssl@3 - - - name: Make Valkey - run: make -C src all BUILD_TLS=yes FINAL_LIBS="-lm -ldl ../deps/hiredis/libhiredis_ssl.a /usr/local/opt/openssl/lib/libssl.a /usr/local/opt/openssl/lib/libcrypto.a" - - - name: Create Tarball and SHA256sums - run: | - TAR_FILE_NAME=valkey-${{inputs.version}}-${{matrix.distro.platform}}-${{ matrix.distro.arch}} - mkdir -p $TAR_FILE_NAME/bin $TAR_FILE_NAME/share - cp -rfv src/valkey-* $TAR_FILE_NAME/bin - cp -v COPYING $TAR_FILE_NAME/share/LICENSE - tar -czvf $TAR_FILE_NAME.tar.gz $TAR_FILE_NAME - shasum --algorithm 256 $TAR_FILE_NAME.tar.gz > $TAR_FILE_NAME.tar.gz.sha256 - mkdir -p packages-files - cp -rfv $TAR_FILE_NAME.tar* packages-files/ - - - name: Configure AWS credentials - run: | - aws configure set region us-east-1 - 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/ \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 137bd195c7..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: CI - -on: [push, pull_request] - -permissions: - contents: read - -jobs: - - test-ubuntu-latest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: make - # Fail build if there are warnings - # build with TLS just for compilation coverage - run: make SERVER_CFLAGS='-Werror' BUILD_TLS=yes - - name: test - run: | - sudo apt-get install tcl8.6 tclx - ./runtest --verbose --tags -slow --dump-logs - - name: module api test - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs - - name: validate commands.def up to date - run: | - touch src/commands/ping.json - make commands.def - dirty=$(git diff) - if [[ ! -z $dirty ]]; then echo $dirty; exit 1; fi - - test-sanitizer-address: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: make - # build with TLS module just for compilation coverage - run: make SANITIZER=address SERVER_CFLAGS='-Werror -DDEBUG_ASSERTIONS' BUILD_TLS=module - - name: testprep - # Work around ASAN issue, see https://github.com/google/sanitizers/issues/1716 - run: | - sudo apt-get install tcl8.6 tclx -y - sudo sysctl vm.mmap_rnd_bits=28 - - name: test - run: ./runtest --verbose --tags -slow --dump-logs - - name: module api test - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs - - build-debian-old: - runs-on: ubuntu-latest - container: debian:buster - steps: - - uses: actions/checkout@v4 - - name: make - run: | - apt-get update && apt-get install -y build-essential - make SERVER_CFLAGS='-Werror' - - build-macos-latest: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - name: make - run: make SERVER_CFLAGS='-Werror' - - build-32bit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: make - run: | - sudo apt-get update && sudo apt-get install libc6-dev-i386 - make SERVER_CFLAGS='-Werror' 32bit - - build-libc-malloc: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: make - run: make SERVER_CFLAGS='-Werror' MALLOC=libc - - build-centos7-jemalloc: - runs-on: ubuntu-latest - container: centos:7 - steps: - # on centos7, actions/checkout@v4 does not work, so we use v3 - # ref. https://github.com/actions/checkout/issues/1487 - - uses: actions/checkout@v3 - - - name: make - run: | - yum -y install gcc make - make SERVER_CFLAGS='-Werror' - diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 5055e6b8dc..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: "CodeQL" - -on: - pull_request: - schedule: - # run weekly new vulnerability was added to the database - - cron: '0 0 * * 0' - -permissions: - contents: read - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey' - permissions: - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'cpp' ] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml deleted file mode 100644 index d63ba6ab53..0000000000 --- a/.github/workflows/coverity.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Creates and uploads a Coverity build on a schedule -name: Coverity Scan -on: - schedule: - # Run once daily, since below 500k LOC can have 21 builds per week, per https://scan.coverity.com/faq#frequency - - cron: '0 0 * * *' - # Support manual execution - workflow_dispatch: -permissions: - contents: read -jobs: - coverity: - if: github.repository == 'valkey-io/valkey' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Download and extract the Coverity Build Tool - run: | - wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=valkey-io%2Fvalkey" -O cov-analysis-linux64.tar.gz - mkdir cov-analysis-linux64 - tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 - - name: Install Valkey dependencies - run: sudo apt install -y gcc procps libssl-dev - - name: Build with cov-build - run: cov-analysis-linux64/bin/cov-build --dir cov-int make - - name: Upload the result - run: | - tar czvf cov-int.tgz cov-int - curl \ - --form email=${{ secrets.COVERITY_SCAN_EMAIL }} \ - --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ - --form file=@cov-int.tgz \ - https://scan.coverity.com/builds?project=valkey-io%2Fvalkey diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml deleted file mode 100644 index 178d9b7ceb..0000000000 --- a/.github/workflows/daily.yml +++ /dev/null @@ -1,1054 +0,0 @@ -name: Daily - -on: - pull_request: - branches: - # any PR to a release branch. - - '[0-9].[0-9]' - schedule: - - cron: '0 0 * * *' - workflow_dispatch: - inputs: - skipjobs: - description: 'jobs to skip (delete the ones you wanna keep, do not leave empty)' - default: 'valgrind,sanitizer,tls,freebsd,macos,alpine,32bit,iothreads,ubuntu,centos,malloc,specific,fortify,reply-schema' - skiptests: - description: 'tests to skip (delete the ones you wanna keep, do not leave empty)' - default: 'valkey,modules,sentinel,cluster,unittest' - test_args: - description: 'extra test arguments' - default: '' - cluster_test_args: - description: 'extra cluster / sentinel test arguments' - default: '' - use_repo: - description: 'repo owner and name' - default: 'valkey-io/valkey' - use_git_ref: - description: 'git branch or sha to use' - default: 'unstable' - -permissions: - contents: read - -jobs: - - test-ubuntu-jemalloc: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'ubuntu') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SERVER_CFLAGS='-Werror -DSERVER_TEST' - - name: testprep - run: sudo apt-get install tcl8.6 tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') - run: ./src/valkey-server test all --accurate - - test-ubuntu-jemalloc-fortify: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'fortify') - container: ubuntu:lunar - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - apt-get update && apt-get install -y make gcc-13 - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 - make CC=gcc SERVER_CFLAGS='-Werror -DSERVER_TEST -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3' - - name: testprep - run: apt-get install -y tcl8.6 tclx procps - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') - run: ./src/valkey-server test all --accurate - - test-ubuntu-libc-malloc: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'malloc') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make MALLOC=libc SERVER_CFLAGS='-Werror' - - name: testprep - run: sudo apt-get install tcl8.6 tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - test-ubuntu-no-malloc-usable-size: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'malloc') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make MALLOC=libc CFLAGS=-DNO_MALLOC_USABLE_SIZE SERVER_CFLAGS='-Werror' - - name: testprep - run: sudo apt-get install tcl8.6 tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - test-ubuntu-32bit: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, '32bit') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - sudo apt-get update && sudo apt-get install libc6-dev-i386 - make 32bit SERVER_CFLAGS='-Werror -DSERVER_TEST' - - name: testprep - run: sudo apt-get install tcl8.6 tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: | - make -C tests/modules 32bit # the script below doesn't have an argument, we must build manually ahead of time - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') - run: ./src/valkey-server test all --accurate - - test-ubuntu-tls: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'tls') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - make BUILD_TLS=yes SERVER_CFLAGS='-Werror' - - name: testprep - run: | - sudo apt-get install tcl8.6 tclx tcl-tls - ./utils/gen-test-certs.sh - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: | - ./runtest --accurate --verbose --dump-logs --tls --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: | - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --tls --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: | - ./runtest-sentinel --tls ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: | - ./runtest-cluster --tls ${{github.event.inputs.cluster_test_args}} - - test-ubuntu-tls-no-tls: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'tls') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - make BUILD_TLS=yes SERVER_CFLAGS='-Werror' - - name: testprep - run: | - sudo apt-get install tcl8.6 tclx tcl-tls - ./utils/gen-test-certs.sh - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: | - ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: | - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: | - ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: | - ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - test-ubuntu-io-threads: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'iothreads') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - make SERVER_CFLAGS='-Werror' - - name: testprep - run: sudo apt-get install tcl8.6 tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --config io-threads 4 --config io-threads-do-reads yes --accurate --verbose --tags network --dump-logs ${{github.event.inputs.test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster --config io-threads 4 --config io-threads-do-reads yes ${{github.event.inputs.cluster_test_args}} - - test-ubuntu-reclaim-cache: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'specific') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - make SERVER_CFLAGS='-Werror' - - name: testprep - run: | - sudo apt-get install vmtouch - mkdir /tmp/master - mkdir /tmp/slave - - name: warm up - run: | - ./src/valkey-server --daemonize yes --logfile /dev/null - ./src/valkey-benchmark -n 1 > /dev/null - ./src/valkey-cli save | grep OK > /dev/null - vmtouch -v ./dump.rdb > /dev/null - - name: test - run: | - echo "test SAVE doesn't increase cache" - CACHE0=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}') - echo "$CACHE0" - ./src/valkey-server --daemonize yes --logfile /dev/null --dir /tmp/master --port 8080 --repl-diskless-sync no --pidfile /tmp/master/valkey.pid --rdbcompression no --enable-debug-command yes - ./src/valkey-cli -p 8080 debug populate 10000 k 102400 - ./src/valkey-server --daemonize yes --logfile /dev/null --dir /tmp/slave --port 8081 --repl-diskless-load disabled --rdbcompression no - ./src/valkey-cli -p 8080 save > /dev/null - VMOUT=$(vmtouch -v /tmp/master/dump.rdb) - echo $VMOUT - grep -q " 0%" <<< $VMOUT - CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}') - echo "$CACHE" - if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi - - echo "test replication doesn't increase cache" - ./src/valkey-cli -p 8081 REPLICAOF 127.0.0.1 8080 > /dev/null - while [ $(./src/valkey-cli -p 8081 info replication | grep "master_link_status:down") ]; do sleep 1; done; - sleep 1 # wait for the completion of cache reclaim bio - VMOUT=$(vmtouch -v /tmp/master/dump.rdb) - echo $VMOUT - grep -q " 0%" <<< $VMOUT - VMOUT=$(vmtouch -v /tmp/slave/dump.rdb) - echo $VMOUT - grep -q " 0%" <<< $VMOUT - CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}') - echo "$CACHE" - if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi - - echo "test reboot doesn't increase cache" - PID=$(cat /tmp/master/valkey.pid) - kill -15 $PID - while [ -x /proc/${PID} ]; do sleep 1; done - ./src/valkey-server --daemonize yes --logfile /dev/null --dir /tmp/master --port 8080 - while [ $(./src/valkey-cli -p 8080 info persistence | grep "loading:1") ]; do sleep 1; done; - sleep 1 # wait for the completion of cache reclaim bio - VMOUT=$(vmtouch -v /tmp/master/dump.rdb) - echo $VMOUT - grep -q " 0%" <<< $VMOUT - CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}') - echo "$CACHE" - if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi - - test-valgrind-test: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'valgrind') && !contains(github.event.inputs.skiptests, 'valkey') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make valgrind SERVER_CFLAGS='-Werror -DSERVER_TEST' - - name: testprep - run: | - sudo apt-get update - sudo apt-get install tcl8.6 tclx valgrind -y - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{github.event.inputs.test_args}} - - test-valgrind-misc: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'valgrind') && !(contains(github.event.inputs.skiptests, 'modules') && contains(github.event.inputs.skiptests, 'unittest')) - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make valgrind SERVER_CFLAGS='-Werror -DSERVER_TEST' - - name: testprep - run: | - sudo apt-get update - sudo apt-get install tcl8.6 tclx valgrind -y - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{github.event.inputs.test_args}} - - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') - run: | - valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/valkey-server test all --valgrind - if grep -q 0x err.txt; then cat err.txt; exit 1; fi - - test-valgrind-no-malloc-usable-size-test: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'valgrind') && !contains(github.event.inputs.skiptests, 'valkey') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make valgrind CFLAGS="-DNO_MALLOC_USABLE_SIZE -DSERVER_TEST" SERVER_CFLAGS='-Werror' - - name: testprep - run: | - sudo apt-get update - sudo apt-get install tcl8.6 tclx valgrind -y - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{github.event.inputs.test_args}} - - test-valgrind-no-malloc-usable-size-misc: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'valgrind') && !(contains(github.event.inputs.skiptests, 'modules') && contains(github.event.inputs.skiptests, 'unittest')) - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make valgrind CFLAGS="-DNO_MALLOC_USABLE_SIZE -DSERVER_TEST" SERVER_CFLAGS='-Werror' - - name: testprep - run: | - sudo apt-get update - sudo apt-get install tcl8.6 tclx valgrind -y - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 --timeout 2400 --dump-logs ${{github.event.inputs.test_args}} - - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') - run: | - valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/valkey-server test all --valgrind - if grep -q 0x err.txt; then cat err.txt; exit 1; fi - - test-sanitizer-address: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'sanitizer') - timeout-minutes: 14400 - strategy: - matrix: - compiler: [ gcc, clang ] - env: - CC: ${{ matrix.compiler }} - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SANITIZER=address SERVER_CFLAGS='-DSERVER_TEST -Werror -DDEBUG_ASSERTIONS' - - name: testprep - # Work around ASAN issue, see https://github.com/google/sanitizers/issues/1716 - run: | - sudo apt-get update - sudo apt-get install tcl8.6 tclx -y - sudo sysctl vm.mmap_rnd_bits=28 - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') - run: ./src/valkey-server test all - - test-sanitizer-undefined: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'sanitizer') - timeout-minutes: 14400 - strategy: - matrix: - compiler: [ gcc, clang ] - env: - CC: ${{ matrix.compiler }} - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SANITIZER=undefined SERVER_CFLAGS='-DSERVER_TEST -Werror' LUA_DEBUG=yes # we (ab)use this flow to also check Lua C API violations - - name: testprep - run: | - sudo apt-get update - sudo apt-get install tcl8.6 tclx -y - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - name: unittest - if: true && !contains(github.event.inputs.skiptests, 'unittest') - run: ./src/valkey-server test all --accurate - - test-centos7-jemalloc: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'centos') - container: centos:7 - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v3 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - yum -y install gcc make - make SERVER_CFLAGS='-Werror' - - name: testprep - run: yum -y install which tcl tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - test-centos7-tls-module: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'tls') - container: centos:7 - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v3 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - yum -y install centos-release-scl epel-release - yum -y install devtoolset-7 openssl-devel openssl - scl enable devtoolset-7 "make BUILD_TLS=module SERVER_CFLAGS='-Werror'" - - name: testprep - run: | - yum -y install tcl tcltls tclx - ./utils/gen-test-certs.sh - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: | - ./runtest --accurate --verbose --dump-logs --tls-module --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: | - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --tls-module --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: | - ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: | - ./runtest-cluster --tls-module ${{github.event.inputs.cluster_test_args}} - - test-centos7-tls-module-no-tls: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'tls') - container: centos:7 - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v3 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - yum -y install centos-release-scl epel-release - yum -y install devtoolset-7 openssl-devel openssl - scl enable devtoolset-7 "make BUILD_TLS=module SERVER_CFLAGS='-Werror'" - - name: testprep - run: | - yum -y install tcl tcltls tclx - ./utils/gen-test-certs.sh - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: | - ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: | - CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: | - ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: | - ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - test-macos-latest: - runs-on: macos-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'macos') && !(contains(github.event.inputs.skiptests, 'valkey') && contains(github.event.inputs.skiptests, 'modules')) - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SERVER_CFLAGS='-Werror' - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}} - - test-macos-latest-sentinel: - runs-on: macos-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skiptests, 'sentinel') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SERVER_CFLAGS='-Werror' - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - test-macos-latest-cluster: - runs-on: macos-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skiptests, 'cluster') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SERVER_CFLAGS='-Werror' - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - build-macos: - strategy: - matrix: - os: [macos-11, macos-13] - runs-on: ${{ matrix.os }} - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'macos') - timeout-minutes: 14400 - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SERVER_CFLAGS='-Werror -DSERVER_TEST' - - test-freebsd: - runs-on: macos-12 - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'freebsd') - timeout-minutes: 14400 - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: test - uses: cross-platform-actions/action@v0.22.0 - with: - operating_system: freebsd - environment_variables: MAKE - version: 13.2 - shell: bash - run: | - sudo pkg install -y bash gmake lang/tcl86 lang/tclx - gmake - ./runtest --single unit/keyspace --single unit/auth --single unit/networking --single unit/protocol - - test-alpine-jemalloc: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'alpine') - container: alpine:latest - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - apk add build-base - make SERVER_CFLAGS='-Werror' - - name: testprep - run: apk add tcl procps tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - test-alpine-libc-malloc: - runs-on: ubuntu-latest - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'alpine') - container: alpine:latest - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: | - apk add build-base - make SERVER_CFLAGS='-Werror' USE_JEMALLOC=no CFLAGS=-DUSE_MALLOC_USABLE_SIZE - - name: testprep - run: apk add tcl procps tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}} - - reply-schemas-validator: - runs-on: ubuntu-latest - timeout-minutes: 14400 - if: | - (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) && - !contains(github.event.inputs.skipjobs, 'reply-schema') - steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@v4 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SERVER_CFLAGS='-Werror -DLOG_REQ_RES' - - name: testprep - run: sudo apt-get install tcl8.6 tclx - - name: test - if: true && !contains(github.event.inputs.skiptests, 'valkey') - run: ./runtest --log-req-res --no-latency --dont-clean --force-resp3 --tags -slow --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: CFLAGS='-Werror' ./runtest-moduleapi --log-req-res --no-latency --dont-clean --force-resp3 --dont-pre-clean --verbose --dump-logs ${{github.event.inputs.test_args}} - - name: sentinel tests - if: true && !contains(github.event.inputs.skiptests, 'sentinel') - run: ./runtest-sentinel --log-req-res --dont-clean --force-resp3 ${{github.event.inputs.cluster_test_args}} - - name: cluster tests - if: true && !contains(github.event.inputs.skiptests, 'cluster') - run: ./runtest-cluster --log-req-res --dont-clean --force-resp3 ${{github.event.inputs.cluster_test_args}} - - name: Install Python dependencies - uses: py-actions/py-dependency-install@v4 - with: - path: "./utils/req-res-validator/requirements.txt" - - name: validator - run: ./utils/req-res-log-validator.py --verbose --fail-missing-reply-schemas ${{ (!contains(github.event.inputs.skiptests, 'valkey') && !contains(github.event.inputs.skiptests, 'module') && !contains(github.event.inputs.sentinel, 'valkey') && !contains(github.event.inputs.skiptests, 'cluster')) && github.event.inputs.test_args == '' && github.event.inputs.cluster_test_args == '' && '--fail-commands-not-all-hit' || '' }} - diff --git a/.github/workflows/external.yml b/.github/workflows/external.yml deleted file mode 100644 index 8111c5e6cd..0000000000 --- a/.github/workflows/external.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: External Server Tests - -on: - pull_request: - push: - schedule: - - cron: '0 0 * * *' - -permissions: - contents: read - -jobs: - test-external-standalone: - runs-on: ubuntu-latest - if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey' - timeout-minutes: 14400 - steps: - - uses: actions/checkout@v4 - - name: Build - run: make SERVER_CFLAGS=-Werror - - name: Start valkey-server - run: | - ./src/valkey-server --daemonize yes --save "" --logfile external-server.log \ - --enable-protected-configs yes --enable-debug-command yes --enable-module-command yes - - name: Run external test - run: | - ./runtest \ - --host 127.0.0.1 --port 6379 \ - --verbose \ - --tags -slow - - name: Archive server log - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: test-external-standalone-log - path: external-server.log - - test-external-cluster: - runs-on: ubuntu-latest - if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey' - timeout-minutes: 14400 - steps: - - uses: actions/checkout@v4 - - name: Build - run: make SERVER_CFLAGS=-Werror - - name: Start valkey-server - run: | - ./src/valkey-server --cluster-enabled yes --daemonize yes --save "" --logfile external-server.log \ - --enable-protected-configs yes --enable-debug-command yes --enable-module-command yes - - name: Create a single node cluster - run: ./src/valkey-cli cluster addslots $(for slot in {0..16383}; do echo $slot; done); sleep 5 - - name: Run external test - run: | - ./runtest \ - --host 127.0.0.1 --port 6379 \ - --verbose \ - --cluster-mode \ - --tags -slow - - name: Archive server log - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: test-external-cluster-log - path: external-server.log - - test-external-nodebug: - runs-on: ubuntu-latest - if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey' - timeout-minutes: 14400 - steps: - - uses: actions/checkout@v4 - - name: Build - run: make SERVER_CFLAGS=-Werror - - name: Start valkey-server - run: | - ./src/valkey-server --daemonize yes --save "" --logfile external-server.log - - name: Run external test - run: | - ./runtest \ - --host 127.0.0.1 --port 6379 \ - --verbose \ - --tags "-slow -needs:debug" - - name: Archive server log - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: test-external-nodebug-log - path: external-server.log diff --git a/.github/workflows/reply-schemas-linter.yml b/.github/workflows/reply-schemas-linter.yml deleted file mode 100644 index eb14a27204..0000000000 --- a/.github/workflows/reply-schemas-linter.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Reply-schemas linter - -on: - push: - paths: - - 'src/commands/*.json' - pull_request: - paths: - - 'src/commands/*.json' - -permissions: - contents: read - -jobs: - reply-schemas-linter: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup nodejs - uses: actions/setup-node@v4 - - name: Install packages - run: npm install ajv - - name: linter - run: node ./utils/reply_schema_linter.js - diff --git a/.github/workflows/run-release-tool.yml b/.github/workflows/run-release-tool.yml new file mode 100644 index 0000000000..4f5b713457 --- /dev/null +++ b/.github/workflows/run-release-tool.yml @@ -0,0 +1,85 @@ +name: Release Source Code + +on: + push: + tags: + - '*' + + workflow_dispatch: + inputs: + tag: + description: Tag of Valkey to release + required: true + +jobs: + get-tag: + name: Get metadata to build + runs-on: ubuntu-latest + outputs: + TAG: ${{ steps.get_tag.outputs.TAG }} + steps: + + - run: | + echo "TAG: ${{ inputs.tag || github.ref_name }}" + shell: bash + + # This step is to consolidate the three different triggers into a single "TAG" + # 1. If manual dispatch - use the tag provided. + # 3. If tag trigger, use that tag. + - name: Get the Tag + id: get_tag + run: | + TAG="${INPUT_TAG}" + if [ -z "${TAG}" ]; then + false + fi + echo "TAG=$TAG" >> $GITHUB_OUTPUT + shell: bash + env: + # Use the dispatch variable in preference, if empty use the context ref_name which should + # only ever be a tag + INPUT_TAG: ${{ inputs.tag || github.ref_name }} + + + create-source-code-tarball: + runs-on: 'ubuntu-latest' + needs: get-tag + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ needs.get-tag.outputs.TAG }} + + - name: Create Tarball and sha256 + run: | + TAG=${{needs.get-tag.outputs.TAG}} + TARNAME="valkey-${TAG}.tar" + echo "Generating /tmp/${TARNAME}" + git archive $TAG --prefix valkey-${TAG}/ > /tmp/$TARNAME || exit 1 + echo "Gizipping the archive" + rm -f /tmp/$TARNAME.gz + gzip -9 /tmp/$TARNAME + sha256sum /tmp/$TARNAME.gz > /tmp/$TARNAME.gz.sha256 + mkdir -p packages-files + cp -rfv /tmp/$TARNAME* packages-files/ + cp -rfv packages-files/$TARNAME.gz packages-files/$valkey_stable.tar.gz + sha256sum packages-files/$valkey_stable.tar.gz > /packages-files/$valkey_stable.tar.gz.sha256 + + - name: Configure AWS credentials + run: | + aws configure set region us-east-1 + aws configure set aws_access_key_id ${{ secrets.AWS_S3_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_S3_ACCESS_KEY }} + + - name: Sync to S3 + run: aws s3 sync packages-files s3://${{secrets.AWS_S3_BUCKET}}/releases/ + + - name: Release hash + uses: passeidireto/trigger-external-workflow-action@main + env: + PAYLOAD_TAG: ${{needs.get-tag.outputs.TAG}} + with: + repository: roshkhatri/valkey-hashes + event: release_hash + github_pat: ${{ secrets.WORKFLOW_PAT }} +