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: create jenkins pipeline and enable build of nim compiler #1076

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

markoburcul
Copy link
Contributor

@markoburcul markoburcul commented Jan 17, 2025

Because of the recent bump of Nim compiler for codex to >2 version, using the system Nim provided by nixpkgs became unusable since the nim-codex couldn't build. Because of this I've adapted the derivation to be similar to the one of nimbus-eth2 where we build Nim compiler using nimbus-build-system.

The pipeline on Jenkins is currently set to build nim-codex through flake, but there is a possibility to run the nix tests in the pipeline with slight modifications of the ci agents(the error when running nix tests).

error: a 'x86_64-linux' with features {kvm, nixos-test} is required to build '/nix/store/9avanzkwb8f25c0az0f3f8jv2mkm4gfq-vm-test-run-nim-codex-test.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, nixos-test, uid-range}

P.S. Unfortunately it is not possible anymore(to my knowledge) to instantiate the nix shell without specifying additionally '.?submodules=1#'. Cause of this is that the callPackage from preBuild phase is being called and all three calls require submodules to be present.

Referenced issue: #940

Signed-off-by: markoburcul <[email protected]>
Using nimbus build system since the codex now uses version of Nim >2.
Tested with nim versions(>2) in nixpkgs but none of them work thus the
removal of USE_SYSTEM_NIM and its logic.

Signed-off-by: markoburcul <[email protected]>
@markoburcul markoburcul requested a review from jakubgs January 17, 2025 15:02
@markoburcul
Copy link
Contributor Author

I've inspected the dependencies of the built derivation both manually with nix derivation show and with nix-tree. There was no hidden Nim compiler or anything similar among the dependecies that would explain the previous failures we had when debugging the build.

When building the package we can see in the output first:

codex> Nim Compiler Version 1.9.1 [Linux: amd64]
codex> Compiled at 2023-01-02
codex> Copyright (c) 2006-2022 by Andreas Rumpf
codex> git hash: 7f6681b4c4ccc0dc43fd256280be4c3ad3c773e5

but afterwards we can see:

codex> Building: build/all
codex> [using Nim version v2.0.14]

which states clearly that we are using the 2.0.14 Nim compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant