Skip to content

Commit

Permalink
redis cli
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill committed Sep 15, 2023
1 parent 1f66b08 commit 49578d3
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/redis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: redis

on: [pull_request, workflow_dispatch]

jobs:
alpine-musl:
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}
toolset: musl
version: 3.16

alpine-musl-test:
needs: alpine-musl
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-alpine.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl
57 changes: 57 additions & 0 deletions redis/build_musl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
dp0="$(realpath "$(dirname "$0")")"
set -e

echo "::group::install deps"

apk update
apk add --no-cache alpine-sdk make linux-headers

echo "::endgroup::"

tool_name="redis"
tool_version="7.2.1"
self_toolset_name="build-musl"
release_version_dirpath="$dp0/release/build"

mkdir -p "$release_version_dirpath" && cd "$dp0/release"

download_url="https://github.com/redis/redis/archive/refs/tags/$tool_version.tar.gz"
echo "::group::prepare sources $download_url"

"$dp0/../.tools/download_bsdtar.sh"
bsdtar="$dp0/release/bsdtar"

wget "$download_url" -O "tool-$tool_version.tar.gz"
"$bsdtar" -xf "tool-$tool_version.tar.gz"

echo "::endgroup::"

echo "::group::build"

./configure
make

echo "::endgroup::"

cd "$release_version_dirpath"

{ printf '### %s
%s
SHA-256: %s
<details>
<summary>7zz i</summary>
```
%s
```
</details>
' "$self_toolset_name.tar.gz" "$(./redis-cli --version)" "$(sha256sum redis-cli)" "$(./redis-cli i)"
} > "$self_toolset_name.md"

cat "$self_toolset_name.md"

"$bsdtar" -czvf "../$self_toolset_name.tar.gz" .

0 comments on commit 49578d3

Please sign in to comment.