forked from arxlang/arxcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.makim.yaml
212 lines (188 loc) · 5.7 KB
/
.makim.yaml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
version: 1.0.0
groups:
- name: build
targets:
clean-gcda:
help: Remove temporary gcda files
run: |
touch tmp.gcda
find . -name "*.gcda" -print0 | xargs -0 rm
clean:
help: Remove all unnecessary temporary files
dependencies:
- target: build.clean-gcda
run: |
rm -rf build/*
rm -f bin/*
mkdir -p build
install:
help: Install Arx locally
run: meson install -C build
release:
help: Build Arx for release
env:
ASAN_OPTIONS: '{{ args.asan_options }}'
args:
asan-options:
help: |
Define a custom value for the environment variable
`ASAN_OPTIONS`
type: string
default: ''
build-type:
help: |
Define the build type, options are:
plain, debug, debugoptimized, release, minsize, and custom
type: string
default: release
clean:
help: Clean temporary files before the building step
type: bool
action: store_true
extras:
help: Extra arguments for the build step
type: string
default: ''
dependencies:
- target: build.clean
if: {{ args.clean }}
run: |
meson setup \
--prefix $CONDA_PREFIX \
--libdir $CONDA_PREFIX/lib \
--includedir $CONDA_PREFIX/include \
--buildtype={{ args.build_type }} \
--native-file meson.native {{ args.extras }} \
build .
meson compile -C build
dev:
help: Build for development (+tests +debug)
args:
clean:
help: Clean temporary files before the building step
type: bool
action: store_true
dependencies:
- target: build.release
args:
build-type: "debug"
extras: "-Ddev=enabled -Db_coverage=true -Doptimization=0"
clean: {{ args.clean }}
asan-options: "fast_unwind_on_malloc=0"
- name: env
targets:
create-file:
help: Create a .env file
run: |
touch .env
echo -n @("HOST_UID=" + $(id -u) + "HOST_GID=" + $(id -g)) > .env
- name: conda
targets:
build:
help: Create the conda package for arx
run: |
cd conda/recipe
conda build purge
conda mambabuild .
- name: release
vars:
app: |
npx --yes \
-p semantic-release \
-p "@semantic-release/commit-analyzer" \
-p "@semantic-release/release-notes-generator" \
-p "@semantic-release/changelog" \
-p "@semantic-release/exec" \
-p "@semantic-release/github" \
-p "@semantic-release/git" \
-p "@google/semantic-release-replace-plugin" \
semantic-release
targets:
ci:
help: Run semantic-release on CI
run: {{ app }} --ci
dry:
help: Run semantic-release on CI for tests in dry-run mode.
run: {{ app }} --dry-run
- name: docs
targets:
api:
help: Build API docs
run: |
mkdir -p build
doxygen Doxyfile
./scripts/format_releases.sh
build:
help: Build the general docs pages
dependencies:
- target: docs.clean
- target: docs.api
run: |
mkdocs build --config-file docs/mkdocs.yaml --dirty --site-dir build
echo "arxlang.org" > ./build/CNAME
clean:
help: Clean temporary documentation files
run: rm -rf ./build
preview:
help: Preview documentation result locally
dependencies:
- target: docs.clean
- target: docs.api
run: mkdocs serve --config-file docs/mkdocs.yaml --watch docs
- name: tests
targets:
sanitizer:
help: Run sanitizer tests
run: meson test -C build -v
code-coverage:
help: Check code coverage by tests
run: ninja coverage -C build
gen-object:
help: Run test for object generation
extras:
help: Extra arguments for the build step
type: string
default: ''
run: ./tests/scripts/test-gen-objects.sh {{ args.extras }}
gen-ast:
help: Run test for AST generation
extras:
help: Extra arguments for the build step
type: string
default: ''
run: ./tests/scripts/test-gen-ast.sh {{ args.extras }}
gen-llvm-ir:
help: Run test for LLVM IR
extras:
help: Extra arguments for the build step
type: string
default: ''
run: ./tests/scripts/test-gen-ast.sh {{ args.extras }}
examples:
help: Test all code generation for the example arx files
dependencies:
- target: tests.gen-object
- target: tests.gen-ast
- target: tests.gen-llvm-ir
all:
help: Run sanitizer tests and code generation for examples
dependencies:
- target: tests.sanitizer
- target: tests.examples
lint:
help: Run linter tools
run: pre-commit run --all-files --verbose
- name: debug
targets:
fibonacci:
help: Debug arx via an example file (fibonacci)
args:
extras:
help: Extra arguments for the build step
type: string
default: ''
run: |
LSAN_OPTIONS=verbosity=1:log_threads=1 gdb \
--args build/arx \
--input `pwd`/examples/fibonacci.arx \
--output "/tmp/fibonacci" {{ args.extras }}