Skip to content
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
20 changes: 20 additions & 0 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ci-macos
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: 构建依赖 blockmalloc(macOS 无预编译 ABI,从源码装)
run: |
git clone --depth 1 --branch v0.1.4 https://github.com/array2d/blockmalloc.git /tmp/blockmalloc
cmake -S /tmp/blockmalloc -B /tmp/blockmalloc/build \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build /tmp/blockmalloc/build -j
sudo cmake --install /tmp/blockmalloc/build
- name: 构建
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build build -j
- name: 测试
run: cd build && ctest --output-on-failure
2 changes: 1 addition & 1 deletion tutorial/07_bench_concurrent.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/08_bench_pure.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/09_bench_sharded.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/10_bench_diag.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/11_bench_shallow.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/12_bench_lock.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/13_bench_diag2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/14_bench_alloc_only.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/15_bench_dedicated.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tutorial/16_bench_malloc.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 199309L
#define _POSIX_C_SOURCE 200809L
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
Loading