Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 21 additions & 34 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: coverage

on:
pull_request:
paths-ignore:
- 'docs/**'

workflow_dispatch:

Expand All @@ -18,7 +20,7 @@ jobs:
os:
- ubuntu-latest
ocaml-compiler:
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
# don't add any other because they won't be used

runs-on: ${{ matrix.os }}
Expand All @@ -28,64 +30,49 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- 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
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Install graph-easy # TODO: remove if depext --with-test works (https://github.com/ocaml/opam/issues/5836)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: sudo apt install -y libgraph-easy-perl

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

- name: Install os gem for operating system detection
run: sudo gem install os

- name: Install coverage dependencies
run: opam install bisect_ppx

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

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

- name: Test apron regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!)
- name: Test
env:
BISECT_FILE: ${{ github.workspace }}/_build/coverage/bisect
run: |
ruby scripts/update_suite.rb group apron -s
ruby scripts/update_suite.rb group apron2 -s

- name: Test apron octagon 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 octagon -s

- name: Test apron affeq 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 affeq -s

- name: Test apron regression (Mukherjee et. al SAS '17 paper') # 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 apron-mukherjee -s

- name: Test regression cram
run: opam exec -- dune runtest tests/regression

- name: Test incremental cram
run: opam exec -- dune runtest tests/incremental

- name: Test unit
run: opam exec -- dune runtest unittest

- name: Test incremental regression
run: ruby scripts/update_suite.rb -i

- name: Test incremental regression with cfg comparison
run: ruby scripts/update_suite.rb -c
mkdir -p _build/coverage
opam exec -- dune runtest --force --instrument-with bisect_ppx

- run: opam exec -- bisect-ppx-report send-to Coveralls --coverage-path=.
- run: opam exec -- bisect-ppx-report send-to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v7
if: always()
with:
name: suite_result
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 # needed for GitHub Actions Cache in build-push-action
uses: docker/setup-buildx-action@v4 # needed for GitHub Actions Cache in build-push-action

- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -59,20 +59,22 @@ jobs:

- name: Build Docker image
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
context: .
load: true # load into docker instead of immediately pushing
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max # max mode caches all layers for multi-stage image
# Using scoped cache to prevent stale reference issues (fixes "failed to compute cache key" errors)
# See: https://github.com/docker/buildx/issues/681
cache-from: type=gha,scope=build-${{ github.ref_name }}
cache-to: type=gha,scope=build-${{ github.ref_name }},mode=max # max mode caches all layers for multi-stage image

- name: Check Docker image
run: docker run --rm -v $(pwd):/data ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} /data/tests/regression/04-mutex/01-simple_rc.c # run image by version in case multiple tags

- name: Push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: docs

on:
push:
branches:
- master
pull_request:

workflow_dispatch:

Expand All @@ -12,25 +11,21 @@ permissions:
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
api-build:
strategy:
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
- ocaml-variants.4.14.2+options,ocaml-option-flambda # 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@v4
uses: actions/checkout@v6

- name: Check for undocumented modules
run: python scripts/goblint-lib-modules.py
Expand All @@ -40,13 +35,13 @@ jobs:
# otherwise setup-ocaml pins non-locked dependencies
# https://github.com/ocaml/setup-ocaml/issues/166
OPAMLOCKED: locked
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v6

- name: Install dependencies
run: opam install . --deps-only --locked --with-doc
Expand All @@ -55,7 +50,7 @@ jobs:
run: opam exec -- dune build @doc

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v5
with:
path: _build/default/_doc/_html/

Expand All @@ -65,7 +60,11 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: api-build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
concurrency:
group: "pages"
cancel-in-progress: true
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v5
4 changes: 2 additions & 2 deletions .github/workflows/indentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

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

Expand Down
Loading
Loading