-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy path.makim.yaml
More file actions
164 lines (143 loc) · 4.22 KB
/
.makim.yaml
File metadata and controls
164 lines (143 loc) · 4.22 KB
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
groups:
clean:
tasks:
tmp:
help: remove build artifacts, compiled files, and cache
backend: bash
run: |
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
tests:
tasks:
linter:
help: run linter tools
run: |
pre-commit install
pre-commit run --all-files
unit:
help: run tests
args:
path:
help: Specify the location of the tests
type: string
default: ""
params:
help: Specify parameters to be used for tests
type: string
default: "-vvv -n auto"
backend: bash
run: |
pytest \
--cov=irx \
--cov-fail-under=85 \
--cov-report term-missing \
--no-cov-on-fail ${{ args.path }} ${{ args.params }}
notebooks:
help: test jupyter notebooks
run: pytest -vv --nbmake docs/tutorials
ci:
help: run the sames tests executed on CI
hooks:
pre-run:
- task: tests.unit
- task: tests.notebooks
- task: tests.linter
build:
help: build the temporary test c file
run: |
mkdir -p ./tmp
cd tmp
touch test.c
clang -O0 test.c -o test.bin
emit-ir:
help: |
build llvm-ir from a c code in order to use the result to compare
with irx result
run: |
mkdir -p ./tmp
cd tmp
touch test.c
clang -O0 -emit-llvm -S -Xclang -disable-llvm-passes test.c
build-from-ir:
help: Build a binary file from llvm-ir
args:
file:
help: the llvm ir file path
type: string
required: true
run: |
llc -filetype=obj ${{ args.file }}.ll -o ${{ args.file }}.o
clang ${{ args.file }}.o -o ${{ args.file }}
docs:
tasks:
build:
help: build documentation
run: |
mkdocs build --config-file mkdocs.yaml
echo "irx.arxlang.org" > ./build/CNAME
preview:
help: preview documentation page locally
run: mkdocs serve --watch docs --config-file mkdocs.yaml
release:
vars:
app: |
npx --yes \
-p semantic-release \
-p conventional-changelog-conventionalcommits \
-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
tasks:
ci:
help: run semantic release on CI
run: ${{ vars.app }} --ci
dry:
help: run semantic release in dry-run mode
run: |
${{ vars.app }} --dry-run
llm-config:
backend: bash
tasks:
setup:
help: Clone llm-config into a temporary project folder
run: |
set -eu
clone_dir=".tmp/llm-config"
rm -rf "${clone_dir}"
mkdir -p ".tmp"
git clone https://github.com/arxlang/llm-config "${clone_dir}"
cleanup:
help: Remove the temporary llm-config clone
run: |
set -eu
clone_dir=".tmp/llm-config"
rm -rf "${clone_dir}"
rmdir ".tmp" 2>/dev/null || true
codex:
help: Copy the .codex folder from llm-config into the project root
hooks:
pre-run:
- task: llm-config.setup
post-run:
- task: llm-config.cleanup
run: |
set -eu
clone_dir=".tmp/llm-config"
test -d "${clone_dir}/.codex"
rm -rf ./.codex
cp -R "${clone_dir}/.codex" ./.codex