Skip to content

Merge pull request #25 from xapi-project/asv/1.5.0 #23

Merge pull request #25 from xapi-project/asv/1.5.0

Merge pull request #25 from xapi-project/asv/1.5.0 #23

Workflow file for this run

name: Build and test
on:
push:
pull_request:
jobs:
ocaml-test:
name: Ocaml tests
runs-on: ubuntu-20.04
env:
package: "xenstore_transport xenstore-tool"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Pull configuration from xs-opam
run: |
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/master/tools/xs-opam-ci.env | cut -f2 -d " " > .env
- name: Load environment file
id: dotenv
uses: falti/[email protected]
- name: Use ocaml
uses: avsm/setup-ocaml@v3
with:
ocaml-compiler: ${{ steps.dotenv.outputs.ocaml_version_full }}
opam-repositories: |
xs-opam: ${{ steps.dotenv.outputs.repository }}
dune-cache: true
opam-pin: false
cache-prefix: v3-${{ steps.system-info.outputs.name }}-${{ steps.system-info.outputs.release }}
env:
DUNE_CACHE_STORAGE_MODE: copy
- name: Install dependencies
run: |
opam pin add . --no-action
opam depext -u ${{ env.package }}
opam install ${{ env.package }} --deps-only --with-test -v
- name: Build
run: opam exec -- make build
- name: Build tests (tests need actual xenstore to run)
run: opam exec -- make test