You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by ti...@apache.org on 2022/06/30 01:38:18 UTC
[incubator-kvrocks] branch unstable updated: ci: separate daily ci and trigger daily ci only if labeled (#695)
This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 3d4a3dd ci: separate daily ci and trigger daily ci only if labeled (#695)
3d4a3dd is described below
commit 3d4a3dd70bd00c3164531754be5d645c21fcd9c4
Author: tison <wa...@gmail.com>
AuthorDate: Thu Jun 30 09:38:13 2022 +0800
ci: separate daily ci and trigger daily ci only if labeled (#695)
Signed-off-by: tison <wa...@gmail.com>
---
.github/workflows/daily-ci.yaml | 101 ++--------------------------------------
.github/workflows/kvrocks.yaml | 40 ++++++++++++++--
2 files changed, 41 insertions(+), 100 deletions(-)
diff --git a/.github/workflows/daily-ci.yaml b/.github/workflows/daily-ci.yaml
index 9fdc72e..5d043c4 100644
--- a/.github/workflows/daily-ci.yaml
+++ b/.github/workflows/daily-ci.yaml
@@ -19,22 +19,22 @@ name: Daily CI
on:
pull_request:
- paths:
- - ".github/workflows/daily-ci.yaml"
+ types: [opened, synchronize, reopened, labeled]
schedule:
- # Daily run this action at 1am
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
build-docker-image:
name: Build Docker Image
+ if: |
+ (github.event_name != 'pull_request') ||
+ (github.event.action == 'labeled' && github.event.label.name == 'needs-daily-ci') ||
+ (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'needs-daily-ci'))
runs-on: ubuntu-18.04
steps:
- name: Checkout Code Base
uses: actions/checkout@v3
- with:
- fetch-depth: 64
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
@@ -49,94 +49,3 @@ jobs:
- name: Build Docker Image
run: |
docker buildx build --platform linux/amd64,linux/arm64 .
-
- build-and-test:
- name: Build And Test
- strategy:
- fail-fast: false
- matrix:
- include:
- - name: Ubuntu GCC ASan
- os: ubuntu-18.04
- with_sanitizer: -DENABLE_ASAN=ON
- # - name: Ubuntu GCC TSan
- # os: ubuntu-18.04
- # with_sanitizer: -DENABLE_TSAN=ON
- - name: Ubuntu GCC without Jemalloc
- os: ubuntu-18.04
- without_jemalloc: -DDISABLE_JEMALLOC=ON
- - name: Ubuntu Clang ASan
- os: ubuntu-18.04
- with_sanitizer: -DENABLE_ASAN=ON
- clang: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- # - name: Ubuntu Clang TSan
- # os: ubuntu-18.04
- # with_sanitizer: -DENABLE_TSAN=ON
- # clang: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- - name: Ubuntu Clang without Jemalloc
- os: ubuntu-18.04
- without_jemalloc: -DDISABLE_JEMALLOC=ON
- clang: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- - name: Ubuntu GCC Ninja
- os: ubuntu-18.04
- with_ninja: --ninja
- - name: Ubuntu GCC Ninja without Jemalloc
- os: ubuntu-18.04
- with_ninja: --ninja
- without_jemalloc: -DDISABLE_JEMALLOC=ON
- - name: MacOS Clang
- os: macos-latest
- - name: MacOS Clang without Jemalloc
- os: macos-latest
- without_jemalloc: -DDISABLE_JEMALLOC=ON
-
- runs-on: ${{ matrix.os }}
- steps:
- - name: Cache redis
- id: cache-redis
- uses: actions/cache@v2
- with:
- path: |
- ~/local/bin/redis-cli
- key: ${{ runner.os }}-redis-cli
-
- - name: Setup macOS
- if: ${{ startsWith(matrix.os, 'macos') }}
- run: |
- brew install cmake gcc autoconf automake libtool
- echo "NPROC=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
-
- - name: Setup Linux
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
- run: |
- sudo apt update
- sudo apt install -y tcl8.5
- echo "NPROC=$(nproc)" >> $GITHUB_ENV
-
- - name: Install Ninja
- if: ${{ matrix.with_ninja && startsWith(matrix.os, 'ubuntu') }}
- run: sudo apt install -y ninja-build
-
- - name: Install redis
- if: steps.cache-redis.outputs.cache-hit != 'true'
- run: |
- curl -O https://download.redis.io/releases/redis-6.2.6.tar.gz
- tar -xzvf redis-6.2.6.tar.gz
- mkdir -p $HOME/local/bin
- pushd redis-6.2.6 && BUILD_TLS=yes make -j$NPROC redis-cli && mv src/redis-cli $HOME/local/bin/ && popd
-
- - name: Checkout Code Base
- uses: actions/checkout@v3
-
- - name: Build Kvrocks
- run: |
- ./build.sh build -j$NPROC --unittest \
- ${{ matrix.clang }} ${{ matrix.with_ninja }} ${{ matrix.with_sanitizer }} ${{ matrix.without_jemalloc }}
-
- - name: Run Unit Test
- run: ./build/unittest
-
- - name: Run Redis Tcl Test
- run: |
- cp $HOME/local/bin/redis-cli tests/tcl/redis-cli
- cd tests/tcl && ./runtest
diff --git a/.github/workflows/kvrocks.yaml b/.github/workflows/kvrocks.yaml
index c344ee3..7b234c8 100644
--- a/.github/workflows/kvrocks.yaml
+++ b/.github/workflows/kvrocks.yaml
@@ -60,15 +60,47 @@ jobs:
name: Build and test
needs: [license, lint]
strategy:
+ fail-fast: false
matrix:
include:
+ - name: Darwin Clang
+ os: macos-latest
+ - name: Darwin Clang without Jemalloc
+ os: macos-latest
+ without_jemalloc: -DDISABLE_JEMALLOC=ON
- name: Ubuntu GCC
os: ubuntu-18.04
- name: Ubuntu Clang
os: ubuntu-18.04
clang: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- - name: macOS AppleClang
- os: macos-latest
+ - name: Ubuntu GCC ASan
+ os: ubuntu-18.04
+ with_sanitizer: -DENABLE_ASAN=ON
+ # - name: Ubuntu GCC TSan
+ # os: ubuntu-18.04
+ # with_sanitizer: -DENABLE_TSAN=ON
+ - name: Ubuntu GCC without Jemalloc
+ os: ubuntu-18.04
+ without_jemalloc: -DDISABLE_JEMALLOC=ON
+ - name: Ubuntu Clang ASan
+ os: ubuntu-18.04
+ with_sanitizer: -DENABLE_ASAN=ON
+ clang: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
+ # - name: Ubuntu Clang TSan
+ # os: ubuntu-18.04
+ # with_sanitizer: -DENABLE_TSAN=ON
+ # clang: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
+ - name: Ubuntu Clang without Jemalloc
+ os: ubuntu-18.04
+ without_jemalloc: -DDISABLE_JEMALLOC=ON
+ clang: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
+ - name: Ubuntu GCC Ninja
+ os: ubuntu-18.04
+ with_ninja: --ninja
+ - name: Ubuntu GCC Ninja without Jemalloc
+ os: ubuntu-18.04
+ with_ninja: --ninja
+ without_jemalloc: -DDISABLE_JEMALLOC=ON
runs-on: ${{ matrix.os }}
steps:
@@ -90,7 +122,7 @@ jobs:
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
- sudo apt install -y tcl8.5
+ sudo apt install -y tcl8.5 ninja-build
echo "NPROC=$(nproc)" >> $GITHUB_ENV
- name: Install redis
@@ -105,7 +137,7 @@ jobs:
uses: actions/checkout@v3
- name: Build Kvrocks
- run: ./build.sh build -j$NPROC --unittest ${{ matrix.clang }}
+ run: ./build.sh build -j$NPROC --unittest ${{ matrix.clang }} ${{ matrix.with_ninja }} ${{ matrix.with_sanitizer }} ${{ matrix.without_jemalloc }}
- name: Run Unit Test
run: ./build/unittest