Skip to content

Commit

Permalink
#291 UPDATE Pds version
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitz committed Feb 7, 2025
1 parent 8d8c930 commit 4ce691f
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 30 deletions.
21 changes: 12 additions & 9 deletions code/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.PHONY: terrat-api terrat-repo-config terrat-webhooks
.PHONY: terrat release-terrat debug-terrat

all: .merlin

Expand All @@ -11,23 +12,25 @@ pds.mk: pds.conf

terrat-schemas: terrat-api terrat-repo-config terrat-webhooks

terrat: pds.conf
terrat: release-terrat debug-terrat

terrat: release_terrat_oss debug_terrat_oss
release-terrat: release_terrat_oss release_terrat_ee release_terrat_ui

terrat: release_terrat_ee debug_terrat_ee
debug-terrat: debug_terrat_oss debug_terrat_ee debug_terrat_ui

terrat: release_terrat_ui debug_terrat_ui
debug-terrat: test-debug_abb_fut test-debug_abb_future_combinators

terrat: test-debug_abb_fut test-debug_abb_future_combinators test-release_abb_flow
release-terrat: test-release_abb_flow

terrat: test-release_terrat test-release_terrat_github_webhooks test-release_terrat_sql_of_tag_query
release-terrat: test-release_terrat test-release_terrat_github_webhooks test-release_terrat_sql_of_tag_query

terrat: test-release_jsonu
release-terrat: test-release_jsonu

terrat: test-release_abb_cache
release-terrat: test-release_abb_cache

terrat: release_terrat_code_indexer debug_terrat_code_indexer
release-terrat: release_terrat_code_indexer

debug-terrat: debug_terrat_code_indexer

