Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to track OCaml trunk and bump to OCaml 5.3 #463

Merged
merged 4 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 11 additions & 95 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-5-2:
build-5-3:
strategy:
matrix:
os:
Expand All @@ -35,7 +35,7 @@ jobs:
- run: opam install . --deps-only --with-test

# Runs a set of commands using the runners shell
- name: 5.2.0+trunk+serial
- name: 5.3.0+trunk+serial
run: |
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip autoconf jo libgmp-dev
pip3 install intervaltree
Expand All @@ -44,12 +44,12 @@ jobs:
export OPAM_DISABLE_SANDBOXING=true
TAG='"run_in_ci"' make run_config_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' run_config_filtered.json
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 RUN_CONFIG_JSON=run_config_filtered.json make ocaml-versions/5.2.0+trunk.bench
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 RUN_CONFIG_JSON=run_config_filtered.json make ocaml-versions/5.3.0+trunk.bench
ls _results
cat _results/*
make json

- name: 5.2.0+trunk+parallel
- name: 5.3.0+trunk+parallel
run: |
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip autoconf jo libgmp-dev
pip3 install intervaltree
Expand All @@ -61,12 +61,12 @@ jobs:
sed -i 's/--cpu-list 5/--cpu-list 1/g' multicore_parallel_run_config_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' multicore_parallel_run_config_filtered_filtered.json
make multicore_parallel_run_config_filtered_filtered_2domains.json
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 BUILD_BENCH_TARGET=multibench_parallel RUN_CONFIG_JSON=multicore_parallel_run_config_filtered_filtered_2domains.json make ocaml-versions/5.2.0+trunk.bench
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 BUILD_BENCH_TARGET=multibench_parallel RUN_CONFIG_JSON=multicore_parallel_run_config_filtered_filtered_2domains.json make ocaml-versions/5.3.0+trunk.bench
ls _results
cat _results/*
make json

build-5-1:
build-5-2:
strategy:
matrix:
os:
Expand All @@ -91,38 +91,7 @@ jobs:
- run: opam install . --deps-only --with-test

# Runs a set of commands using the runners shell
- name: 5.1.0+stable
run: |
# TODO: Add gnuplot-x11 when irmin benchmarks are enabled
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip autoconf jo gnuplot-x11 libgmp-dev
pip3 install intervaltree
eval $(opam env)
export ITER=1
export OPAM_DISABLE_SANDBOXING=true
TAG='"run_in_ci"' make run_config_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' run_config_filtered.json
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 RUN_CONFIG_JSON=run_config_filtered.json make ocaml-versions/5.1.0+stable.bench
ls _results
cat _results/*
make json

- name: 5.1.0+stable+parallel
run: |
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip autoconf jo libgmp-dev
pip3 install intervaltree
eval $(opam env)
export ITER=1
export OPAM_DISABLE_SANDBOXING=true
TAG='"run_in_ci"' make multicore_parallel_run_config_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' multicore_parallel_run_config_filtered.json
TAG='"macro_bench"' make multicore_parallel_run_config_filtered_filtered.json
make multicore_parallel_run_config_filtered_filtered_2domains.json
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 BUILD_BENCH_TARGET=multibench_parallel RUN_CONFIG_JSON=multicore_parallel_run_config_filtered_filtered_2domains.json make ocaml-versions/5.1.0+stable.bench
ls _results
cat _results/*
make json

- name: 5.1.1+trunk+serial
- name: 5.2.0+trunk+serial
run: |
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip autoconf jo libgmp-dev
pip3 install intervaltree
Expand All @@ -131,12 +100,12 @@ jobs:
export OPAM_DISABLE_SANDBOXING=true
TAG='"run_in_ci"' make run_config_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' run_config_filtered.json
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 RUN_CONFIG_JSON=run_config_filtered.json make ocaml-versions/5.1.1+trunk.bench
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 RUN_CONFIG_JSON=run_config_filtered.json make ocaml-versions/5.2.0+trunk.bench
ls _results
cat _results/*
make json

- name: 5.1.1+trunk+parallel
- name: 5.2.0+trunk+parallel
run: |
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip autoconf jo libgmp-dev
pip3 install intervaltree
Expand All @@ -148,64 +117,11 @@ jobs:
sed -i 's/--cpu-list 5/--cpu-list 1/g' multicore_parallel_run_config_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' multicore_parallel_run_config_filtered_filtered.json
make multicore_parallel_run_config_filtered_filtered_2domains.json
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 BUILD_BENCH_TARGET=multibench_parallel RUN_CONFIG_JSON=multicore_parallel_run_config_filtered_filtered_2domains.json make ocaml-versions/5.1.1+trunk.bench
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 BUILD_BENCH_TARGET=multibench_parallel RUN_CONFIG_JSON=multicore_parallel_run_config_filtered_filtered_2domains.json make ocaml-versions/5.2.0+trunk.bench
ls _results
cat _results/*
make json

build-5-0:
strategy:
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- 4.13.x

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check Valid ocaml-version/*.json and URLs
run: make check_url

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- run: opam install . --deps-only --with-test

- name: 5.0.1+trunk+serial
run: |
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip autoconf jo libgmp-dev
pip3 install intervaltree
eval $(opam env)
export ITER=1
export OPAM_DISABLE_SANDBOXING=true
TAG='"run_in_ci"' make run_config_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' run_config_filtered.json
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 RUN_CONFIG_JSON=run_config_filtered.json make ocaml-versions/5.0.1+trunk.bench
ls _results
cat _results/*

- name: 5.0.1+trunk+parallel
run: |
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip autoconf jo libgmp-dev
pip3 install intervaltree
eval $(opam env)
export ITER=1
export OPAM_DISABLE_SANDBOXING=true
TAG='"run_in_ci"' make multicore_parallel_run_config_filtered.json
TAG='"macro_bench"' make multicore_parallel_run_config_filtered_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' multicore_parallel_run_config_filtered.json
sed -i 's/--cpu-list 5/--cpu-list 1/g' multicore_parallel_run_config_filtered_filtered.json
make multicore_parallel_run_config_filtered_filtered_2domains.json
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 BUILD_BENCH_TARGET=multibench_parallel RUN_CONFIG_JSON=multicore_parallel_run_config_filtered_filtered_2domains.json make ocaml-versions/5.0.1+trunk.bench
ls _results
cat _results/*

build-4-14:
strategy:
matrix:
Expand Down Expand Up @@ -271,7 +187,7 @@ jobs:
sudo apt-get update && sudo apt-get -y install wget pkg-config libgmp-dev m4 libdw-dev jq python3-pip jo libgmp-dev
python3 -m pip install markupsafe==2.0.1
export PATH=$PATH:/home/opam/.local/bin
pip3 install jupyter nbconvert seaborn pandas==1.5.3 numpy==1.23.5
pip3 install jupyter nbconvert seaborn==0.11.2 pandas==1.5.3 numpy==1.23.5
cd notebooks/sequential
sudo chmod 777 .
jupyter nbconvert --to html --execute sequential.ipynb
Expand Down
17 changes: 3 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ endif
opam update
OCAMLRUNPARAM="$(OCAML_RUN_PARAM)" OCAMLCONFIGOPTION="$(OCAML_CONFIG_OPTION)" opam switch create --keep-build-dir --yes $* ocaml-base-compiler.$*
@{ case "$*" in \
*5.2*) opam pin add -n --yes --switch $* sexplib0.v0.15.0 https://github.com/shakthimaan/sexplib0.git#multicore;; \
*5.1*) opam pin add -n --yes --switch $* sexplib0.v0.15.0 https://github.com/shakthimaan/sexplib0.git#multicore;; \
*5.*) opam pin add -n --yes --switch $* sexplib0.v0.15.0 https://github.com/shakthimaan/sexplib0.git#multicore;; \
esac };
# TODO remove pin when a new orun version is released on opam
opam pin add -n --yes --switch $* orun https://github.com/ocaml-bench/orun.git
Expand All @@ -168,9 +167,7 @@ override_packages/%: setup_sys_dune/%
$(eval DEV_OPAM = $(OPAMROOT)/$(CONFIG_SWITCH_NAME)/share/dev.opam)
# Retrieve set of version constraints for chosen OCaml version
@{ case "$*" in \
*5.2.0*) echo "Using template/dev-5.2.0+trunk.opam" && cp dependencies/template/dev-5.2.0+trunk.opam $(DEV_OPAM) ;; \
*5.1.0*) echo "Using template/dev-5.1.0+trunk.opam" && cp dependencies/template/dev-5.1.0+trunk.opam $(DEV_OPAM) ;; \
*5.0.1*) echo "Using template/dev-5.0.1+trunk.opam" && cp dependencies/template/dev-5.0.0+trunk.opam $(DEV_OPAM) ;; \
*5.*) echo "Using template/dev-5.x.opam" && cp dependencies/template/dev-5.x.opam $(DEV_OPAM) ;; \
*4.14*) echo "Using template/dev-4.14.0.opam" && cp dependencies/template/dev-4.14.0.opam $(DEV_OPAM) ;; \
*) echo "Using template/dev.opam" && cp dependencies/template/dev.opam $(DEV_OPAM) ;; \
esac };
Expand Down Expand Up @@ -372,15 +369,7 @@ filter/%:
$(eval CONFIG_VARIANT = $(shell echo $(CONFIG_SWITCH_NAME) | grep -oP '([0-9]|\.)*' ))
@echo $(CONFIG_VARIANT)
@{ case $(CONFIG_VARIANT) in \
*5.2*) echo "Filtering some benchmarks for OCaml ${CONFIG_VARIANT}"; \
jq '{wrappers : .wrappers, benchmarks: [.benchmarks | .[] | select( .name as $$name | ["irmin_replay", "cpdf", "frama-c", "js_of_ocaml", "graph500_kernel1", "graph500_kernel1_multicore"] | index($$name) | not )]}' $(RUN_CONFIG_JSON) > $(RUN_CONFIG_JSON).tmp; \
mv $(RUN_CONFIG_JSON).tmp $(RUN_CONFIG_JSON); \
echo "(data_only_dirs irmin cpdf frama-c)" > benchmarks/dune;; \
*5.1*) echo "Filtering some benchmarks for OCaml ${CONFIG_VARIANT}"; \
jq '{wrappers : .wrappers, benchmarks: [.benchmarks | .[] | select( .name as $$name | ["irmin_replay", "cpdf", "frama-c", "js_of_ocaml", "graph500_kernel1", "graph500_kernel1_multicore"] | index($$name) | not )]}' $(RUN_CONFIG_JSON) > $(RUN_CONFIG_JSON).tmp; \
mv $(RUN_CONFIG_JSON).tmp $(RUN_CONFIG_JSON); \
echo "(data_only_dirs irmin cpdf frama-c)" > benchmarks/dune;; \
*5.0*) echo "Filtering some benchmarks for OCaml ${CONFIG_VARIANT}"; \
*5.*) echo "Filtering some benchmarks for OCaml ${CONFIG_VARIANT}"; \
jq '{wrappers : .wrappers, benchmarks: [.benchmarks | .[] | select( .name as $$name | ["irmin_replay", "cpdf", "frama-c", "js_of_ocaml", "graph500_kernel1", "graph500_kernel1_multicore"] | index($$name) | not )]}' $(RUN_CONFIG_JSON) > $(RUN_CONFIG_JSON).tmp; \
mv $(RUN_CONFIG_JSON).tmp $(RUN_CONFIG_JSON); \
echo "(data_only_dirs irmin cpdf frama-c)" > benchmarks/dune;; \
Expand Down
43 changes: 0 additions & 43 deletions dependencies/template/dev-5.1.0+trunk.opam

This file was deleted.

43 changes: 0 additions & 43 deletions dependencies/template/dev-5.2.0+trunk.opam

This file was deleted.

2 changes: 1 addition & 1 deletion ocaml-versions/5.2.0+trunk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"url" : "https://github.com/ocaml/ocaml/archive/trunk.tar.gz",
"url" : "https://github.com/ocaml/ocaml/archive/refs/heads/5.2.zip",
"package_overrides": [
"fmt.0.9.0",
"ocamlfind.1.9.3.git"
Expand Down
30 changes: 30 additions & 0 deletions ocaml-versions/5.3.0+trunk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"url" : "https://github.com/ocaml/ocaml/archive/trunk.tar.gz",
"package_overrides": [
"fmt.0.9.0",
"ocamlfind.1.9.3.git"
],
"package_remove": [
"camlpdf",
"cpdf",
"coq",
"coq-core",
"coq-stdlib",
"ctypes",
"fraplib",
"index",
"integers",
"irmin",
"irmin-layers",
"irmin-pack",
"js_of_ocaml-compiler",
"ocaml-migrate-parsetree",
"ppx_derivers",
"ppx_deriving",
"ppx_deriving_yojson",
"ppx_irmin",
"ppxlib",
"ppx_repr",
"stdio"
]
}