Skip to content

Commit 20cfb71

Browse files
committed
Fix CI linkage issue: force clean-alloc when switching testing targets
1 parent bdff97d commit 20cfb71

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
continue-on-error: true
4343

4444
- name: Run Skeleton/MyAlloc Tests
45-
run: make run-tests ALLOCATOR=allocators/skeleton/my_allocator.c
45+
run: make test-skeleton
4646
continue-on-error: true
4747

4848
- name: Run Glibc Benchmarks (Quick)

Makefile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,31 @@ run-quick: bench
111111
MIMALLOC_WRAPPER := allocators/mimalloc/mimalloc_wrapper.c
112112
JEMALLOC_WRAPPER := allocators/jemalloc/jemalloc_wrapper.c
113113
GLIBC_ALLOC := allocators/glibc/glibc_allocator.c
114+
SKELETON_ALLOC := allocators/skeleton/my_allocator.c
115+
116+
# Force rebuild of allocator object when switching
117+
clean-alloc:
118+
rm -f $(ALLOC_OBJ)
114119

115120
# Convenience targets for testing variants
116-
test-mimalloc:
121+
test-mimalloc: clean-alloc
117122
$(MAKE) run-tests ALLOCATOR=$(MIMALLOC_WRAPPER) EXTRA_LDFLAGS="-Llibs -lmimalloc" EXTRA_CFLAGS="-Iallocators/mimalloc/mimalloc_src/include"
118123

119-
test-mimalloc-secure:
124+
test-mimalloc-secure: clean-alloc
120125
$(MAKE) run-tests ALLOCATOR=$(MIMALLOC_WRAPPER) EXTRA_LDFLAGS="-Llibs -lmimalloc-secure" EXTRA_CFLAGS="-Iallocators/mimalloc/mimalloc_src/include"
121126

122-
test-jemalloc:
127+
test-jemalloc: clean-alloc
123128
$(MAKE) run-tests ALLOCATOR=$(JEMALLOC_WRAPPER) EXTRA_LDFLAGS="-Llibs -ljemalloc -lrt -ldl"
124129

125-
test-jemalloc-debug:
130+
test-jemalloc-debug: clean-alloc
126131
$(MAKE) run-tests ALLOCATOR=$(JEMALLOC_WRAPPER) EXTRA_LDFLAGS="-Llibs -ljemalloc-debug -lrt -ldl"
127132

128-
test-glibc:
133+
test-glibc: clean-alloc
129134
$(MAKE) run-tests ALLOCATOR=$(GLIBC_ALLOC)
130135

136+
test-skeleton: clean-alloc
137+
$(MAKE) run-tests ALLOCATOR=$(SKELETON_ALLOC)
138+
131139
debug:
132140
$(MAKE) MODE=debug all
133141

@@ -154,9 +162,7 @@ help:
154162
@echo " test-mimalloc-secure Run tests with Mimalloc (Secure)"
155163
@echo " test-jemalloc Run tests with Jemalloc (Release)"
156164
@echo " test-jemalloc-debug Run tests with Jemalloc (Debug)"
157-
@echo " debug Build with debug flags and sanitizers"
158-
@echo " release Build optimized release"
159-
@echo " clean Remove build artifacts"
165+
@echo " test-skeleton Run tests with Student Skeleton"
160166
@echo ""
161167
@echo "Variables:"
162168
@echo " ALLOCATOR=path Path to custom allocator source"

0 commit comments

Comments
 (0)