Skip to content

GitHub Action to help using ghcr.io/kxcinc/ocaml-general in GitHub Actions

License

Notifications You must be signed in to change notification settings

kxcdev/ocaml-general-gha

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub Action for ocaml-general

GitHub Action to help using ghcr.io/kxcinc/ocaml-general in GitHub Actions workflows.

Get Started

Simply add the following as a step to your GitHub Action workflow file:

- name: Build and test OCaml
  uses: kxcdev/ocaml-general-gha@v3

A template / sample repository is available: https://github.com/kxcdev/ocaml-general-gha-template

Options and Outputs

Example usage with options

- name: Build and test OCaml
  uses: kxcdev/ocaml-general-gha@v3
  with:
    ocaml-version: 4.14.1
    setup-command: "opam install --locked . -y --deps-only"
    build-command: "dune build @ci"
    skip-testing: true

Options on Versions

Option Default Comments
ocaml-version 5.0.0 see below for available values
node-version latest see below for available values

Options on Result Reporting

Option Default Comments
report-test-result true specify false to disable reporting test result to GitHub GUI
pr-report-test-result true specify false to disable reporting test result to GitHub PR (effectively false when report-test-result is false)

Options on Command Customization

Option Default Comments
build-command dune build
test-command dune runtest you can skip testing with the skip-testing option
setup-command
(collapsed)opam install . --yes --deps-only --with-test --verbose
you can skip setup with the skip-setup option
skip-testing false specify true to skip testing
skip-setup false specify true to skip setup

Options and Outputs on odoc and its GitHub Pages Integration

Option Default Comments
with-odoc false specify true to enable odoc related features
odoc-build-command
(collapsed)opam exec -- dune build @doc
set to override the default odoc build command
odoc-upload-artifact true whether upload odoc document site as a GitHub Actions artifact
odoc-upload-artifact-name github-pages artifact name when odoc-upload-artifact is set to true
odoc-deploy-github-pages false feature not yet available; specifying true will result the action to fail
Output Available When Comments
odoc-site-path with-odoc is true not available due to actions/runner#2009
odoc-github-pages-url with-odoc and odoc-deploy-github-pages are true not available due to actions/runner#2009

Notes on versions

About

GitHub Action to help using ghcr.io/kxcinc/ocaml-general in GitHub Actions

Resources

License

Stars

Watchers

Forks

Packages

No packages published