From a81fd2f6b96428e92c21b4e2804db111da3d27d7 Mon Sep 17 00:00:00 2001 From: Twice Date: Sun, 2 Feb 2025 13:42:59 +0800 Subject: [PATCH] ci: add an alpine-based build & test workflow (#2760) --- .github/workflows/kvrocks.yaml | 15 +++++++++++++-- src/storage/redis_metadata.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kvrocks.yaml b/.github/workflows/kvrocks.yaml index 521508d33fb..cc441af359c 100644 --- a/.github/workflows/kvrocks.yaml +++ b/.github/workflows/kvrocks.yaml @@ -443,6 +443,10 @@ jobs: - name: Debian 12 image: debian:12 compiler: gcc + - name: Alpine 3 + image: alpine:3 + compiler: gcc + disable_jemalloc: -DDISABLE_JEMALLOC=ON runs-on: ubuntu-22.04 container: @@ -498,6 +502,13 @@ jobs: apt install -y bash build-essential cmake curl git libssl-dev libtool python3 python3-pip wget echo "NPROC=$(nproc)" >> $GITHUB_ENV + - name: Setup Alpine + if: ${{ startsWith(matrix.image, 'alpine') }} + run: | + apk update + apk add bash cmake curl git python3 wget make gcc g++ autoconf linux-headers py3-pip py3-redis + echo "NPROC=$(nproc)" >> $GITHUB_ENV + - name: Cache redis id: cache-redis uses: actions/cache@v4 @@ -533,7 +544,7 @@ jobs: - name: Build Kvrocks run: | - ./x.py build -j$NPROC --unittest --compiler ${{ matrix.compiler }} + ./x.py build -j$NPROC --unittest --compiler ${{ matrix.compiler }} ${{ matrix.disable_jemalloc }} - name: Run Unit Test run: | @@ -546,7 +557,7 @@ jobs: ./x.py test go build $GOCASE_RUN_ARGS - name: Install redis-py for openSUSE and Rocky - if: ${{ !startsWith(matrix.image, 'archlinux') && !startsWith(matrix.image, 'debian') }} + if: ${{ !startsWith(matrix.image, 'archlinux') && !startsWith(matrix.image, 'debian') && !startsWith(matrix.image, 'alpine') }} run: pip3 install redis==4.3.6 - name: Install redis-py for Debian diff --git a/src/storage/redis_metadata.h b/src/storage/redis_metadata.h index cba9df80cb5..69a0db1cc52 100644 --- a/src/storage/redis_metadata.h +++ b/src/storage/redis_metadata.h @@ -21,6 +21,7 @@ #pragma once #include +#include #include #include