Commit 82b56af
authored
.dockerignore, Dockerfile: add a zig cache (#59)
It took Exercism much longer to run the tests for a Zig exercise than it
should. This was because Zig had never been run in the container before
test time, and there was no compilation cache in the image.
Let's try an initial simple approach: run `zig test` once
(for `tests/example-success`) and copy the resulting zig cache into the
image. This seems like a 2.2x speedup when later testing a typical
exercise, at the cost of adding a 41 MB zig cache to the image:
33 MB /root/.cache/zig/z/
8 MB /root/.cache/zig/o/
22 kB /root/.cache/zig/h/
Later, I believe we can speed up further by caching the result of
compiling more functions from e.g. std.testing.
Closes: #281 parent 9d7c3f2 commit 82b56af
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
29 | | - | |
| 38 | + | |
30 | 39 | | |
0 commit comments