Skip to content

Commit e152e81

Browse files
authored
Don't run opam init in CI if cache is present (#99)
1 parent e9d7daf commit e152e81

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/run-cn-examples.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ jobs:
3737
path: ~/.opam
3838
key: ${{ matrix.version }}
3939

40-
- name: Setup opam and install dependencies
40+
- name: Setup opam
41+
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
42+
run: opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
43+
44+
- name: Install dependencies
4145
run: |
42-
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
46+
opam switch ${{ matrix.version }}
47+
eval $(opam env --switch=${{ matrix.version }})
4348
opam install --deps-only --yes ./cerberus.opam ./cerberus-lib.opam ./cn.opam
4449
4550
- name: Save cached opam

0 commit comments

Comments
 (0)