Skip to content

Commit

Permalink
Add daily build to option to specify redis repo and branch (RedisLabs…
Browse files Browse the repository at this point in the history
…#581)

Add daily build to option to specify redis repo and branch
  • Loading branch information
tezc committed Mar 7, 2023
1 parent ebf25a1 commit a28121b
Showing 1 changed file with 110 additions and 60 deletions.
170 changes: 110 additions & 60 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@ on:
description: 'jobs to skip (delete the ones you want to keep, do not leave empty)'
required: false
default: 'address,undefined,macos,tls,elle,alpine'
use_repo:
description: 'repo owner and name'
redisraft_repo:
description: 'redisraft repo owner and name'
required: false
default: 'redisLabs/redisraft'
use_git_ref:
description: 'git branch or sha to use'
redisraft_branch:
description: 'redisraft git branch or sha to use'
required: false
default: 'master'
redis_repo:
description: 'redis repo owner and name'
required: false
default: 'redis/redis'
redis_branch:
description: 'redis git branch or sha to use'
required: false
default: 'unstable'
pytest_args:
description: 'additional pytest args (e.g. run tests matching a regex n times: -k lua --repeat 3)'
required: false
Expand All @@ -30,15 +38,21 @@ jobs:
(github.event_name == 'schedule' && github.repository == 'redislabs/redisraft')) && !contains(github.event.inputs.skipjobs, 'elle')
timeout-minutes: 14400
steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
- name: Set variables
env:
DEFAULT_REDIS_REPO: redis/redis
DEFAULT_REDIS_BRANCH: unstable
DEFAULT_REDISRAFT_REPO: redislabs/redisraft
DEFAULT_REDISRAFT_BRANCH: master
run: |
echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV
echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
echo "REDIS_REPO=${{github.event.inputs.redis_repo || env.DEFAULT_REDIS_REPO}}" >> $GITHUB_ENV
echo "REDIS_BRANCH=${{github.event.inputs.redis_branch || env.DEFAULT_REDIS_BRANCH}}" >> $GITHUB_ENV
echo "REDISRAFT_REPO=${{github.event.inputs.redisraft_repo || env.DEFAULT_REDISRAFT_REPO}}" >> $GITHUB_ENV
echo "REDISRAFT_BRANCH=${{github.event.inputs.redisraft_branch || env.DEFAULT_REDISRAFT_BRANCH}}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
repository: ${{ env.REDISRAFT_REPO }}
ref: ${{ env.REDISRAFT_BRANCH }}
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential autoconf automake libtool cmake lcov leiningen default-jdk-headless
- name: Build
Expand All @@ -49,8 +63,8 @@ jobs:
- name: Checkout Redis
uses: actions/checkout@v2
with:
repository: 'redis/redis'
ref: 'unstable'
repository: ${{ env.REDIS_REPO }}
ref: ${{ env.REDIS_BRANCH }}
path: 'redis'
- name: Build Redis
run: cd redis && make -j 4
Expand Down Expand Up @@ -82,15 +96,21 @@ jobs:
(github.event_name == 'schedule' && github.repository == 'redislabs/redisraft')) && !contains(github.event.inputs.skipjobs, 'address')
timeout-minutes: 14400
steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
- name: Set variables
env:
DEFAULT_REDIS_REPO: redis/redis
DEFAULT_REDIS_BRANCH: unstable
DEFAULT_REDISRAFT_REPO: redislabs/redisraft
DEFAULT_REDISRAFT_BRANCH: master
run: |
echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV
echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
echo "REDIS_REPO=${{github.event.inputs.redis_repo || env.DEFAULT_REDIS_REPO}}" >> $GITHUB_ENV
echo "REDIS_BRANCH=${{github.event.inputs.redis_branch || env.DEFAULT_REDIS_BRANCH}}" >> $GITHUB_ENV
echo "REDISRAFT_REPO=${{github.event.inputs.redisraft_repo || env.DEFAULT_REDISRAFT_REPO}}" >> $GITHUB_ENV
echo "REDISRAFT_BRANCH=${{github.event.inputs.redisraft_branch || env.DEFAULT_REDISRAFT_BRANCH}}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
repository: ${{ env.REDISRAFT_REPO }}
ref: ${{ env.REDISRAFT_BRANCH }}
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential autoconf automake libtool cmake lcov
- name: Build
Expand All @@ -101,8 +121,8 @@ jobs:
- name: Checkout Redis
uses: actions/checkout@v2
with:
repository: 'redis/redis'
ref: 'unstable'
repository: ${{ env.REDIS_REPO }}
ref: ${{ env.REDIS_BRANCH }}
path: 'redis'
- name: Build Redis
run: cd redis && make -j 4 SANITIZER=address
Expand All @@ -126,15 +146,21 @@ jobs:
(github.event_name == 'schedule' && github.repository == 'redislabs/redisraft')) && !contains(github.event.inputs.skipjobs, 'undefined')
timeout-minutes: 14400
steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
- name: Set variables
env:
DEFAULT_REDIS_REPO: redis/redis
DEFAULT_REDIS_BRANCH: unstable
DEFAULT_REDISRAFT_REPO: redislabs/redisraft
DEFAULT_REDISRAFT_BRANCH: master
run: |
echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV
echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
echo "REDIS_REPO=${{github.event.inputs.redis_repo || env.DEFAULT_REDIS_REPO}}" >> $GITHUB_ENV
echo "REDIS_BRANCH=${{github.event.inputs.redis_branch || env.DEFAULT_REDIS_BRANCH}}" >> $GITHUB_ENV
echo "REDISRAFT_REPO=${{github.event.inputs.redisraft_repo || env.DEFAULT_REDISRAFT_REPO}}" >> $GITHUB_ENV
echo "REDISRAFT_BRANCH=${{github.event.inputs.redisraft_branch || env.DEFAULT_REDISRAFT_BRANCH}}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
repository: ${{ env.REDISRAFT_REPO }}
ref: ${{ env.REDISRAFT_BRANCH }}
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential autoconf automake libtool cmake lcov
- name: Build
Expand All @@ -145,8 +171,8 @@ jobs:
- name: Checkout Redis
uses: actions/checkout@v2
with:
repository: 'redis/redis'
ref: 'unstable'
repository: ${{ env.REDIS_REPO }}
ref: ${{ env.REDIS_BRANCH }}
path: 'redis'
- name: Build Redis
run: cd redis && make -j 4 SANITIZER=undefined
Expand All @@ -170,15 +196,21 @@ jobs:
(github.event_name == 'schedule' && github.repository == 'redislabs/redisraft')) && !contains(github.event.inputs.skipjobs, 'macos')
timeout-minutes: 14400
steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
- name: Set variables
env:
DEFAULT_REDIS_REPO: redis/redis
DEFAULT_REDIS_BRANCH: unstable
DEFAULT_REDISRAFT_REPO: redislabs/redisraft
DEFAULT_REDISRAFT_BRANCH: master
run: |
echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV
echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
echo "REDIS_REPO=${{github.event.inputs.redis_repo || env.DEFAULT_REDIS_REPO}}" >> $GITHUB_ENV
echo "REDIS_BRANCH=${{github.event.inputs.redis_branch || env.DEFAULT_REDIS_BRANCH}}" >> $GITHUB_ENV
echo "REDISRAFT_REPO=${{github.event.inputs.redisraft_repo || env.DEFAULT_REDISRAFT_REPO}}" >> $GITHUB_ENV
echo "REDISRAFT_BRANCH=${{github.event.inputs.redisraft_branch || env.DEFAULT_REDISRAFT_BRANCH}}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
repository: ${{ env.REDISRAFT_REPO }}
ref: ${{ env.REDISRAFT_BRANCH }}
- name: Install build dependencies
run: brew install autoconf automake
- name: Build
Expand All @@ -189,8 +221,8 @@ jobs:
- name: Checkout Redis
uses: actions/checkout@v2
with:
repository: 'redis/redis'
ref: 'unstable'
repository: ${{ env.REDIS_REPO }}
ref: ${{ env.REDIS_BRANCH }}
path: 'redis'
- name: Build Redis
run: cd redis && make -j 4 REDIS_LDFLAGS=-rdynamic
Expand All @@ -215,15 +247,21 @@ jobs:
!contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skipjobs, 'tls')
timeout-minutes: 14400
steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
- name: Set variables
env:
DEFAULT_REDIS_REPO: redis/redis
DEFAULT_REDIS_BRANCH: unstable
DEFAULT_REDISRAFT_REPO: redislabs/redisraft
DEFAULT_REDISRAFT_BRANCH: master
run: |
echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV
echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
echo "REDIS_REPO=${{github.event.inputs.redis_repo || env.DEFAULT_REDIS_REPO}}" >> $GITHUB_ENV
echo "REDIS_BRANCH=${{github.event.inputs.redis_branch || env.DEFAULT_REDIS_BRANCH}}" >> $GITHUB_ENV
echo "REDISRAFT_REPO=${{github.event.inputs.redisraft_repo || env.DEFAULT_REDISRAFT_REPO}}" >> $GITHUB_ENV
echo "REDISRAFT_BRANCH=${{github.event.inputs.redisraft_branch || env.DEFAULT_REDISRAFT_BRANCH}}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
repository: ${{ env.REDISRAFT_REPO }}
ref: ${{ env.REDISRAFT_BRANCH }}
- name: Install build dependencies
run: brew install autoconf automake
- name: Build
Expand All @@ -234,8 +272,8 @@ jobs:
- name: Checkout Redis
uses: actions/checkout@v2
with:
repository: 'redis/redis'
ref: 'unstable'
repository: ${{ env.REDIS_REPO }}
ref: ${{ env.REDIS_BRANCH }}
path: 'redis'
- name: Build Redis
run: cd redis && make -j 4 SANITIZER=address BUILD_TLS=yes
Expand All @@ -247,15 +285,21 @@ jobs:
(github.event_name == 'schedule' && github.repository == 'redislabs/redisraft')) && !contains(github.event.inputs.skipjobs, 'tls')
timeout-minutes: 14400
steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
- name: Set variables
env:
DEFAULT_REDIS_REPO: redis/redis
DEFAULT_REDIS_BRANCH: unstable
DEFAULT_REDISRAFT_REPO: redislabs/redisraft
DEFAULT_REDISRAFT_BRANCH: master
run: |
echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV
echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
echo "REDIS_REPO=${{github.event.inputs.redis_repo || env.DEFAULT_REDIS_REPO}}" >> $GITHUB_ENV
echo "REDIS_BRANCH=${{github.event.inputs.redis_branch || env.DEFAULT_REDIS_BRANCH}}" >> $GITHUB_ENV
echo "REDISRAFT_REPO=${{github.event.inputs.redisraft_repo || env.DEFAULT_REDISRAFT_REPO}}" >> $GITHUB_ENV
echo "REDISRAFT_BRANCH=${{github.event.inputs.redisraft_branch || env.DEFAULT_REDISRAFT_BRANCH}}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
repository: ${{ env.REDISRAFT_REPO }}
ref: ${{ env.REDISRAFT_BRANCH }}
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential autoconf automake libtool cmake lcov
- name: Build
Expand All @@ -266,8 +310,8 @@ jobs:
- name: Checkout Redis
uses: actions/checkout@v2
with:
repository: 'redis/redis'
ref: 'unstable'
repository: ${{ env.REDIS_REPO }}
ref: ${{ env.REDIS_BRANCH }}
path: 'redis'
- name: Build Redis
run: cd redis && make -j 4 SANITIZER=address BUILD_TLS=yes
Expand All @@ -293,15 +337,21 @@ jobs:
container: alpine:latest
timeout-minutes: 14400
steps:
- name: prep
if: github.event_name == 'workflow_dispatch'
- name: Set variables
env:
DEFAULT_REDIS_REPO: redis/redis
DEFAULT_REDIS_BRANCH: unstable
DEFAULT_REDISRAFT_REPO: redislabs/redisraft
DEFAULT_REDISRAFT_BRANCH: master
run: |
echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV
echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
echo "REDIS_REPO=${{github.event.inputs.redis_repo || env.DEFAULT_REDIS_REPO}}" >> $GITHUB_ENV
echo "REDIS_BRANCH=${{github.event.inputs.redis_branch || env.DEFAULT_REDIS_BRANCH}}" >> $GITHUB_ENV
echo "REDISRAFT_REPO=${{github.event.inputs.redisraft_repo || env.DEFAULT_REDISRAFT_REPO}}" >> $GITHUB_ENV
echo "REDISRAFT_BRANCH=${{github.event.inputs.redisraft_branch || env.DEFAULT_REDISRAFT_BRANCH}}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
repository: ${{ env.REDISRAFT_REPO }}
ref: ${{ env.REDISRAFT_BRANCH }}
- name: Install build dependencies
run: apk add build-base cmake python3 py3-pip
- name: Build
Expand All @@ -312,8 +362,8 @@ jobs:
- name: Checkout Redis
uses: actions/checkout@v2
with:
repository: 'redis/redis'
ref: 'unstable'
repository: ${{ env.REDIS_REPO }}
ref: ${{ env.REDIS_BRANCH }}
path: 'redis'
- name: Build Redis
run: cd redis && make -j 4
Expand Down

0 comments on commit a28121b

Please sign in to comment.