mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
An attempt to simplify deps install and CI
from the docs, the setup-ocaml@v2 github action should already handle caching...
This commit is contained in:
parent
d48f0e4421
commit
0e1500f8f0
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
nix_path: nixpkgs=channel:nixos-21.05
|
||||
- run: nix-build release.nix
|
||||
- run: nix-shell --run "echo OK"
|
||||
|
||||
|
||||
build-nix-unstable:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -39,40 +39,27 @@ jobs:
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Opam modules cache
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
cache-name: cache-opam-modules
|
||||
with:
|
||||
# OCaml cache files are stored in `~/.opam` on Linux/macOS
|
||||
path: ~/.opam
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('catala.opam', 'Makefile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up OCaml
|
||||
uses: avsm/setup-ocaml@v1
|
||||
uses: avsm/setup-ocaml@v2
|
||||
with:
|
||||
# Version of the OCaml compiler to initialise
|
||||
ocaml-version: 4.11.2
|
||||
ocaml-compiler: 4.11.x
|
||||
dune-cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
eval $(opam env)
|
||||
make dependencies
|
||||
sudo apt update
|
||||
sudo apt install python3-dev python3-setuptools python3-pygments man2html rsync colordiff libmpc-dev
|
||||
sudo apt-get update && sudo apt-get install python3-dev python3-setuptools python3-pygments man2html rsync colordiff libmpc-dev
|
||||
sudo python3 -m pip install --upgrade pip
|
||||
sudo python3 -m pip install virtualenv
|
||||
sudo make pygments
|
||||
./french_law/python/setup_env.sh
|
||||
|
||||
- name: Install OCaml dependencies
|
||||
run: |
|
||||
opam install . --deps-only --with-doc --with-test
|
||||
|
||||
- name: Make all
|
||||
run: |
|
||||
eval $(opam env)
|
||||
export OCAMLRUNPARAM=b
|
||||
make all
|
||||
OCAMLRUNPARAM=b opam exec -- make all
|
||||
|
6
Makefile
6
Makefile
@ -17,11 +17,7 @@ K := $(foreach exec,$(EXECUTABLES),\
|
||||
|
||||
# The Zarith dependency is fixed because of https://github.com/janestreet/zarith_stubs_js/pull/8
|
||||
dependencies-ocaml:
|
||||
opam install \
|
||||
ocamlformat ANSITerminal sedlex menhir menhirLib dune cmdliner obelisk \
|
||||
re obelisk unionfind bindlib zarith zarith_stubs_js ocamlgraph \
|
||||
js_of_ocaml-compiler js_of_ocaml js_of_ocaml-ppx calendar camomile \
|
||||
visitors benchmark cppo odoc
|
||||
opam install . --deps-only
|
||||
|
||||
dependencies-js:
|
||||
$(MAKE) -C $(FRENCH_LAW_JS_LIB_DIR) dependencies
|
||||
|
@ -32,6 +32,8 @@ depends: [
|
||||
"js_of_ocaml-ppx" {>= "3.8.0"}
|
||||
"camomile" {>= "1.0.2"}
|
||||
"cppo" {>= "1"}
|
||||
"obelisk" {dev}
|
||||
"ocamlformat" {dev}
|
||||
"odoc" {with-doc}
|
||||
]
|
||||
build: [
|
||||
|
10
dune-project
10
dune-project
@ -63,7 +63,11 @@
|
||||
(camomile
|
||||
(>= 1.0.2))
|
||||
(cppo
|
||||
(>= 1))))
|
||||
(>= 1))
|
||||
(obelisk
|
||||
:dev)
|
||||
(ocamlformat
|
||||
:dev)))
|
||||
|
||||
(package
|
||||
(name french_law)
|
||||
@ -75,6 +79,8 @@
|
||||
(ocaml
|
||||
(>= 4.11.0))
|
||||
(catala
|
||||
(>= 0.5.0))))
|
||||
(= :version))
|
||||
(conf-npm
|
||||
:dev)))
|
||||
|
||||
(using menhir 2.1)
|
||||
|
@ -12,7 +12,8 @@ bug-reports: "https://github.com/CatalaLang/catala/issues"
|
||||
depends: [
|
||||
"dune" {>= "2.8"}
|
||||
"ocaml" {>= "4.11.0"}
|
||||
"catala" {>= "0.5.0"}
|
||||
"catala" {= version}
|
||||
"conf-npm" {dev}
|
||||
"odoc" {with-doc}
|
||||
]
|
||||
build: [
|
||||
|
Loading…
Reference in New Issue
Block a user