Skip to content

Commit

Permalink
no more camlp5
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Dec 1, 2023
1 parent 98db6de commit c58068e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 1,005 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,10 @@ jobs:
- 4.08.x
profile:
- dev
parser:
- menhir
include:
- os: ubuntu-latest
ocaml-compiler: 5.1.x
profile: fatalwarnings
parser: menhir
- os: ubuntu-latest
ocaml-compiler: 4.11.x
profile: dev
parser: menhir-camlp5

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

Expand Down Expand Up @@ -98,66 +91,57 @@ jobs:
run: |
opam install ./elpi.opam --deps-only --with-doc --with-test
- name: Install optional dependencies for menhir-camlp5 parser
if: matrix.parser == 'menhir-camlp5'
run: |
opam depext camlp5 || true # no depext on opam 2.1
sudo apt-get install libstring-shellquote-perl
sudo apt-get install libipc-system-simple-perl
opam install ./elpi-option-legacy-parser.opam
opam exec -- make config LEGACY_PARSER=1
- name: Build elpi with dune profile ${{ matrix.profile }}
run: |
opam exec -- dune subst
opam exec -- make build DUNE_OPTS='--profile ${{ matrix.profile }}'
opam exec -- cp _build/install/default/bin/elpi elpi-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe
opam exec -- cp _build/install/default/bin/elpi-trace-elaborator elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe
opam exec -- cp _build/install/default/bin/elpi elpi-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe
opam exec -- cp _build/install/default/bin/elpi-trace-elaborator elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe
- name: Strip binary
run: |
opam exec -- chmod u+w ${{ env.workspace }}/elpi-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe
opam exec -- chmod u+w ${{ env.workspace }}/elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe
opam exec -- strip ${{ env.workspace }}/elpi-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe
opam exec -- strip ${{ env.workspace }}/elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe
opam exec -- chmod u+w ${{ env.workspace }}/elpi-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe
opam exec -- chmod u+w ${{ env.workspace }}/elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe
opam exec -- strip ${{ env.workspace }}/elpi-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe
opam exec -- strip ${{ env.workspace }}/elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe
# Artifacts 1 ################################################################

- name: Save binary
uses: actions/upload-artifact@v2
with:
name: elpi-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}
path: elpi*-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe
name: elpi-${{ matrix.ocaml-compiler }}-${{ runner.os }}
path: elpi*-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe

# Test ######################################################################
#
# We run the test suite which also produces data.csf containing benchmarks

- name: Test elpi on Unix
if: runner.os != 'Windows'
run: opam exec -- make tests RUNNERS='dune ${{ env.workspace }}/elpi-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe ${{ env.workspace }}/elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe'
run: opam exec -- make tests RUNNERS='dune ${{ env.workspace }}/elpi-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe ${{ env.workspace }}/elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe'

- name: Test elpi on Windows
if: runner.os == 'Windows'
run: |
opam exec -- ls -l tests/sources/*.elpi
opam exec -- make tests PWD=${{ env.workspace }} RUNNERS='dune ${{ env.workspace }}/elpi-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe ${{ env.workspace }}/elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}.exe' TIME=--time=${{ env.cygwin_root }}/bin/time.exe
opam exec -- make tests PWD=${{ env.workspace }} RUNNERS='dune ${{ env.workspace }}/elpi-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe ${{ env.workspace }}/elpi-trace-elaborator-${{ matrix.ocaml-compiler }}-${{ runner.os }}.exe' TIME=--time=${{ env.cygwin_root }}/bin/time.exe
# Artifacts 2 ################################################################

- name: Save logs
uses: actions/upload-artifact@v2
if: always()
with:
name: .logs-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}
name: .logs-${{ matrix.ocaml-compiler }}-${{ runner.os }}
path: _log
retention-days: 1

- name: Save benchmarking data
uses: actions/upload-artifact@v2
if: always()
with:
name: .benchmark-${{ matrix.ocaml-compiler }}-${{ matrix.parser }}-${{ runner.os }}
name: .benchmark-${{ matrix.ocaml-compiler }}-${{ runner.os }}
path: data.csv
retention-days: 1

Expand Down
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# v1.18.1 (December 2023)

Requires Menhir 20211230 and OCaml 4.08 or above.
Camlp5 8.0 or above is optional.

Parser:
- Remove legacy parsing engine based on Camlp5

API:
- New `RawQuery.compile_ast`, lets one set up the initial state in which the
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ DUNE_OPTS=
build:
dune build $(DUNE_OPTS) @all

config:
@(if [ -z $$LEGACY_PARSER ]; \
then echo '(dirs :standard \ legacy_parser)'; \
else echo '(dirs :standard )'; \
fi ) > src/dune.config

install:
dune install $(DUNE_OPTS)

Expand Down
19 changes: 0 additions & 19 deletions elpi-option-legacy-parser.opam

This file was deleted.

7 changes: 0 additions & 7 deletions elpi.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ bug-reports: "https://github.com/LPCIC/elpi/issues"

build: [
["dune" "subst"] {dev}
[make "config" "LEGACY_PARSER=1"] {elpi-option-legacy-parser:installed}
["dune" "build" "-p" name "-j" jobs]
[make "tests" "DUNE_OPTS=-p %{name}%" "SKIP=performance_HO" "SKIP+=performance_FO" "SKIP+=elpi_api_performance"] {with-test & os != "macos" & os-distribution != "alpine" & os-distribution != "freebsd"}
]
Expand All @@ -29,12 +28,6 @@ depends: [
"atdts" {>= "2.10.0"}
"odoc" {with-doc}
]
depopts: [
"elpi-option-legacy-parser"
]
conflicts: [
"elpi-option-legacy-parser" {!= "1"}
]
synopsis: "ELPI - Embeddable λProlog Interpreter"
description: """
ELPI implements a variant of λProlog enriched with Constraint Handling Rules,
Expand Down
2 changes: 0 additions & 2 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,3 @@
(rule
(targets trace.ts)
(action (run atdts %{dep:trace.atd})))

(include dune.config)
7 changes: 0 additions & 7 deletions src/legacy_parser/dune

This file was deleted.

Loading

0 comments on commit c58068e

Please sign in to comment.