Skip to content
Merged
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
64 changes: 64 additions & 0 deletions .github/workflows/dune-pkg-more-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Additional CI workflow using setup-dune (dune package management).
# This workflow is intended to eventually replace more-ci.yml.
#
# This tests across multiple operating systems and OCaml versions, but skips
# steps not necessary for every combination (linting, coverage, etc.).

name: dune-pkg-more-ci

on:
push:
branches:
- main
pull_request:
branches:
- "**"

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
ocaml-version:
- "5.4"
- "5.3"
- "5.2"
- "4.14"
exclude:
# Exclude the combination already tested in the main ci workflow.
- os: ubuntu-latest
ocaml-version: "5.4"

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

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

- name: Environment setup
run: |
echo "DUNE_WORKSPACE=$PWD/dune-workspace-${{ matrix.ocaml-version }}" >> "$GITHUB_ENV"
if [ "${{ matrix.ocaml-version }}" = "4.14" ]; then
echo "PACKAGES=fpath-sexp0" >> "$GITHUB_ENV"
else
echo "PACKAGES=fpath-sexp0,fpath-base,fpath-base-tests" >> "$GITHUB_ENV"
fi

- name: Add dune-workspace hash to dune-project for cache key differentiation
run: |
echo "" >> dune-project
echo "; dune-workspace: ${{ hashFiles(env.DUNE_WORKSPACE) }}" >> dune-project
tail -n 2 dune-project

- name: Setup Dune
uses: mbarbin/setup-dune@e493be45f169e50c4157ab1b6666b35570a63726 # only-packages
with:
workspace: ${{ env.DUNE_WORKSPACE }}
only-packages: ${{ env.PACKAGES }}
steps: install-dune enable-pkg lazy-update-depexts install-gpatch install-depexts

- name: Build & Run tests
run: dune build @all @runtest --only-packages=${{ env.PACKAGES }}