Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/Buildsystem: drun for all #2567

Closed
nomeata opened this issue Jun 9, 2021 · 1 comment · Fixed by #2713
Closed

CI/Buildsystem: drun for all #2567

nomeata opened this issue Jun 9, 2021 · 1 comment · Fixed by #2713
Labels
P1 high priority, resolve before the next milestone testing Related to test suite

Comments

@nomeata
Copy link
Collaborator

nomeata commented Jun 9, 2021

Currently, all jobs that need drun (some of the tests, but also the profiling reports and performance comparison) cannot be run by external contributors or our Github based CI. We want this to change.

The most likely way forward is to

  • do what’s necessary internally to get the drun code included in the code dump in https://github.com/dfinity/ic
  • include it from there, with a nix setup (using plain pkgs.rustPlatform.buildRustPackage, we don't need finer build granularity for this) on our side
@nomeata nomeata mentioned this issue Jun 9, 2021
8 tasks
@rossberg rossberg added P1 high priority, resolve before the next milestone testing Related to test suite labels Jun 29, 2021
@nomeata
Copy link
Collaborator Author

nomeata commented Aug 9, 2021

Step one is done, drun is now published at https://github.com/dfinity/ic

Currently testing if it is complete, and how to build it (it has lots of dependencies, some which require additional tools or dev libraries to be available). It seems that

LIBCLANG_PATH="$(nix-build -A pkgs.llvmPackages_10.libclang.lib '<nixpkgs>')/lib" CLANG_PATH="$(nix-build -A pkgs.llvmPackages_10.clang '<nixpkgs>')/bin/clang" PROTOC="$(nix-build -A pkgs.protobuf '<nixpkgs>')/bin/protoc" nix-shell -p cargo rustc gcc openssl pkg-config cmake protobuf llvm_10 llvmPackages_10.libclang lmdb --run 'cargo build --bin drun -j1'

works. Now I need to nix-ify that.

nomeata added a commit that referenced this issue Aug 17, 2021
The Motoko test suite uses a tool called `drun`, which is an Internet Computer emulator in a single program. Previously it was only available internally within DFINITY, but since dfinity/ic@a0c8c9a it’s part of the open source code dump.

So with this we can stop relying on internal repositories (fixes #2567). Also, no VPN needed anymore for the DFINITY employees! :-)

`drun` is built using plain `buildRustPackage`, i.e. as one bit nix deriation. This is ok for dependencies that _we_ don’t hack on and rarely change. And due to the nix cache, everybody will just download the `drun` binary, I hope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 high priority, resolve before the next milestone testing Related to test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants