squirrel-labs / ratatosk

Rask is a platformer game built with WASM and Rust
https://rask.rocks
MIT License
15 stars 1 forks source link

Add `cargo-audit` and some minor improvements to the dev environment #48

Closed Ma27 closed 4 years ago

TrueDoctor commented 4 years ago

We should rebuild the docker container once it is merged into master to pre-cache cargo audit

Ma27 commented 4 years ago

We should rebuild the docker container once it is merged into master to pre-cache cargo audit

That's IMHO not really necessary unless we need cargo-audit in our CI pipeline.

(We may want to refactor shell.nix to differentiate between CI-deps and "devtools" if we have more of that optional buildInputs in the future btw)

TrueDoctor commented 4 years ago

That would be great, because now the ci downloads cargo-audit on every build which slows down the ci process

Ma27 commented 4 years ago

That would be great, because now the ci downloads cargo-audit on every build which slows down the ci process

Can't we cache e.g. /nix/store and ~/.rustup to reduce at least IO during a build?

The refactoring for the nix-shell expression is IMHO rather simple, will file a patch here tomorrow :)

TrueDoctor commented 4 years ago

We currently cache pretty much everything, but the cache depends on that shell.nix file: https://github.com/squirrel-labs/docker-rust-wasm/blob/master/Dockerfile not an ideal solution, but it works quite well The current ci docker has to fetch the version every build: https://ci.kobert.dev/squirrel-labs/ratatosk/61/1/2

+ nix-shell --run 'cargo make check-format'
--
2 | these paths will be fetched (1.11 MiB download, 3.93 MiB unpacked):
3 | /nix/store/avribjjf55ns1a0njyzf214dmlkw1q5m-cargo-audit-0.10.0
4 | copying path '/nix/store/avribjjf55ns1a0njyzf214dmlkw1q5m-cargo-audit-0.10.0' from 'https://cache.nixos.org'...