-
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.
- Loading branch information
Showing
7 changed files
with
176 additions
and
11 deletions.
There are no files selected for viewing
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,5 @@ | ||
#!/bin/bash | ||
|
||
make -C redis/src all BUILD_TLS=yes \ | ||
FINAL_LIBS="-lm -ldl ../deps/hiredis/libhiredis_ssl.a /opt/homebrew/opt/openssl/lib/libssl.a /opt/homebrew/opt/openssl/lib/libcrypto.a" \ | ||
CFLAGS="-I /opt/homebrew/opt/openssl@3/include" |
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,5 @@ | ||
#!/bin/bash | ||
|
||
make all \ | ||
BUILD_TLS=yes \ | ||
FINAL_LIBS="-lm -ldl ../deps/hiredis/libhiredis_ssl.a /usr/local/opt/openssl/lib/libssl.a /usr/local/opt/openssl/lib/libcrypto.a" |
File renamed without changes.
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
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,123 @@ | ||
name: Build Mac | ||
|
||
on: | ||
|
||
workflow_call: | ||
inputs: | ||
|
||
macos_type: | ||
required: true | ||
type: string | ||
|
||
# short version of the OS (ubuntu20.04, rhel7, etc) | ||
osnick: | ||
required: true | ||
type: string | ||
|
||
deps: | ||
required: true | ||
type: string | ||
|
||
##### optioanl inputs ##### | ||
|
||
# architecture | ||
arch: | ||
required: false | ||
type: string | ||
default: x86_64 | ||
|
||
osname: | ||
required: false | ||
type: string | ||
default: macos | ||
|
||
build_script: | ||
required: false | ||
type: string | ||
default: scripts/build-osx.sh | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{inputs.macos_type}} | ||
|
||
steps: | ||
- name: install dependencies | ||
run: ${{inputs.deps}} | ||
|
||
- name: determine if in fork | ||
id: iamafork | ||
run: | | ||
amfork=`jq '.pull_request.head.repo.fork' $GITHUB_EVENT_PATH` | ||
echo "am I fork: ${amfork}" | ||
echo "IAMAFORK=$amfork" >> $GITHUB_OUTPUT | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: redis-builder | ||
|
||
- name: load envvars | ||
id: get_config_versions | ||
run: | | ||
. redis-builder/vars | ||
echo VERSION=$REDISVERSION >> $GITHUB_OUTPUT | ||
echo PACKAGEDREDISVERSION=$PACKAGEDREDISVERSION >> $GITHUB_OUTPUT | ||
echo S3BASE=$S3BASE >> $GITHUB_OUTPUT | ||
echo HTTPS3BASE=$HTTPS3BASE >> $GITHUB_OUTPUT | ||
- name: check if already built | ||
id: redis-already-built | ||
continue-on-error: true | ||
run: | | ||
wget -q ${{steps.get_config_versions.outputs.HTTPS3BASE}}/redis-${{steps.get_config_versions.outputs.PACKAGEDREDISVERSION}}-${{inputs.osnick}}-${{inputs.arch}}.tgz | ||
- uses: actions/checkout@v3 | ||
if: steps.redis-already-built.outcome != 'success' | ||
with: | ||
repository: redis/redis | ||
path: redis | ||
ref: ${{steps.get_config_versions.outputs.VERSION}} | ||
|
||
- name: make | ||
if: steps.redis-already-built.outcome != 'success' | ||
run: bash redis-builder/${{inputs.build_script}} | ||
|
||
- name: package redis for s3 | ||
if: steps.redis-already-built.outcome != 'success' | ||
run: | | ||
mkdir redis-${{steps.get_config_versions.outputs.PACKAGEDREDISVERSION}}-${{inputs.osnick}}-${{inputs.arch}} | ||
cp redis/src/redis-server \ | ||
redis/src/redis-sentinel \ | ||
redis/src/redis-check-aof \ | ||
redis/src/redis-check-rdb \ | ||
redis/src/redis-benchmark \ | ||
redis/src/redis-cli \ | ||
redis-${{steps.get_config_versions.outputs.PACKAGEDREDISVERSION}}-${{inputs.osnick}}-${{inputs.arch}} | ||
tar -czvf redis-${{steps.get_config_versions.outputs.PACKAGEDREDISVERSION}}-${{inputs.osnick}}-${{inputs.arch}}.tgz \ | ||
redis-${{steps.get_config_versions.outputs.PACKAGEDREDISVERSION}}-${{inputs.osnick}}-${{inputs.arch}} | ||
- name: perist redis | ||
if: steps.redis-already-built.outcome != 'success' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: redis-${{steps.get_config_versions.outputs.PACKAGEDREDISVERSION}}-${{inputs.arch}} | ||
path: | | ||
redis/src/redis-server | ||
redis/src/redis-sentinel | ||
redis/src/redis-check-aof | ||
redis/src/redis-check-rdb | ||
redis/src/redis-benchmark | ||
redis/src/redis-cli | ||
- name: install s3cmd | ||
if: steps.redis-already-built.outcome != 'success' | ||
run: | | ||
pip3 install s3cmd | ||
- name: persist redis to s3 | ||
if: steps.redis-already-built.outcome != 'success' && steps.iamafork.outputs.IAMAFORK != 'false' | ||
run: | | ||
s3cmd --access_key=${{secrets.AWS_S3_ACCESS_KEY_ID}} \ | ||
--secret_key=${{secrets.AWS_S3_SECRET_ACCESS_KEY}} \ | ||
--region=us-east-1 \ | ||
put -P redis-${{steps.get_config_versions.outputs.PACKAGEDREDISVERSION}}-${{inputs.osnick}}-${{inputs.arch}}.tgz \ | ||
${{steps.get_config_versions.outputs.S3BASE}}/redis-${{steps.get_config_versions.outputs.PACKAGEDREDISVERSION}}-${{inputs.osnick}}-${{inputs.arch}}.tgz |
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,37 @@ | ||
name: Build redis | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-linuxx64 | ||
cancel-in-progress: true | ||
|
||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
|
||
macos-arm64: | ||
uses: ./.github/workflows/REUSABLE-osx.yml | ||
with: | ||
macos_type: macos-latest-large | ||
deps: brew install openssl@3 coreutils | ||
arch: arm64 | ||
build_script: scripts/build-osx-arm.sh | ||
osnick: monterey | ||
|
||
macos-x86_64: | ||
uses: ./.github/workflows/REUSABLE-osx.yml | ||
with: | ||
macos_type: macos-latest-large | ||
deps: brew install openssl@3 coreutils | ||
build_script: scripts/build-osx.sh | ||
osnick: monterey |
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