-
Notifications
You must be signed in to change notification settings - Fork 21
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
Dune based build #83
Dune based build #83
Conversation
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for the change to ocaml_versions.py
.
I confirm that the change to fpfile.ml
fixes a bug.
This reverts commit fc7a310. Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
8dd911f
to
7826dec
Compare
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
E.g. `gh act --secret GITHUB_TOKEN=.. --reuse` Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
The PR is ready to be reviewed. In general, it adds:
There are some problems still, but I hope those are not blockers:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need some work to make it run on MacOS and Windows.
deps/isabelle/Makefile
Outdated
@@ -0,0 +1,55 @@ | |||
ISABELLE_VSN:=Isabelle2011-1 | |||
ISABELLE_TGZ:=$(ISABELLE_VSN)_bundle_x86-linux.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails in MacOS, and most probably on Windows.
In MacOS, you have to download a .dmg
file, which is not a .tar.gz
, and use a different set of commands to extract files from it. IOW, the recipe for $(ISABELLE_DIR): $(ISABELLE_TGZ)
will have to be completely different. Does dune
give you access to the OS name, or will you need to make this a Makefile.in
and tweak configure
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the makefile to consider different OS types. Isabelle still doesn't work.
- On MacOS, I'm getting
poly: Bad CPU type in executable
, I guess the 32 bit support is missing. At least it was needed on Linux for Isabelle to work. - On Cygwin, the following DLLs/Versions are missing:
cyggcc_s-1.dll
,cyggmp-3.dll
and I can't find them for installation in the Cygwin package repository. The old release script was addingcyggmp-3.dll
to the Isabelle, but the DLL is not committed to the repo; thus, I guess it should fail as well.
deps/z3/Makefile
Outdated
@@ -0,0 +1,20 @@ | |||
Z3_VERS=4.8.9 | |||
Z3_URL_PREFIX=https://github.com/Z3Prover/z3/releases/download/z3-$(Z3_VERS) | |||
Z3_BASE_NAME=z3-${Z3_VERS}-x64-ubuntu-16.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like Isabelle, this is not going to work on MacOS and Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the makefiles (for all backends: z3
, ls4
, zenon
and isabelle
). All work on MacOS and Cygwin except the Isabelle (comments above).
"Kaustuv Chaudhuri" | ||
"Denis Cousineau" | ||
"Damien Doligez" | ||
"Leslie Lamport" | ||
"Tomer Libal" | ||
"Stephan Merz" | ||
"Jean-Baptiste Tristan" | ||
"Hernan Vanzetto") | ||
(maintainers | ||
"Kaustuv Chaudhuri" | ||
"Denis Cousineau" | ||
"Damien Doligez" | ||
"Leslie Lamport" | ||
"Tomer Libal" | ||
"Stephan Merz" | ||
"Jean-Baptiste Tristan" | ||
"Hernan Vanzetto") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: update these lists.
let site_isa bs = Filename.concat (Filename.concat bs "Isabelle") "bin" in | ||
let site_paths bs = [site_bin bs; site_isa bs] in | ||
let path_elems = List.concat (List.map site_paths backends_site) in | ||
sprintf "%s:%s" (String.concat ":" path_elems) (Sys.getenv "PATH") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pretty big change: you're putting the extra path elements at the beginning of PATH rather than the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My motivation for this change is to have the backends defined more predictably. E.g., I have an existing installation of TLAPM, and its backends are on the path. It is easy to accidentally forget to set the path to the new location and invoke a new TLAPM with old backends.
Behavior may be more predictable if TLAPM always used the backends shipped with it. We could introduce options to override specific backends, e.g., --with-z3=/home/.../bin/z3
and similar? Of course, an alternative to use environment variables could also be supported, e.g., export TLAPM_Z3=/home/.../bin/z3
.
Some setups probably exploit the current implementation to look for backends in the PATH variable to override the backends. If the above proposal doesn't look good, I can put these paths at the end. This will also require updating the tests to avoid accidental overrides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming back to this, I now think you're right: we should make it hard to accidentally override the provided backends. So let's keep this change and we'll add an override mechanism later if needed.
Co-authored-by: Damien Doligez <damien.doligez@gmail.com> Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
ab134a7
to
0eb54fb
Compare
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
@damiendoligez, could you rerun the pipeline? I hope I have resolved the problems with MacOS. |
@kape1395 I don't have any button on my GitHub interface to trigger the CI checks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed all the files that changed since my last review and everything looks good.
The checks are now executed. Maybe I have mistakenly assumed it is manual. |
@muenchnerkindl, @damiendoligez, maybe this PR can be merged already? |
@ahelwer, this is the PR I have updated the CI scripts. |
@kape1395 okay cool, is there any obstacle to merging the PR? As you said it would be nice to get it in so we don't have PRs piling up on top of PRs. Don't have to issue a release yet. |
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Signed-off-by: Karolis Petrauskas <k.petrauskas@gmail.com>
Hurrah it's merged! @kape1395 do you think this is a good time to add a CI step to test the newly-built TLAPM against the tlaplus/examples repo, like we do for the tools here? https://github.com/tlaplus/tlaplus/blob/dd9f38f26c184014086c37bff8a056b4d51f4464/.github/workflows/pr.yml#L54-L83 |
@ahelwer, I have updated the build/install instructions with this PR. Probably that can be useful for you: https://github.com/tlaplus/tlapm/blob/main/INSTALL.md |
@kape1395 okay cool! Once the new bug is fixed do you think it will be worth cutting a pre-release so we can start consuming it in the tlaplus/examples CI to test that the nondeterministic install bug was fixed? |
This question is not to me probably. What do you think about using the latest main all the time? This way some kind of continuous integration would be implemented. |
We used to have that and I'm very much in favor or adding it again. :-) |
I'd say that depends how much effort is necessary to build TLAPM from a checkout of main. The tlaplus tools are pushed to a nightly build server every time a commit hits main, which is nice, and we pull that down in the tlaplus/examples CI. Does this repo do anything similar? |
@kape1395 I'm working on some changes to the CI to upload main builds to the Inria server. Unfortunately when I run
Tracking this down, it's because my
The In general I just need to find the filepath of the |
What OS are you using locally? That could be some incompatibility in the CLI tools.
I guess in your OS, Can you try changing that line to
|
Nah, it fails on my machine with -e added. Maybe there is a mismatch with the make versions? In my case that's
|
Hi @kape1395 I can confirm adding the My version of make is 4.4.1. I'm running Arch linux. Anyway it isn't so much important for me to be able to build things locally, unless you think that's a problem. I'm more interested in figuring out where things are output so I can use them in the CI. I need to know where the .bin installer file is built so I can both upload it and also use it to run tests against tlaplus/examples. |
You can check the error in files e.g.
and correspondingly for other test case files. Adding By the way, why do you need the bin installer? There is no installer anymore.
you can run tlapm e.g. as |
Closes #82
This PR extends the dune-based build started at #81.
This version supports running the tests and creating a release.
The changes are non-invasive, so the previous build/test process remains working.