Skip to content

Commit bf25d6e

Browse files
authored
Merge pull request #126 from mbarbin/setup-dune-workflows
Add ci workflow based on setup-dune (experimental)
2 parents 0f68893 + 073050a commit bf25d6e

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Additional CI workflow using setup-dune (dune package management).
2+
# This workflow is intended to eventually replace more-ci.yml.
3+
#
4+
# This tests across multiple operating systems and OCaml versions, but skips
5+
# steps not necessary for every combination (linting, coverage, etc.).
6+
7+
name: dune-pkg-more-ci
8+
9+
on:
10+
push:
11+
branches:
12+
- main
13+
pull_request:
14+
branches:
15+
- "**"
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
build:
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os:
26+
- ubuntu-latest
27+
- macos-latest
28+
ocaml-version:
29+
- "5.3"
30+
- "5.2"
31+
- "4.14"
32+
exclude:
33+
# Exclude the combination already tested in the main ci workflow.
34+
- os: ubuntu-latest
35+
ocaml-version: "5.3"
36+
37+
runs-on: ${{ matrix.os }}
38+
39+
defaults:
40+
run:
41+
shell: bash
42+
43+
steps:
44+
- name: Checkout code
45+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
46+
47+
- name: Environment setup
48+
run: |
49+
echo "DUNE_WORKSPACE=$PWD/dune-workspace-${{ matrix.ocaml-version }}" >> "$GITHUB_ENV"
50+
if [ "${{ matrix.ocaml-version }}" = "4.14" ]; then
51+
echo "PACKAGES=volgo,volgo-vcs,volgo-git-backend,volgo-git-unix,volgo-hg-backend,volgo-hg-unix" >> "$GITHUB_ENV"
52+
else
53+
echo "PACKAGES=volgo,volgo-base,volgo-vcs,volgo-git-backend,volgo-git-unix,volgo-git-eio,volgo-hg-backend,volgo-hg-unix,volgo-hg-eio,vcs-test-helpers,volgo-tests" >> "$GITHUB_ENV"
54+
fi
55+
56+
- name: Setup Dune
57+
uses: mbarbin/setup-dune@1c4b81012f25bcff3ddc4cb2533cc8066802388f # v2.0.0+patched
58+
with:
59+
workspace: ${{ env.DUNE_WORKSPACE }}
60+
cache-prefix: ${{ matrix.ocaml-version }}
61+
only-packages: ${{ env.PACKAGES }}
62+
steps: install-dune enable-pkg lazy-update-depexts install-gpatch install-depexts
63+
64+
- name: Build & Run tests
65+
run: dune build @all @runtest --only-packages=${{ env.PACKAGES }}

0 commit comments

Comments
 (0)