forked from keep-starknet-strange/alexandria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (57 loc) · 1.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.PHONY: default
# Configuration
ROOT_PROJECT = .
PROJECT_NAME = alexandria
BUILD_DIR = build
# Default target
default: test
# All relevant targets
all: build run test
# Targets
# Compile the project
build: FORCE
$(MAKE) clean format
@echo "Building..."
cairo-compile . > $(BUILD_DIR)/$(PROJECT_NAME).sierra
# Run the project
run:
@echo "Running..."
# TODO: enable when sample main is ready
#cairo-run $(ROOT_PROJECT)
# Test the project
test:
@echo "Testing everything..."
cairo-test $(ROOT_PROJECT)
test-data_structures:
@echo "Testing data structures..."
cairo-test $(PROJECT_NAME)/data_structures
test-math:
@echo "Testing math"
cairo-test $(PROJECT_NAME)/math
test-sorting:
@echo "Testing sorting..."
cairo-test $(PROJECT_NAME)/sorting
test-utils:
@echo "Testing utils..."
cairo-test $(PROJECT_NAME)/utils
# Special filter tests targets
# Run tests related to the stack
test-stack:
@echo "Testing stack..."
cairo-test $(PROJECT_NAME) -f stack
# Format the project
format:
@echo "Formatting everything..."
cairo-format --recursive --print-parsing-errors $(ROOT_PROJECT)
# Check the formatting of the project
check-format:
@echo "Checking formatting..."
cairo-format --recursive --check $(ROOT_PROJECT)
# Clean the project
clean:
@echo "Cleaning..."
rm -rf $(BUILD_DIR)/*
mkdir -p $(BUILD_DIR)
# FORCE is a special target that is always out of date
# It enable to force a target to be executed
FORCE: