Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
roshkhatri committed Apr 1, 2024
1 parent a62aee4 commit 0dfed6e
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/cron-unstable-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Unstable build

on:
workflow_dispatch:
inputs:
branch:
description: The branch to create an unstable release for/from.
type: string
default: unstable
required: true

# Run nightly build at this time, bit of trial and error but this seems good.
schedule:
- cron: "0 0 * * *" # unstable build


jobs:
# This job provides this metadata for the other jobs to use.
unstable-build-get-meta:
name: Get metadata to add to build
runs-on: ubuntu-latest
outputs:
date: ${{ steps.date.outputs.date }}
branch: ${{ steps.branch.outputs.branch }}
permissions:
contents: none
steps:
# For cron builds, i.e. nightly, we provide date and time as extra parameter to distinguish them.
- name: Get current date
id: date
run: echo "date=$(date '+%Y-%m-%d-%H_%M_%S')" >> $GITHUB_OUTPUT

- name: Debug event output
uses: hmarr/debug-action@v3

# Now we need to determine which branch to build
- name: Manual run - get branch
if: github.event_name == 'workflow_dispatch'
run: |
echo "cron_branch=${{ github.event.inputs.branch }}" >> $GITHUB_ENV
shell: bash

- name: Output the branch to use
id: branch
run: |
echo "$cron_branch"
if [[ -z "$cron_branch" ]]; then
echo "Unable to determine branch to use"
exit 1
fi
echo "branch=$cron_branch" >> $GITHUB_OUTPUT
shell: bash

build_unstable_linux:
name: Build Valkey for Linux
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Build Valkey for Linux
run: make SERVER_CFLAGS='-Werror'

- name: Install Valkey for Linux
run: make install

- name: Display /usr/local/bin/ contents
run: ls /usr/local/bin/

0 comments on commit 0dfed6e

Please sign in to comment.