Skip to content

Commit

Permalink
Merge pull request #296 from goblint/ocaml-ci
Browse files Browse the repository at this point in the history
Fix CI to correctly use OCaml version matrix
  • Loading branch information
sim642 authored Aug 13, 2021
2 parents b21ca44 + ec2963d commit d512465
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 62 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/locked.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: locked

on:
push:
pull_request:

jobs:
regression:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
ocaml-compiler:
- 4.12.0 # matches opam lock file
# don't add any other because they won't be used

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up OCaml ${{ matrix.ocaml-compiler }}
env:
# otherwise setup-ocaml pins non-locked dependencies
# https://github.com/ocaml/setup-ocaml/issues/166
OPAMLOCKED: locked
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Install dependencies
run: opam install . --deps-only --locked

- name: Build
run: ./make.sh nat

- name: Test regression
run: ./make.sh headers testci

- name: Test octApron regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!)
run: ruby scripts/update_suite.rb group octapron -s

- name: Build domaintest
run: ./make.sh domaintest

- name: Test domains
run: ./goblint.domaintest
61 changes: 0 additions & 61 deletions .github/workflows/tests.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/unlocked.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: unlocked

on:
pull_request:
workflow_dispatch:

schedule:
# nightly
- cron: '31 1 * * *' # 01:31 UTC, 02:31/03:31 Munich, 03:31/04:31 Tartu
# GitHub Actions load is high at minute 0, so avoid that

jobs:
regression:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
ocaml-compiler:
- 4.12.x
- 4.11.x
- 4.09.x
apron:
- false
- true

# customize name to use readable string for apron instead of just a boolean
# workaround for missing ternary operator: https://github.com/actions/runner/issues/409
name: regression (${{ matrix.os }}, ${{ matrix.ocaml-compiler }}${{ matrix.apron && ', apron' || '' }})

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Install dependencies
run: opam install . --deps-only

- name: Install Apron dependencies
if: ${{ matrix.apron }}
run: |
opam depext apron
opam install apron
- name: Build
run: ./make.sh nat

- name: Test regression
run: ./make.sh headers testci

- name: Test octApron regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!)
if: ${{ matrix.apron }}
run: ruby scripts/update_suite.rb group octapron -s

- name: Build domaintest
run: ./make.sh domaintest

- name: Test domains
run: ./goblint.domaintest # could be made long

- name: Test marshal regression
run: ruby scripts/update_suite.rb -m
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# goblint
![Build status](https://github.com/goblint/analyzer/workflows/build%20and%20run%20tests/badge.svg)
[![locked workflow status](https://github.com/goblint/analyzer/actions/workflows/locked.yml/badge.svg)](https://github.com/goblint/analyzer/actions/workflows/locked.yml)
[![unlocked workflow status](https://github.com/goblint/analyzer/actions/workflows/unlocked.yml/badge.svg)](https://github.com/goblint/analyzer/actions/workflows/unlocked.yml)
[![Docker Build Status](https://img.shields.io/docker/cloud/build/voglerr/goblint)](https://hub.docker.com/r/voglerr/goblint)
[![Documentation Status](https://readthedocs.org/projects/goblint/badge/?version=latest)](https://goblint.readthedocs.io/en/latest/?badge=latest)

Expand Down

0 comments on commit d512465

Please sign in to comment.