Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix zmalloc_size on macos #2646

Merged
merged 3 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
df -h

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
uses: mozilla-actions/sccache-action@v0.0.4

- name: Configure Cache Env
uses: actions/github-script@v6
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/daily-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
with:
submodules: true
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
uses: mozilla-actions/sccache-action@v0.0.4

- name: Configure Cache Env
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand Down Expand Up @@ -73,10 +73,20 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4

- name: Configure Cache Env
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')

- name: Install dependencies
run: |
brew update && brew install ninja boost openssl automake gcc zstd bison c-ares \
autoconf libtool automake
autoconf libtool automake flatbuffers
# brew info icu4c
mkdir -p $GITHUB_WORKSPACE/build

Expand All @@ -92,7 +102,8 @@ jobs:


echo "*************************** START BUILDING **************************************"
CC=gcc-13 CXX=g++-13 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF
CC=gcc-13 CXX=g++-13 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF \
-DCMAKE_C_COMPILER_LAUNCHER=sccache

ninja src/all

Expand Down
2 changes: 1 addition & 1 deletion helio
4 changes: 4 additions & 0 deletions src/redis/zmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
#elif defined(__APPLE__)
#include <malloc/malloc.h>
#define HAVE_MALLOC_SIZE 1
#ifdef USE_ZMALLOC_MI
#define zmalloc_size(p) zmalloc_usable_size(p)
#else
#define zmalloc_size(p) malloc_size(p)
#endif
#define ZMALLOC_LIB "macos"
#endif

Expand Down
Loading