Skip to content

Enable 5.5 in CI

Enable 5.5 in CI #503

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
branches:
- "**" # This will match pull requests targeting any branch
permissions:
contents: read
jobs:
build:
name: CI
runs-on: ubuntu-latest
env:
OCAML_VERSION: "5.4"
DUNE_VERSION: "3.23.0"
DUNE_DIGEST: "sha256:5588605a056545459833b10fcbfffa240841fa440d92862bfe94a4c8bfc52400"
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup mdexp
uses: mbarbin/mdexp-actions/setup-mdexp@42da13e622de9559da363ef5906ffde63a982efd # v1.0.0-alpha.1
with:
mdexp-version: "0.0.20260315"
mdexp-digest: "sha256:f4fc53bcaa50c9dd979b968804c38322b9b7e6aa699d9d6d2d1f101965332018"
- name: Environment setup
run: |
echo "DUNE_WORKSPACE=$PWD/dune-workspace.${{ env.OCAML_VERSION }}" >> "$GITHUB_ENV"
- name: Setup Dune
uses: mbarbin/setup-dune@03ede0220d3fe665f250727d8e21b7c0f9517f3b # v2.0.0+patch-7
env:
GH_TOKEN: ${{ github.token }}
with:
version: "${{ env.DUNE_VERSION }}"
dune-digest: "${{ env.DUNE_DIGEST }}"
workspace: "${{ env.DUNE_WORKSPACE }}"
cache-prefix: "main-ci-${{ env.OCAML_VERSION }}"
cache-readonly: ${{ github.ref != 'refs/heads/main' }}
steps: install-dune enable-pkg lazy-update-depexts install-gpatch install-depexts
# Setting implicit_transitive_deps based on the compiler version.
- name: Edit dune-project
run: sed -i 's/(implicit_transitive_deps [^)]*)/(implicit_transitive_deps false)/' dune-project
- name: Build and Run tests
run: |
rm -rf _build/default/
mkdir $BISECT_DIR
dune build @all @runtest --force --instrument-with bisect_ppx
env:
BISECT_DIR: ${{ runner.temp }}/_bisect_ppx_data
BISECT_FILE: ${{ runner.temp }}/_bisect_ppx_data/data
- name: Send coverage report to Coveralls
run: dune exec -- bisect-ppx-report send-to Coveralls --coverage-path $BISECT_DIR
env:
BISECT_DIR: ${{ runner.temp }}/_bisect_ppx_data
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}
- name: Lint
run: dune build @lint @fmt @unused-libs
- name: Build Doc
run: dune build @doc
# Before checking for uncommitted changes we need to restore changes
# potentially made to the dune-project file.
- name: Restore dune-project
run: git restore dune-project
- name: Check for uncommitted changes
run: git diff --exit-code