Skip to content

Commit cead344

Browse files
committed
CI: simplify OPAM environment loading
1 parent 94982ca commit cead344

File tree

8 files changed

+7
-15
lines changed

8 files changed

+7
-15
lines changed

.github/actions/ocaml-shared/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ runs:
1111
uses: ocaml/setup-ocaml@v3
1212
with:
1313
ocaml-compiler: ${{ inputs.ocaml_version }}
14+
15+
- name: Setup OPAM environment
16+
shell: bash
17+
run: |
18+
# Export all OPAM environment variables to GITHUB_ENV
19+
# This avoids other steps to run `eval $(opam env)`
20+
opam env >> $GITHUB_ENV

.github/workflows/benches-mina-prover-set-baseline.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
- name: Run criterion bench
4141
run: |
4242
set -x
43-
eval $(opam env)
4443
SAVE_BASELINE_NAME=master-baseline-data bash scripts/bench-criterion-mina-circuits.sh cargo bench -p kimchi --bench proof_criterion
4544
4645
- name: Copy previous baseline to target folder

.github/workflows/benches-mina-prover.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838

3939
- name: Ensure that everything builds
4040
run: |
41-
eval $(opam env)
4241
cargo check --benches --examples
4342
4443
# 'sleep 1' are necessary because otherwise the outputs are intermixed.
@@ -63,5 +62,4 @@ jobs:
6362
- name: Run criterion bench
6463
run: |
6564
set -x
66-
eval $(opam env)
6765
BASELINE_NAME=master-baseline-data bash scripts/bench-criterion-mina-circuits.sh cargo bench -p kimchi --bench proof_criterion

.github/workflows/benches.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
- name: Run criterion bench
4545
run: |
4646
set -x
47-
eval $(opam env)
4847
cargo criterion -p kimchi --bench proof_criterion --color never > criterion_bench 2>&1
4948
cat criterion_bench
5049

.github/workflows/ci-nightly.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ jobs:
5959

6060
- name: Run all tests with the code coverage
6161
run: |
62-
eval $(opam env)
6362
make nextest-all-with-coverage
6463
make test-doc-with-coverage
6564
make generate-test-coverage-report

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,9 @@ jobs:
136136
137137
- name: Doc tests
138138
run: |
139-
eval $(opam env)
140139
make test-doc
141140
- name: generate docs
142141
run: |
143-
eval $(opam env)
144142
make generate-doc
145143
146144
#
@@ -164,7 +162,6 @@ jobs:
164162
matrix.rust_toolchain_version == needs.define-matrix.outputs.default_rust_version &&
165163
matrix.os == needs.define-matrix.outputs.default_os
166164
run: |
167-
eval $(opam env)
168165
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --all-features --no-deps --workspace --exclude xtask
169166
cp -r ./target/doc ./book/book/html/rustdoc
170167
@@ -209,7 +206,6 @@ jobs:
209206

210207
- name: Lint (clippy)
211208
run: |
212-
eval $(opam env)
213209
make lint
214210
215211
build:
@@ -242,7 +238,6 @@ jobs:
242238

243239
- name: Ensure that everything builds
244240
run: |
245-
eval $(opam env)
246241
make
247242
248243
tests:
@@ -283,5 +278,4 @@ jobs:
283278

284279
- name: Run non-heavy tests without the code coverage
285280
run: |
286-
eval $(opam env)
287281
make nextest

.github/workflows/o1vm-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ jobs:
8484

8585
- name: Execute o1vm in E2E flavor using cached data
8686
run: |
87-
eval $(opam env)
8887
cd o1vm
8988
unzip -q -o /tmp/o1vm-e2e-testing-cache.zip -d ./
9089
RUST_LOG=debug RUN_WITH_CACHED_DATA="y" FILENAME="env-for-latest-l2-block.sh" O1VM_FLAVOR="pickles" STOP_AT="=3000000" ./run-code.sh

.github/workflows/test-export-vectors.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838

3939
- name: Build export_test_vectors binary
4040
run: |
41-
eval $(opam env)
4241
cargo build --bin export_test_vectors --all-features
4342
4443
- name: Test export_test_vectors commands
@@ -48,7 +47,6 @@ jobs:
4847
MODES="legacy kimchi"
4948
OUTPUT_FORMATS="json es5"
5049
51-
eval $(opam env)
5250
5351
for format in $FORMATS; do
5452
for mode in $MODES; do
@@ -132,6 +130,5 @@ jobs:
132130
133131
- name: Run regression tests
134132
run: |
135-
eval $(opam env)
136133
echo "Running regression tests..."
137134
cargo test --bin export_test_vectors test_export_regression_all_formats

0 commit comments

Comments
 (0)