forked from valkey-io/valkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Roshan Khatri <[email protected]>
- Loading branch information
1 parent
57789d4
commit 28cf157
Showing
8 changed files
with
88 additions
and
1,339 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Unstable build | ||
|
||
on: | ||
# push: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: The branch to create an unstable release from. | ||
type: string | ||
default: unstable | ||
required: true | ||
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 }} | ||
steps: | ||
- 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 | ||
|
||
- name: Run on schedule event. | ||
if: github.event_name == 'schedule' && github.event.schedule=='0 0 * * *' | ||
run: echo "cron_branch=unstable" >> $GITHUB_ENV | ||
|
||
- 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 | ||
needs: | ||
- unstable-build-get-meta | ||
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/ | ||
- name: Create tarball and checksums | ||
run: | | ||
TAR_FILE_NAME=valkey-server-${{ needs.unstable-build-get-meta.outputs.branch}}.linux.${{ needs.unstable-build-get-meta.outputs.date}} | ||
mkdir -p $TAR_FILE_NAME/bin $TAR_FILE_NAME/share | ||
cp -rfv /usr/local/bin/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 -C $TAR_FILE_NAME --exclude-vcs . | ||
sha256sum $TAR_FILE_NAME.tar.gz > $TAR_FILE_NAME.tar.gz.sha256 | ||
mkdir -p source-packages | ||
cp -rfv $TAR_FILE_NAME.tar* source-packages/ | ||
- name: Sync with S3 Bucket. | ||
run: | | ||
sudo apt-get update | ||
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.AWS_S3_ACCESS_KEY_ID }} | ||
aws configure set aws_secret_access_key ${{ secrets.AWS_S3_ACCESS_KEY }} | ||
- name: List files in S3 bucket | ||
run: aws s3 ls "s3://valkey-test/latest/" | ||
|
||
- name: Sync to S3 | ||
run: aws s3 sync "source-packages/" "s3://valkey-test/latest/" |
Oops, something went wrong.