Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpouzet committed Oct 30, 2024
1 parent ec4b84d commit ca32f79
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build

on:
- push
- pull_request
- workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
solver:
- nosundials
plot:
- nogtk
ocaml-version:
- 5.2.0
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install OCaml dependencies
run: opam install -y graphics menhir alcotest

- name: Install Sundials
if: matrix.solver == 'sundials'
run: opam depext conf-sundials

- name: Install Sundials/ML
if: matrix.solver == 'sundials'
run: opam install sundialsml

- name: Install Zelus
run: |
opam pin -y -n -k path .
opam install -y zelus
- name: Install Gtk
if: matrix.plot == 'gtk'
run: opam install -y zelus-gtk
25 changes: 25 additions & 0 deletions .github/workflows/opam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Opam

on:
push:
branches:
- 2024

jobs:
build:
runs-on: ubuntu-latest

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

- name: Use OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 5.2.0

- name: Install OCaml dependencies
run: |
opam install graphics zelus

4 changes: 3 additions & 1 deletion src/compiler/main/compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ let print_message comment =
let do_step comment output step input =
print_message comment;
let o = step input in
if !Misc.debug then output Format.err_formatter o;
if !Misc.verbose then output Format.err_formatter o;
o

let do_optional_step no_step comment output step input =
Expand Down Expand Up @@ -162,6 +162,8 @@ let compile modname filename =
let p = do_step "Mark functions calls to be inlined. See below:"
Printer.program Markfunctions.program p in

let _ = Zelus.pp_program p in

(* source-to-source transformations *)

(* defines the initial global environment for values *)
Expand Down
1 change: 1 addition & 0 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
(libraries zelus.parser_lib zelus.global_lib zelus.zrun_lib
zelus.typing_lib zelus.causality_lib zelus.initialization_lib
zelus.rewrite_lib zelus.seqcode_lib)
(preprocess (pps ppx_deriving.show))
(promote (until-clean) (into ..)))

(install
Expand Down
3 changes: 3 additions & 0 deletions src/global/zelus.ml
Original file line number Diff line number Diff line change
Expand Up @@ -488,4 +488,7 @@ and ('info, 'ienv) implementation_desc =
type ('info, 'ienv) program =
{ p_impl_list : ('info, 'ienv) implementation list;
p_index : Ident.num }
[@@deriving show]

let f = show_program;;

0 comments on commit ca32f79

Please sign in to comment.