diff --git a/.github/actions/ocaml-shared/action.yml b/.github/actions/ocaml-shared/action.yml index 5d743fdb8c..298f99bf53 100644 --- a/.github/actions/ocaml-shared/action.yml +++ b/.github/actions/ocaml-shared/action.yml @@ -11,3 +11,9 @@ runs: uses: ocaml/setup-ocaml@v3 with: ocaml-compiler: ${{ inputs.ocaml_version }} + + - name: Setup OPAM environment + run: | + # Export all OPAM environment variables to GITHUB_ENV + # This avoids other steps to run `eval $(opam env)` + opam env | sed -E 's/; export [A-Za-z_][A-Za-z0-9_]*;?//g' >> $GITHUB_ENV diff --git a/.github/workflows/benches-mina-prover-set-baseline.yml b/.github/workflows/benches-mina-prover-set-baseline.yml index 3d539fe304..3251076ce1 100644 --- a/.github/workflows/benches-mina-prover-set-baseline.yml +++ b/.github/workflows/benches-mina-prover-set-baseline.yml @@ -40,7 +40,6 @@ jobs: - name: Run criterion bench run: | set -x - eval $(opam env) SAVE_BASELINE_NAME=master-baseline-data bash scripts/bench-criterion-mina-circuits.sh cargo bench -p kimchi --bench proof_criterion - name: Copy previous baseline to target folder diff --git a/.github/workflows/benches-mina-prover.yml b/.github/workflows/benches-mina-prover.yml index b589b30e46..9e7c2fa584 100644 --- a/.github/workflows/benches-mina-prover.yml +++ b/.github/workflows/benches-mina-prover.yml @@ -38,7 +38,6 @@ jobs: - name: Ensure that everything builds run: | - eval $(opam env) cargo check --benches --examples # 'sleep 1' are necessary because otherwise the outputs are intermixed. @@ -63,5 +62,4 @@ jobs: - name: Run criterion bench run: | set -x - eval $(opam env) BASELINE_NAME=master-baseline-data bash scripts/bench-criterion-mina-circuits.sh cargo bench -p kimchi --bench proof_criterion diff --git a/.github/workflows/benches.yml b/.github/workflows/benches.yml index af33333dd8..3ee8d3e21f 100644 --- a/.github/workflows/benches.yml +++ b/.github/workflows/benches.yml @@ -44,7 +44,6 @@ jobs: - name: Run criterion bench run: | set -x - eval $(opam env) cargo criterion -p kimchi --bench proof_criterion --color never > criterion_bench 2>&1 cat criterion_bench diff --git a/.github/workflows/ci-nightly.yml b/.github/workflows/ci-nightly.yml index 74977872a7..7fdf295be0 100644 --- a/.github/workflows/ci-nightly.yml +++ b/.github/workflows/ci-nightly.yml @@ -59,7 +59,6 @@ jobs: - name: Run all tests with the code coverage run: | - eval $(opam env) make nextest-all-with-coverage make test-doc-with-coverage make generate-test-coverage-report diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 834d9b3335..692848a7bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,11 +136,9 @@ jobs: - name: Doc tests run: | - eval $(opam env) make test-doc - name: generate docs run: | - eval $(opam env) make generate-doc # @@ -164,7 +162,6 @@ jobs: matrix.rust_toolchain_version == needs.define-matrix.outputs.default_rust_version && matrix.os == needs.define-matrix.outputs.default_os run: | - eval $(opam env) RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --all-features --no-deps --workspace --exclude xtask cp -r ./target/doc ./book/book/html/rustdoc @@ -209,7 +206,6 @@ jobs: - name: Lint (clippy) run: | - eval $(opam env) make lint build: @@ -242,7 +238,6 @@ jobs: - name: Ensure that everything builds run: | - eval $(opam env) make tests: @@ -283,5 +278,4 @@ jobs: - name: Run non-heavy tests without the code coverage run: | - eval $(opam env) make nextest diff --git a/.github/workflows/o1vm-ci.yml b/.github/workflows/o1vm-ci.yml index 52465d0e7c..85d30069a5 100644 --- a/.github/workflows/o1vm-ci.yml +++ b/.github/workflows/o1vm-ci.yml @@ -84,7 +84,6 @@ jobs: - name: Execute o1vm in E2E flavor using cached data run: | - eval $(opam env) cd o1vm unzip -q -o /tmp/o1vm-e2e-testing-cache.zip -d ./ RUST_LOG=debug RUN_WITH_CACHED_DATA="y" FILENAME="env-for-latest-l2-block.sh" O1VM_FLAVOR="pickles" STOP_AT="=3000000" ./run-code.sh diff --git a/.github/workflows/test-export-vectors.yml b/.github/workflows/test-export-vectors.yml index 02d4d1c516..ac8b2854d1 100644 --- a/.github/workflows/test-export-vectors.yml +++ b/.github/workflows/test-export-vectors.yml @@ -38,7 +38,6 @@ jobs: - name: Build export_test_vectors binary run: | - eval $(opam env) cargo build --bin export_test_vectors --all-features - name: Test export_test_vectors commands @@ -48,7 +47,6 @@ jobs: MODES="legacy kimchi" OUTPUT_FORMATS="json es5" - eval $(opam env) for format in $FORMATS; do for mode in $MODES; do @@ -132,6 +130,5 @@ jobs: - name: Run regression tests run: | - eval $(opam env) echo "Running regression tests..." cargo test --bin export_test_vectors test_export_regression_all_formats