Skip to content

Commit

Permalink
Fix ci 2.4.3 (#575)
Browse files Browse the repository at this point in the history
* CI: avsm/setup-ocaml@v2 -> ocaml/setup-ocaml@v2

* Fix CI: (#525)

- Replaced `ocaml-version` with `ocaml-compiler`
- Switched to `actions/checkout@v3`

* Fix js of ocaml (#542)

* Upgrade to js_of_ocaml 5

* Fix the makefile for the js target

* Simplify dune file

* Require dune 2.8+

* Fix CI (#560)

* JS: add missing primitives

* Set upper bound 5.0.1 for js_of_ocaml

---------

Co-authored-by: hra687261 <hra687261@gmail.com>
  • Loading branch information
Halbaroth and hra687261 authored Apr 17, 2023
1 parent 374fd7a commit 8e420c4
Show file tree
Hide file tree
Showing 18 changed files with 170 additions and 80 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ jobs:
image: ocamlpro/ocaml:4.10

steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v3

# Switch to ocaml user
- run: su ocaml

# This line is needed to acces and use opam. We are unable to set the user
# to `ocaml` with the container parameters
- run: sudo chmod a+wx .

# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
# This line is needed to allow the working directory to be used even
# the ocaml user do not have rights on it.
- run: CURRENTDIR=$(basename $(pwd)); git config --global --add safe.directory /__w/$CURRENTDIR/$CURRENTDIR

# Create a switch with the system compiler (no compilation needed).
# And then, install external (no need for depext with opam 2.1) and libs deps.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Update apt-get database
- name: Update apt-get database
Expand All @@ -44,9 +44,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Retrieve the opam cache with unique key
# A new cache is created/used if the `.opam` files changes or
Expand All @@ -47,9 +47,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/build_make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Update apt-get database
- name: Update apt-get database
Expand All @@ -42,9 +42,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Update apt-get database
- name: Update apt-get database
Expand All @@ -114,9 +114,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Update apt-get database
- name: Update apt-get database
Expand All @@ -186,16 +186,16 @@ jobs:
key: v1-${{ runner.os }}-alt-ergo-make-${{ matrix.package }}-${{ env.OCAML_DEFAULT_VERSION }}-${{ hashFiles('*.opam') }}

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

# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Update apt-get database
- name: Update apt-get database
Expand All @@ -49,9 +49,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
strategy:
matrix:
# Setup ocaml versions to test
ocaml-version:
ocaml-compiler:
- 4.05.0
- 4.05.0+flambda
- 4.06.1
Expand All @@ -126,7 +126,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Update apt-get database
- name: Update apt-get database
Expand All @@ -141,14 +141,14 @@ jobs:
id: cache-opam
with:
path: ~/.opam
key: v1-${{ runner.os }}-alt-ergo-${{ matrix.ocaml-version }}-${{ hashFiles('*.opam') }}
key: v1-${{ runner.os }}-alt-ergo-${{ matrix.ocaml-compiler }}-${{ hashFiles('*.opam') }}

# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Retrieve the opam cache with unique key
# A new cache is created/used if the `.opam` files changes or
Expand All @@ -40,9 +40,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Update apt-get database
- name: Update apt-get database
Expand All @@ -52,9 +52,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Pin the packages, this is needed for opam depext
# remove this step when opam 2.1 will be used
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Build the sphinx documentation
# and automatically print any error or warning
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Retrieve the opam cache with unique key
# A new cache is created/used if the `.opam` files changes or
Expand All @@ -41,9 +41,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Install ocp-indent with the fixed version
# Do nothing if ocp-indent is already installed
Expand All @@ -65,7 +65,7 @@ jobs:
steps:
# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Retrieve the opam cache with unique key
# A new cache is created/used if the `.opam` files changes or
Expand All @@ -81,9 +81,9 @@ jobs:
# Get an OCaml environment with opam installed and the proper ocaml version
# opam will used opam cache environment if retrieved
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: avsm/setup-ocaml@v2
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ env.OCAML_DEFAULT_VERSION }}
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}

# Install dependencies of the ocpchecker executable
# Dune and stdlib-shims is needed to build the executable
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ AB-Why3:
ln -sf $(INSTALL_DIR)/default/share/alt-ergo/plugins/AB-Why3-plugin.cma AB-Why3-plugin.cma
ln -sf $(INSTALL_DIR)/default/share/alt-ergo/plugins/AB-Why3-plugin.cmxs AB-Why3-plugin.cmxs

js: gen
$(DUNE) build $(DUNE_FLAGS) @$(BJS_DIR)/all

# Build all plugins
plugins:
$(DUNE) build $(DUNE_FLAGS) \
Expand Down
41 changes: 41 additions & 0 deletions alt-ergo-js.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "2.4.3"
synopsis: "The Alt-Ergo SMT prover"
description: """
Alt-Ergo is an automatic theorem prover of mathematical formulas. It was developed at LRI, and is now maintained at OCamlPro.

See more details on https://alt-ergo.ocamlpro.com/"""
maintainer: ["Alt-Ergo developers"]
authors: ["Alt-Ergo developers"]
homepage: "https://alt-ergo.ocamlpro.com/"
doc: "https://ocamlpro.github.io/alt-ergo"
bug-reports: "https://github.com/OCamlPro/alt-ergo/issues"
depends: [
"dune" {>= "2.8"}
"ocaml" {>= "4.05.0"}
"alt-ergo-lib" {= version}
"alt-ergo-parsers" {= version}
"js_of_ocaml" {>= "4.0.1" & <= "5.0.1"}
"js_of_ocaml-lwt"
"js_of_ocaml-ppx"
"data-encoding"
"zarith_stubs_js"
"lwt_ppx"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/OCamlPro/alt-ergo.git"
2 changes: 1 addition & 1 deletion alt-ergo-lib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ homepage: "https://alt-ergo.ocamlpro.com/"
doc: "https://ocamlpro.github.io/alt-ergo"
bug-reports: "https://github.com/OCamlPro/alt-ergo/issues"
depends: [
"dune" {>= "2.8"}
"ocaml" {>= "4.05.0"}
"dune" {>= "2.0"}
"dune-configurator"
"dune-build-info"
"num"
Expand Down
2 changes: 1 addition & 1 deletion alt-ergo-parsers.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ homepage: "https://alt-ergo.ocamlpro.com/"
doc: "https://ocamlpro.github.io/alt-ergo"
bug-reports: "https://github.com/OCamlPro/alt-ergo/issues"
depends: [
"dune" {>= "2.8"}
"ocaml" {>= "4.05.0"}
"dune" {>= "2.0"}
"alt-ergo-lib" {= version}
"psmt2-frontend" {>= "0.3"}
"camlzip" {>= "1.07"}
Expand Down
2 changes: 1 addition & 1 deletion alt-ergo.opam
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ homepage: "https://alt-ergo.ocamlpro.com/"
doc: "https://ocamlpro.github.io/alt-ergo"
bug-reports: "https://github.com/OCamlPro/alt-ergo/issues"
depends: [
"dune" {>= "2.8"}
"ocaml" {>= "4.05.0"}
"dune" {>= "2.0"}
"alt-ergo-lib" {= version}
"alt-ergo-parsers" {= version}
"menhir"
Expand Down
2 changes: 1 addition & 1 deletion altgr-ergo.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ homepage: "https://alt-ergo.ocamlpro.com/"
doc: "https://ocamlpro.github.io/alt-ergo"
bug-reports: "https://github.com/OCamlPro/alt-ergo/issues"
depends: [
"dune" {>= "2.8"}
"ocaml" {>= "4.05.0"}
"dune" {>= "2.0"}
"alt-ergo-lib" {= version}
"alt-ergo-parsers" {= version}
"lablgtk3"
Expand Down
Loading

0 comments on commit 8e420c4

Please sign in to comment.