Skip to content

Commit 66e8077

Browse files
committed
Updated makefile to include opam check
1 parent c6529e9 commit 66e8077

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,21 @@ jobs:
9797
vrf-tests:
9898
timeout-minutes: 8
9999
runs-on: ubuntu-24.04
100+
strategy:
101+
matrix:
102+
ocaml_version: [4.14.2]
100103
steps:
101104
- name: Git checkout
102105
uses: actions/checkout@v5
103106

104107
- name: Setup build dependencies
105108
uses: ./.github/actions/setup-build-deps
106109

110+
- name: Use shared OCaml setting up steps
111+
uses: ./.github/actions/setup-ocaml
112+
with:
113+
ocaml_version: ${{ matrix.ocaml_version }}
114+
107115
- name: Setup Rust
108116
uses: ./.github/actions/setup-rust
109117
with:

.github/workflows/doc-commands.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ concurrency:
2222
jobs:
2323
test-doc-commands:
2424
runs-on: ubuntu-22.04
25+
strategy:
26+
matrix:
27+
ocaml_version: [4.14.2]
2528
steps:
2629
- name: Git checkout
2730
uses: actions/checkout@v5
@@ -36,6 +39,11 @@ jobs:
3639
toolchain: 1.84
3740
cache-prefix: test-doc-commands-v0
3841

42+
- name: Use shared OCaml setting up steps
43+
uses: ./.github/actions/setup-ocaml
44+
with:
45+
ocaml_version: ${{ matrix.ocaml_version }}
46+
3947
- name: Download circuits files
4048
uses: ./.github/actions/setup-circuits
4149

.github/workflows/lint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,15 @@ jobs:
5151
matrix:
5252
os: [ubuntu-24.04]
5353
toolchain: [nightly]
54+
ocaml_version: [4.14.2]
5455
steps:
5556
- uses: actions/checkout@v5
5657
- name: Setup build dependencies
5758
uses: ./.github/actions/setup-build-deps
59+
- name: Use shared OCaml setting up steps
60+
uses: ./.github/actions/setup-ocaml
61+
with:
62+
ocaml_version: ${{ matrix.ocaml_version }}
5863
- name: Setup Rust
5964
uses: ./.github/actions/setup-rust
6065
with:

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ NETWORK ?= devnet
2525
VERBOSITY ?= info
2626
GIT_COMMIT := $(shell git rev-parse --short=8 HEAD)
2727

28+
OPAM_PATH := $(shell command -v opam 2>/dev/null)
29+
30+
ifdef OPAM_PATH
31+
# This captures what `eval $(opam env)` would set in your shell
32+
OPAM_ENV := $(shell eval $$(opam env) && env | grep '^OPAM\|^PATH\|^CAML' | sed 's/^/export /')
33+
export $(shell eval $$(opam env) && env | grep '^OPAM\|^PATH\|^CAML' | cut -d= -f1)
34+
$(foreach v,$(shell eval $$(opam env) && env | grep '^OPAM\|^PATH\|^CAML'),$(eval export $(v)))
35+
endif
36+
2837
.PHONY: help
2938
help: ## Ask for help!
3039
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)