GitHub Action for ocaml-general
GitHub Action to help using ghcr.io/kxcinc/ocaml-general in GitHub Actions workflows.
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
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 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