exercism / nim-test-runner

GNU Affero General Public License v3.0
2 stars 3 forks source link

Build: use prebuilt alpine version of nim for test-runner #117

Open ynfle opened 2 years ago

ynfle commented 2 years ago

This uses nimlang/nim:1.6.0-alpine-regular to copy over the alpine version of nim for the test-runner because it is already built and doesn't have to be rebuilt on every CI test.

There are currently issues with this and I'll hopefully figure them out soon

Related to #116. The advantage of this route, is we don't have to maintain our nim base image (@ee7 is there any advantage to maintaining our own? It didn't seem like you are doing anything special in bin/install_nim.sh)

ee7 commented 2 years ago

is there any advantage to maintaining our own? It didn't seem like you are doing anything special in bin/install_nim.sh

I wouldn't say there are huge advantages, but there are at least these benefits:

  1. We can use koch -d:leanCompiler. It's more for making bootstrapping possible on memory-constrained devices, but it's probably also a marginal decrease in attack surface (there could be a security issue with docgen or JS codegen).
  2. We can bump the Alpine (and therefore gcc) version that builds Nim, even when Nim itself didn't get a new release. It feels better if we use the same Alpine version to build Nim, to build the test runner, and to build the user's code.
  3. We can minimize the Nim installation size in our base image, not in exercism/nim-test-runner (I wrote this part so that we don't include some larger directories like compiler/doc/tests).
  4. At the time of the creation of this post, the nimlang Docker image is not officially maintained by the Nim core team.

I'd suggest that we use exercism/nim-docker-base for now - does that work for you? I'd be fine with reconsidering if it becomes a significant maintenance burden.

ynfle commented 2 years ago

So I'm going to close this PR, but we can revisit it at a future date, perhaps when @ErikSchierboom is back in the virtual office

ErikSchierboom commented 2 years ago

Let's discuss this once I'm back (next week).