diff --git a/.github/workflows/redis.yml b/.github/workflows/redis.yml new file mode 100644 index 000000000..d98c643e5 --- /dev/null +++ b/.github/workflows/redis.yml @@ -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 diff --git a/redis/build_musl.sh b/redis/build_musl.sh new file mode 100755 index 000000000..cd6e083dc --- /dev/null +++ b/redis/build_musl.sh @@ -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 + +
+ 7zz i + +``` +%s +``` +
+ +' "$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" .