Skip to content

Commit 0636420

Browse files
authored
Dockerfile: create zig cache via run.sh, not zig test (#70)
Three recent commits [1][2][3] tried to speed up running user solutions in production, but weren't sufficient. Continue trying, by running `zig test` indirectly. Extra advantage: we have a single source of truth for `zig test` options, which helps if we want to change them later. Disadvantage: `docker build` no longer fails if this line produces a failing test. That's why I didn't do it this way originally. Refs: #63 [1] 82b56af, 2023-08-23, ".dockerignore, Dockerfile: add a zig cache" [2] b8b9d02, 2023-08-27, "Dockerfile, bin(run-tests), tests: set USER" [3] 3f2c0c2, 2023-08-27, "Dockerfile: create zig cache later"
1 parent 3f2c0c2 commit 0636420

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ COPY --chown=ziggy:ziggroup bin/run.sh bin/run.sh
3434
# Initialize a zig cache
3535
COPY --chown=ziggy:ziggroup tests/example-success/example_success.zig init-zig-cache/
3636
COPY --chown=ziggy:ziggroup tests/example-success/test_example_success.zig init-zig-cache/
37-
RUN zig test init-zig-cache/test_example_success.zig \
37+
RUN bin/run.sh example-success init-zig-cache init-zig-cache \
3838
&& rm -rf init-zig-cache/
3939
ENTRYPOINT ["/opt/test-runner/bin/run.sh"]

0 commit comments

Comments
 (0)