Skip to content

Commit

Permalink
Merge pull request #14610 from MinaProtocol/dkijania/port_remove_snar…
Browse files Browse the repository at this point in the history
…ky_js_test_o1js_main

[o1js-main] Removal of snarky js test in mina as one of step of spitting repos
  • Loading branch information
mitschabaude authored Nov 29, 2023
2 parents e6b2064 + 213742d commit 2156959
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 118 deletions.
32 changes: 32 additions & 0 deletions buildkite/scripts/test-nix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

set -euo pipefail

set -eou pipefail
set +x

if [[ $# -ne 1 ]]; then
echo "Usage: $0 branch"
exit 1
fi


mkdir -p "${XDG_CONFIG_HOME-${HOME}/.config}/nix"
echo 'experimental-features = nix-command flakes' > "${XDG_CONFIG_HOME-${HOME}/.config}/nix/nix.conf"

git config --global --add safe.directory /workdir

git fetch
# Nix has issue when performing operations on detached head
# On Ci machine it spit out issues like:
# fatal: reference is not a tree: ....
# error:
# … while fetching the input 'git+file:///workdir'
#
# error: program 'git' failed with exit code 128
# That is why we checkout branch explicitly
git checkout $1

./nix/pin.sh

nix build mina --accept-flake-config
2 changes: 1 addition & 1 deletion buildkite/scripts/version-linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ git config --global --add safe.directory /workdir

source buildkite/scripts/export-git-env-vars.sh

pip3 install sexpdata
pip3 install sexpdata==1.0.0

base_branch=origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}
pr_branch=origin/${BUILDKITE_BRANCH}
Expand Down
36 changes: 0 additions & 36 deletions buildkite/src/Command/TestExecutive.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,5 @@ in
key = "integration-test-${testName}",
target = Size.Integration,
depends_on = dependsOn
},

buildJs = \(duneProfile : Text) ->
Command.build
Command.Config::{
commands =
-- Build js test archive
RunInToolchain.runInToolchainBuster ([] : List Text) "./buildkite/scripts/build-js-tests.sh"

#

[
-- Cache js test archive
Cmd.run "artifact-cache-helper.sh snarkyjs_test.tar.gz --upload"
],
label = "Build JS integration tests",
key = "build-js-tests",
target = Size.XLarge
},

executeWithJs = \(testName : Text) -> \(dependsOn : List Command.TaggedKey.Type) ->
Command.build
Command.Config::{
commands =
[
Cmd.run "artifact-cache-helper.sh snarkyjs_test.tar.gz && tar -xzf snarkyjs_test.tar.gz",

-- Execute test based on BUILD image
Cmd.run "MINA_DEB_CODENAME=bullseye ; source ./buildkite/scripts/export-git-env-vars.sh && ./buildkite/scripts/run-test-executive.sh ${testName}"
],
artifact_paths = [SelectFiles.exactly "." "${testName}.test.log"],
label = "${testName} integration test",
key = "integration-test-${testName}",
target = Size.Integration,
depends_on = dependsOn,
soft_fail = Some (B/SoftFail.Boolean True)
}
}
7 changes: 6 additions & 1 deletion buildkite/src/Constants/DebianVersions.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ let minimalDirtyWhen = [
S.exactly "scripts/rebuild-deb" "sh",
S.exactly "scripts/release-docker" "sh",
S.exactly "buildkite/scripts/build-artifact" "sh",
S.exactly "buildkite/scripts/run-snark-transaction-profiler" "sh"
-- Snark profiler dirtyWhen
S.exactly "buildkite/src/Jobs/Test/RunSnarkProfiler" "dhall",
S.exactly "buildkite/scripts/run-snark-transaction-profiler" "sh",
S.exactly "scripts/snark_transaction_profiler" "py",
S.exactly "buildkite/scripts/version-linter" "sh",
S.exactly "scripts/version-linter" "py"
]

-- The default debian version (Bullseye) is used in all downstream CI jobs
Expand Down
9 changes: 1 addition & 8 deletions buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ let dependsOn = [
{ name = "MinaArtifactBullseye", key = "daemon-berkeley-bullseye-docker-image" },
{ name = "MinaArtifactBullseye", key = "archive-bullseye-docker-image" }
]
let dependsOnJs = [
{ name = "TestnetIntegrationTests", key = "build-js-tests" },
{ name = "MinaArtifactBullseye", key = "daemon-berkeley-bullseye-docker-image" },
{ name = "MinaArtifactBullseye", key = "archive-bullseye-docker-image" }
]

in Pipeline.build Pipeline.Config::{
spec =
Expand All @@ -34,7 +29,6 @@ in Pipeline.build Pipeline.Config::{
mode = PipelineMode.Type.Stable
},
steps = [
TestExecutive.buildJs "integration_tests",
TestExecutive.execute "peers-reliability" dependsOn,
TestExecutive.execute "chain-reliability" dependsOn,
TestExecutive.execute "payment" dependsOn,
Expand All @@ -45,7 +39,6 @@ in Pipeline.build Pipeline.Config::{
TestExecutive.execute "zkapps" dependsOn,
TestExecutive.execute "zkapps-timing" dependsOn,
TestExecutive.execute "zkapps-nonce" dependsOn,
TestExecutive.execute "verification-key" dependsOn,
TestExecutive.executeWithJs "snarkyjs" dependsOnJs
TestExecutive.execute "verification-key" dependsOn
]
}
2 changes: 1 addition & 1 deletion buildkite/src/Jobs/Test/VersionLint.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Pipeline.build
let lintDirtyWhen = [
S.strictlyStart (S.contains "src"),
S.exactly "buildkite/src/Jobs/Test/VersionLint" "dhall",
S.exactly "buildkite/scripts/version_linter" "sh"
S.exactly "buildkite/scripts/version-linter" "sh"
]

in
Expand Down
70 changes: 0 additions & 70 deletions src/app/test_executive/snarkyjs.ml

This file was deleted.

1 change: 0 additions & 1 deletion src/app/test_executive/test_executive.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ let tests : test list =
, (module Verification_key_update.Make : Intf.Test.Functor_intf) )
; ( "block-prod-prio"
, (module Block_production_priority.Make : Intf.Test.Functor_intf) )
; ("snarkyjs", (module Snarkyjs.Make : Intf.Test.Functor_intf))
; ("block-reward", (module Block_reward_test.Make : Intf.Test.Functor_intf))
; ("hard-fork", (module Hard_fork.Make : Intf.Test.Functor_intf))
]
Expand Down

0 comments on commit 2156959

Please sign in to comment.