Skip to content

Commit 3cd8988

Browse files
authored
Merge pull request #1787 from goblint/lower-bounds-ci-builtin
Fix and update lower-bounds CI
2 parents aa522e3 + 3b7b08a commit 3cd8988

File tree

1 file changed

+6
-55
lines changed

1 file changed

+6
-55
lines changed

.github/workflows/unlocked.yml

Lines changed: 6 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757

5858
- name: Install dependencies
5959
run: opam install . --deps-only --with-test
60-
60+
6161
- name: Install os gem for operating system detection
6262
run: sudo gem install os
6363

@@ -86,31 +86,25 @@ jobs:
8686
run: ruby scripts/update_suite.rb -m
8787

8888
lower-bounds-downgrade:
89-
# use external 0install solver to downgrade: https://github.com/ocaml-opam/opam-0install-solver
90-
# TODO: will be built in in opam 2.2: https://github.com/ocaml/opam/pull/4909
91-
9289
strategy:
9390
fail-fast: false
9491
matrix:
9592
os:
9693
- ubuntu-22.04 # https://github.com/ocaml/setup-ocaml/issues/872
9794
- macos-13
9895
ocaml-compiler:
99-
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file, downgrade deps step
96+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
10097

10198
name: lower-bounds (${{ matrix.os }}, ${{ matrix.ocaml-compiler }}, downgrade)
10299

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

105-
env:
106-
OPAMCONFIRMLEVEL: unsafe-yes # allow opam depext to yes package manager prompts
107-
108102
steps:
109103
- name: Checkout code
110104
uses: actions/checkout@v4
111105

112106
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
113-
uses: ocaml/setup-ocaml@v2
107+
uses: ocaml/setup-ocaml@v3
114108
with:
115109
ocaml-compiler: ${{ matrix.ocaml-compiler }}
116110

@@ -129,17 +123,9 @@ jobs:
129123
opam depext apron
130124
opam install apron mlgmpidl.1.2.15
131125
132-
- name: Build
133-
if: ${{ false }}
134-
run: ./make.sh nat
135-
136-
- name: Install opam-0install
137-
run: opam install opam-0install
138-
139126
- name: Downgrade dependencies
140-
# must specify ocaml-base-compiler again to prevent it from being downgraded
141-
# prevent num downgrade to avoid dune/jbuilder error: https://github.com/ocaml/dune/issues/5280
142-
run: opam install $(opam exec -- opam-0install --prefer-oldest goblint ocaml-variants.4.14.2+options ocaml-option-flambda num.1.5)
127+
# without "+removed" in criteria, because it also removes optional apron
128+
run: opam install --solver=builtin-0install --criteria="+count[version-lag,solution]" . --deps-only --with-test
143129

144130
- name: Build
145131
run: ./make.sh nat
@@ -153,41 +139,6 @@ jobs:
153139
- name: Test marshal regression # not part of @runtest due to time
154140
run: ruby scripts/update_suite.rb -m
155141

156-
lower-bounds-docker:
157-
# use builtin-0install solver to remove and downgrade, opam normally compiled without, Docker images have it compiled
158-
159-
if: ${{ false }}
160-
161-
name: lower-bounds (docker)
162-
163-
runs-on: ubuntu-latest
164-
165-
steps:
166-
- name: Checkout code
167-
uses: actions/checkout@v4
168-
169-
- name: Set up Docker Buildx
170-
uses: docker/setup-buildx-action@v3 # needed for GitHub Actions Cache in build-push-action
171-
172-
- name: Build dev Docker image
173-
id: build
174-
uses: docker/build-push-action@v6
175-
with:
176-
context: .
177-
target: dev
178-
load: true # load into docker instead of immediately pushing
179-
tags: dev
180-
cache-from: type=gha
181-
cache-to: type=gha,mode=max # max mode caches all layers for multi-stage image
182-
183-
- name: Run opam downgrade and tests in dev Docker image
184-
uses: addnab/docker-run-action@v3
185-
with:
186-
image: dev
187-
run: |
188-
OPAMCRITERIA=+removed,+count[version-lag,solution] OPAMEXTERNALSOLVER=builtin-0install opam-2.1 install . --deps-only --with-test --confirm-level=unsafe-yes
189-
opam exec -- dune runtest
190-
191142
opam-install:
192143
strategy:
193144
fail-fast: false
@@ -265,7 +216,7 @@ jobs:
265216
os:
266217
- ubuntu-22.04 # https://github.com/ocaml/setup-ocaml/issues/872
267218
ocaml-compiler:
268-
- ocaml-variants.5.0.0+options,ocaml-option-flambda
219+
- ocaml-variants.5.0.0+options,ocaml-option-flambda
269220
node-version:
270221
- 14
271222

0 commit comments

Comments
 (0)