catala/.github/workflows/build.yml

66 lines
1.9 KiB
YAML
Raw Normal View History

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# 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
2020-04-26 20:01:39 +03:00
2020-05-26 16:52:11 +03:00
- name: Opam modules cache
2020-05-26 13:02:49 +03:00
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', 'legifrance_catala.opam') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up OCaml
2020-11-17 00:51:07 +03:00
uses: avsm/setup-ocaml@v1.1.3
with:
# Version of the OCaml compiler to initialise
2020-05-26 11:41:21 +03:00
ocaml-version: 4.09.1
2020-05-26 12:37:01 +03:00
- name: Install dependencies
run: |
2020-04-26 20:56:54 +03:00
eval $(opam env)
2020-05-26 12:37:01 +03:00
make install-dependencies
2020-08-19 00:53:09 +03:00
sudo apt update
2020-08-07 18:37:28 +03:00
sudo apt install python3-dev python3-setuptools man2html rsync colordiff
2020-05-26 16:38:32 +03:00
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install virtualenv
2020-05-26 12:37:01 +03:00
- name: Make compiler
2020-05-26 13:37:01 +03:00
run: |
eval $(opam env)
make build
2020-11-27 19:21:37 +03:00
- name: Run tests
run: |
eval $(opam env)
make tests
2020-05-26 12:37:01 +03:00
2020-05-26 16:38:32 +03:00
- name: Make assets and documentation
2020-05-26 16:45:00 +03:00
run: |
eval $(opam env)
2020-11-23 11:27:55 +03:00
make website-assets doc