-
Notifications
You must be signed in to change notification settings - Fork 8
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
Test OCaml for Windows #32
base: master
Are you sure you want to change the base?
Conversation
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 goal for the windows testing is to only support upstream so I won’t merge anything that uses fdopen’s fork. Same for duplicated functions, that would be a maintenance nightmare otherwise ^^"
Any chance you could add opam-dev to the docker image?
server/backend/check.ml
Outdated
let with_lower_bound_linux pkg = {| | ||
if [ $res = 0 ]; then | ||
opam remove -y "|}^pkg^{|" | ||
env OPAMCRITERIA="+removed,+count[version-lag,solution]" opam install -vy "|}^pkg^{|" | ||
res=$? | ||
fi | ||
|} | ||
|
||
let with_lower_bound_windows pkg = {| | ||
if [ $res = 0 ]; then | ||
ocaml-env exec --64 -- opam remove -y "|}^pkg^{|" | ||
ocaml-env exec --64 -- env OPAMCRITERIA="+removed,+count[version-lag,solution]" opam install -vy "|}^pkg^{|" | ||
res=$? | ||
fi | ||
|} |
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.
instead of duplicating every functions I think we should aim at factorising things. For example:
let with_lower_bound_linux pkg = {| | |
if [ $res = 0 ]; then | |
opam remove -y "|}^pkg^{|" | |
env OPAMCRITERIA="+removed,+count[version-lag,solution]" opam install -vy "|}^pkg^{|" | |
res=$? | |
fi | |
|} | |
let with_lower_bound_windows pkg = {| | |
if [ $res = 0 ]; then | |
ocaml-env exec --64 -- opam remove -y "|}^pkg^{|" | |
ocaml-env exec --64 -- env OPAMCRITERIA="+removed,+count[version-lag,solution]" opam install -vy "|}^pkg^{|" | |
res=$? | |
fi | |
|} | |
let with_lower_bound ~windows pkg = | |
let opam = if windows then "ocaml-env exec --64 -- opam" else "opam" in | |
{| | |
if [ $res = 0 ]; then | |
|}^opam^{| remove -y "|}^pkg^{|" | |
|}^opam^{| install --criteria="+removed,+count[version-lag,solution]" -vy "|}^pkg^{|" | |
res=$? | |
fi | |
|} |
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.
That's sensible for these small functions.
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.
Is it not possible for the main function?
1ac71dd
to
cae5073
Compare
Using Obuilder Docker on Windows backend and ocaml/opam Windows images, currently with opam-dev 2.0 and fdopen/opam-repository-mingw. Server configuration: ```yaml default-repository: fdopen/opam-repository-mingw#opam2 list-command: ocaml-env exec --64 -- opam list --available --installable --short --all-versions platform: os: windows arch: x86_64 distribution: windows-mingw image: ocaml/opam:windows-mingw@sha256:6da6cc25ee75b314d3ef12dfe178f6060940e3c43202541d956f88c8c36b2ab3 ```
85053c5
to
fca0ced
Compare
bdc25ec
to
4f4e9e2
Compare
Using Obuilder Docker on Windows backend and ocaml/opam Windows
images, currently with opam 2.0.8 and fdopen/opam-repository-mingw.
Server configuration: