Skip to content

Commit

Permalink
CI Fix (nexus-xyz#307)
Browse files Browse the repository at this point in the history
* Try deleting the lockfile and letting cargo regen it.

* Try to relocate cargo cleanup.

* Test.

* Fix

* Fix host project generation.

* Another attempt to clean correctly.
  • Loading branch information
sjudson authored Dec 10, 2024
1 parent 0b787f2 commit 483cb46
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
3 changes: 3 additions & 0 deletions assets/scripts/smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ cargo build --release --package cargo-nexus --bin cargo-nexus
cp "$1" "$PROJECT_NAME/src/main.rs"
cd "$PROJECT_NAME"

# remove the lockfile so that Cargo regenerates it, to keep up with updates to lockfile versioning
rm -f "Cargo.lock"

# Link the test program to the latest runtime code
sed -e "s#git = \"https://github.com/nexus-xyz/nexus-zkvm.git\"#path = \"$ORIGINAL_DIR/runtime\"#" Cargo.toml > Cargo.tmp && mv Cargo.tmp Cargo.toml

Expand Down
7 changes: 5 additions & 2 deletions assets/scripts/test_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ cp "$1" "$PROJECT_NAME/src/guest/src/main.rs"
}

function run_project() {
cargo update

# Test the cycles feature inside the guest project
pushd src/guest
$CARGO_NEXUS nexus run
Expand All @@ -72,8 +70,13 @@ set -x

build_cargo_nexus
create_nexus_project

# remove the guest lockfile so that Cargo regenerates it, to keep up with updates to lockfile versioning
rm -f "$PROJECT_NAME/Cargo.lock"

copy_test_file "$1"
cd "$PROJECT_NAME"

run_project

cleanup
16 changes: 0 additions & 16 deletions cli/src/command/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,6 @@ fn setup_crate(host_path: PathBuf, rev: Option<String>, tag: Option<String>) ->
"# Generated by cargo-nexus, do not remove!\n",
"#\n",
"# This profile is used for generating proofs, as Nexus VM support for compiler optimizations is still under development.\n",

// https://doc.rust-lang.org/1.58.1/cargo/reference/overriding-dependencies.html#working-with-an-unpublished-minor-version
"# These patches are required for some of the underlying cryptography libraries used by Nexus.\n",
"[patch.crates-io]\n",
"ark-crypto-primitives = {{ git = \"https://github.com/arkworks-rs/crypto-primitives/\", rev = \"d27a5c8\" }}\n",
"ark-r1cs-std = {{ git = \"https://github.com/arkworks-rs/r1cs-std/\", rev = \"2ca3bd7\" }}\n",
"ark-ff = {{ git = \"https://github.com/arkworks-rs/algebra/\", rev = \"2a80c54\" }}\n",
"ark-ec = {{ git = \"https://github.com/arkworks-rs/algebra/\", rev = \"2a80c54\" }}\n",
"ark-serialize = {{ git = \"https://github.com/arkworks-rs/algebra/\", rev = \"2a80c54\" }}\n",
"ark-poly = {{ git = \"https://github.com/arkworks-rs/algebra/\", rev = \"2a80c54\" }}\n",
"ark-test-curves = {{ git = \"https://github.com/arkworks-rs/algebra/\", rev = \"2a80c54\" }}\n",
"ark-poly-commit = {{ git = \"https://github.com/arkworks-rs/poly-commit/\", rev = \"12f5529\" }}\n",
"ark-bn254 = {{ git = \"https://github.com/arkworks-rs/curves/\", rev = \"8c0256a\" }}\n",
"ark-pallas = {{ git = \"https://github.com/arkworks-rs/curves/\", rev = \"8c0256a\" }}\n",
"ark-vesta = {{ git = \"https://github.com/arkworks-rs/curves/\", rev = \"8c0256a\" }}\n",
"ark-bls12-381 = {{ git = \"https://github.com/arkworks-rs/curves/\", rev = \"3fded1f\" }}"
)
)?;

Expand Down

0 comments on commit 483cb46

Please sign in to comment.