terrat-api: release_openapi_cli
rm -f ./src/terrat_api/*.ml
Expand Down
2 changes: 1 addition & 1 deletion code/hll.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pds = {major_version = 5}
pds = {major_version = 6}
desc = "Monorepo"
maintainer = "[email protected]"
authors = [ "[email protected]" ]
Expand Down
2 changes: 1 addition & 1 deletion code/pds.conf
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ deps = ["base64", "containers", "mirage-crypto", "mirage-crypto-pk", "yojson"]
[src.kqueue]
install = true
deps = ["ctypes", "ctypes.foreign", "kqueue_bindings"]
compile_deps = ["kqueue_bindings_gen "]
compile_deps = ["kqueue_bindings_gen"]
extra_makefile_lines = ["include $(SRC_DIR)/kqueue.mk"]

[src.kqueue.selector.linux]
Expand Down
44 changes: 27 additions & 17 deletions docker/terrat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,15 @@ RUN apk add --no-cache \
opam \
openssh \
perl \
pkgconfig \
py3-yaml \
python3 \
sqlite-dev \
yj \
zlib-dev

# Initialize opam
RUN opam init -ay --disable-sandboxing

# Set up OCaml compiler
RUN eval $(opam env) && \
opam switch create -y 5.1.1
RUN opam init -ay --disable-sandboxing --bare

# Build libkqueue
COPY ./vendor/libkqueue /mono/vendor/libkqueue
Expand All @@ -53,10 +50,13 @@ WORKDIR /

# Set up opam repositories and dependencies
RUN eval $(opam env) && \
opam repository set-url default "https://github.com/jjm-enterprises/opam-repository.git#terrateam" && \
opam repository set-url --set-default default "https://github.com/jjm-enterprises/opam-repository.git#terrateam" && \
opam switch create -y 5.1.1 && \
eval $(opam env) && \
opam repository add opam-acsl mono/opam && \
opam pin add -y containers 3.12 && \
opam install -y hll pds && \
opam pin add -y pds 6.46 --no-depexts && \
opam pin add -y hll 4.3 --no-depexts && \
mkdir -p opam-mono/compilers opam-mono/packages && \
echo 'opam-version: "2.0"' > opam-mono/repo && \
opam repository add opam-mono opam-mono && \
Expand All @@ -69,7 +69,11 @@ RUN eval $(opam env) && \
--url-override file://$PWD && \
opam update opam-mono && \
opam info monorepo && \
opam install -j4 -y --deps-only --no-depexts monorepo
opam install -j$(nproc --alll) -y --deps-only --no-depexts monorepo && \
ulimit -s 524288 && ulimit -a && \
time pds && \
time make -j$(nproc --all) release-terrat && \
mv build /build-cache

# Use provided BASE_IMAGE if specified, otherwise use the build-base stage
FROM ${BASE_IMAGE:-build-base} as build-setup
Expand All @@ -80,30 +84,36 @@ COPY ./ /mono
# Build target for code-indexer
FROM build-setup as code-indexer-build
WORKDIR /mono/code
RUN ulimit -s 524288 && ulimit -a && eval $(opam env) && pds && \
(time make -j4 release_terrat_code_indexer || time make -j1 release_terrat_code_indexer)
RUN ulimit -s 524288 && ulimit -a && \
mv /build-cache ./build && \
eval $(opam env) && pds && \
(time make -j$(nproc --all) release_terrat_code_indexer || time make -j1 release_terrat_code_indexer)
RUN eval $(opam env) && \
time env OCAMLRUNPARAM=b make -j4 -k test && \
time env OCAMLRUNPARAM=b make -j$(nproc --all) -k test && \
find . -name '*.tap' -exec cat '{}' \;

# Build target for terrat-ee
FROM build-setup as terrat-ee-build
ARG TERRAT_UI_ANALYTICS=false
WORKDIR /mono/code
RUN ulimit -s 524288 && ulimit -a && eval $(opam env) && pds && \
(time env TERRAT_UI_ANALYTICS=$TERRAT_UI_ANALYTICS make -j4 release_terrat_ee release_terrat_ui \
RUN ulimit -s 524288 && ulimit -a && \
mv /build-cache ./build && \
eval $(opam env) && pds && \
(time env TERRAT_UI_ANALYTICS=$TERRAT_UI_ANALYTICS make -j$(nproc --all) release_terrat_ee release_terrat_ui \
|| time env TERRAT_UI_ANALYTICS=$TERRAT_UI_ANALYTICS make -j1 release_terrat_ee release_terrat_ui)
RUN eval $(opam env) && \
time env OCAMLRUNPARAM=b make -j4 -k test && \
time env OCAMLRUNPARAM=b make -j$(nproc --all) -k test && \
find . -name '*.tap' -exec cat '{}' \;

# Build target for terrat-oss
FROM build-setup as terrat-oss-build
WORKDIR /mono/code
RUN ulimit -s 524288 && ulimit -a && eval $(opam env) && pds && \
(time make -j4 release_terrat_oss || time make -j1 release_terrat_oss)
RUN ulimit -s 524288 && ulimit -a && \
mv /build-cache ./build && \
eval $(opam env) && pds && \
(time make -j$(nproc --all) release_terrat_oss || time make -j1 release_terrat_oss)
RUN eval $(opam env) && \
time env OCAMLRUNPARAM=b make -j4 -k test && \
time env OCAMLRUNPARAM=b make -j$(nproc --all) -k test && \
find . -name '*.tap' -exec cat '{}' \;

# Final code-indexer image
Expand Down
4 changes: 2 additions & 2 deletions opam/packages/hll/hll.4.3/opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ remove: [

depends: [
"cmdliner" { >= "1.3.0" }
"containers" { >= "3.12.0" }
"containers" { >= "3.12" }
"ocaml" { >= "4.12.0" }
"ocamlfind"
"pds" { build & (>= "5" & < "6") }
"pds" { build & (>= "6" & < "7") }
"process" { >= "0.2.1" }
"sha"
"toml" { >= "6" }
Expand Down
40 changes: 40 additions & 0 deletions opam/packages/merlin-of-pds/merlin-of-pds.1.4/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
opam-version: "2.0"
maintainer: "[email protected]"
build: [
[make "-j%{jobs}%"]
[make "-j%{jobs}%" "test"] {with-test}
]

install: [
[make "PREFIX=%{prefix}%" "install"]
]

remove: [
[make "PREFIX=%{prefix}%" "remove"]
]

depends: [
"ocamlfind"
"pds" { build & (>= "6" & < "7") }
]

authors: [
"[email protected]"
]

description: """
Simple script that turns a pds.conf into a .merlin file
"""

homepage: "https://bitbucket.org/acslab/merlin-of-pds"

url {
src: "https://bitbucket.org/acslab/merlin-of-pds/get/1.4.tar.gz"
checksum: [
"md5=7392d566419232c46424fab4706570ff"
"sha256=40584fb5134127a6b19be74cc787be6f2efea5c4d12ad3d01eddcfa5457b987e"
]
}
bug-reports: "https://bitbucket.org/acslab/merlin-of-pds/issues"
dev-repo: "https://bitbucket.org/acslab/merlin-of-pds.git"

48 changes: 48 additions & 0 deletions opam/packages/pds/pds.6.46/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
opam-version: "2.0"
maintainer: "[email protected]"
build: [
[make "-j%{jobs}%"]
[make "-j%{jobs}%" "test"] {with-test}
]

install: [
[make "PREFIX=%{prefix}%" "install"]
]

remove: [
[make "PREFIX=%{prefix}%" "remove"]
]

depends: [
"cmdliner" { >= "1.3.0" }
"containers" { >= "3.12" }
"crunch"
"ocaml" { >= "4.12.0" }
"ocamlfind"
"ppx_deriving"
"process" { >= "0.2.1" }
"sedlex"
"sqlite3"
"toml" { >= "6" }
]

authors: [
"[email protected]"
]

description: """
A tool to build Makefiles for Ocaml projects.
"""

homepage: "https://hg.sr.ht/~mmatalka/pds"

url {
src: "http://acsl-pkgs.s3.amazonaws.com/pds-6.46.tar.gz"
checksum: [
"md5=e9100ce7462fea1d0f17e261bba00f50"
"sha256=4b82cc52a9fc86f1d0fd7ae58d48a977935cb7e6a33b383d5988a03176274a88"
]
}
bug-reports: "https://todo.sr.ht/~mmatalka/pds"
dev-repo: "hg+ssh://[email protected]/~mmatalka/pds"

0 comments on commit 4ce691f

Please sign in to comment.