Skip to content

Commit 98fa91e

Browse files
Update CI workflows and opam lock file to match current master
Agent-Logs-Url: https://github.com/goblint/analyzer/sessions/5c1f51c9-4cd4-4964-9e5a-bf78bfed7685 Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
1 parent 284fcfc commit 98fa91e

10 files changed

Lines changed: 336 additions & 376 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: coverage
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
57

68
workflow_dispatch:
79

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

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

2931
steps:
3032
- name: Checkout code
31-
uses: actions/checkout@v4
33+
uses: actions/checkout@v6
3234

3335
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
3436
env:
3537
# otherwise setup-ocaml pins non-locked dependencies
3638
# https://github.com/ocaml/setup-ocaml/issues/166
3739
OPAMLOCKED: locked
38-
uses: ocaml/setup-ocaml@v2
40+
uses: ocaml/setup-ocaml@v3
3941
with:
4042
ocaml-compiler: ${{ matrix.ocaml-compiler }}
4143

44+
- name: Install graph-easy # TODO: remove if depext --with-test works (https://github.com/ocaml/opam/issues/5836)
45+
if: ${{ startsWith(matrix.os, 'ubuntu') }}
46+
run: sudo apt install -y libgraph-easy-perl
47+
4248
- name: Install dependencies
4349
run: opam install . --deps-only --locked --with-test
4450

51+
- name: Install os gem for operating system detection
52+
run: sudo gem install os
53+
4554
- name: Install coverage dependencies
4655
run: opam install bisect_ppx
4756

4857
- name: Build
4958
run: ./make.sh coverage
5059

51-
- name: Test regression
52-
run: ./make.sh headers testci
60+
- name: Download Linux headers
61+
run: ./make.sh headers
5362

54-
- name: Test apron regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!)
63+
- name: Test
64+
env:
65+
BISECT_FILE: ${{ github.workspace }}/_build/coverage/bisect
5566
run: |
56-
ruby scripts/update_suite.rb group apron -s
57-
ruby scripts/update_suite.rb group apron2 -s
58-
59-
- name: Test apron octagon regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!)
60-
run: ruby scripts/update_suite.rb group octagon -s
61-
62-
- name: Test apron affeq regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!)
63-
run: ruby scripts/update_suite.rb group affeq -s
64-
65-
- 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!)
66-
run: ruby scripts/update_suite.rb group apron-mukherjee -s
67-
68-
- name: Test regression cram
69-
run: opam exec -- dune runtest tests/regression
70-
71-
- name: Test incremental cram
72-
run: opam exec -- dune runtest tests/incremental
73-
74-
- name: Test unit
75-
run: opam exec -- dune runtest unittest
76-
77-
- name: Test incremental regression
78-
run: ruby scripts/update_suite.rb -i
79-
80-
- name: Test incremental regression with cfg comparison
81-
run: ruby scripts/update_suite.rb -c
67+
mkdir -p _build/coverage
68+
opam exec -- dune runtest --force --instrument-with bisect_ppx
8269
83-
- run: opam exec -- bisect-ppx-report send-to Coveralls --coverage-path=.
70+
- run: opam exec -- bisect-ppx-report send-to Coveralls
8471
env:
8572
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
8673
PULL_REQUEST_NUMBER: ${{ github.event.number }}
8774

88-
- uses: actions/upload-artifact@v3
75+
- uses: actions/upload-artifact@v7
8976
if: always()
9077
with:
9178
name: suite_result

.github/workflows/docker.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ jobs:
3535

3636
steps:
3737
- name: Checkout code
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939

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

4343
- name: Log in to the Container registry
44-
uses: docker/login-action@v3
44+
uses: docker/login-action@v4
4545
with:
4646
registry: ${{ env.REGISTRY }}
4747
username: ${{ github.actor }}
4848
password: ${{ secrets.GITHUB_TOKEN }}
4949

5050
- name: Extract metadata (tags, labels) for Docker
5151
id: meta
52-
uses: docker/metadata-action@v5
52+
uses: docker/metadata-action@v6
5353
with:
5454
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5555
tags: |
@@ -59,20 +59,22 @@ jobs:
5959
6060
- name: Build Docker image
6161
id: build
62-
uses: docker/build-push-action@v5
62+
uses: docker/build-push-action@v7
6363
with:
6464
context: .
6565
load: true # load into docker instead of immediately pushing
6666
tags: ${{ steps.meta.outputs.tags }}
6767
labels: ${{ steps.meta.outputs.labels }}
68-
cache-from: type=gha
69-
cache-to: type=gha,mode=max # max mode caches all layers for multi-stage image
68+
# Using scoped cache to prevent stale reference issues (fixes "failed to compute cache key" errors)
69+
# See: https://github.com/docker/buildx/issues/681
70+
cache-from: type=gha,scope=build-${{ github.ref_name }}
71+
cache-to: type=gha,scope=build-${{ github.ref_name }},mode=max # max mode caches all layers for multi-stage image
7072

7173
- name: Check Docker image
7274
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
7375

7476
- name: Push Docker image
75-
uses: docker/build-push-action@v5
77+
uses: docker/build-push-action@v7
7678
with:
7779
context: .
7880
push: true

.github/workflows/docs.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: docs
22

33
on:
44
push:
5-
branches:
6-
- master
5+
pull_request:
76

87
workflow_dispatch:
98

@@ -12,25 +11,21 @@ permissions:
1211
pages: write
1312
id-token: write
1413

15-
concurrency:
16-
group: "pages"
17-
cancel-in-progress: true
18-
1914
jobs:
2015
api-build:
2116
strategy:
2217
matrix:
2318
os:
2419
- ubuntu-latest
2520
ocaml-compiler:
26-
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
21+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
2722
# don't add any other because they won't be used
2823

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

3126
steps:
3227
- name: Checkout code
33-
uses: actions/checkout@v4
28+
uses: actions/checkout@v6
3429

3530
- name: Check for undocumented modules
3631
run: python scripts/goblint-lib-modules.py
@@ -40,13 +35,13 @@ jobs:
4035
# otherwise setup-ocaml pins non-locked dependencies
4136
# https://github.com/ocaml/setup-ocaml/issues/166
4237
OPAMLOCKED: locked
43-
uses: ocaml/setup-ocaml@v2
38+
uses: ocaml/setup-ocaml@v3
4439
with:
4540
ocaml-compiler: ${{ matrix.ocaml-compiler }}
4641

4742
- name: Setup Pages
4843
id: pages
49-
uses: actions/configure-pages@v3
44+
uses: actions/configure-pages@v6
5045

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

5752
- name: Upload artifact
58-
uses: actions/upload-pages-artifact@v2
53+
uses: actions/upload-pages-artifact@v5
5954
with:
6055
path: _build/default/_doc/_html/
6156

@@ -65,7 +60,11 @@ jobs:
6560
url: ${{ steps.deployment.outputs.page_url }}
6661
runs-on: ubuntu-latest
6762
needs: api-build
63+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
64+
concurrency:
65+
group: "pages"
66+
cancel-in-progress: true
6867
steps:
6968
- name: Deploy to GitHub Pages
7069
id: deployment
71-
uses: actions/deploy-pages@v2
70+
uses: actions/deploy-pages@v5

.github/workflows/indentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424
with:
2525
fetch-depth: 0
2626

2727
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
28-
uses: ocaml/setup-ocaml@v2
28+
uses: ocaml/setup-ocaml@v3
2929
with:
3030
ocaml-compiler: ${{ matrix.ocaml-compiler }}
3131

0 commit comments

Comments
 (0)