forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.35 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build and test
on:
push:
pull_request:
schedule:
# run daily, this refreshes the cache
- cron: "13 2 * * *"
merge_group:
concurrency: # On new push, cancel old workflows from the same PR, branch or tag:
group: ${{ github.workflow }}-${{github.event_name}}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ocaml-tests:
name: Run OCaml tests
runs-on: ubuntu-22.04
env:
# Ensure you also update test-sdk-builds
# when changing this value, to keep builds
# consistent
XAPI_VERSION: "v0.0.0"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup XenAPI environment
uses: ./.github/workflows/setup-xapi-environment
with:
xapi_version: ${{ env.XAPI_VERSION }}
- name: Build
run: opam exec -- make
- name: Run tests
run: opam exec -- make test
- name: Check all code
run: opam exec -- make check
- name: Run stress tests
run: opam exec -- make stresstest
if: ${{ github.event_name == 'schedule' }}
- name: Make install smoketest
run: |
opam exec -- make install DESTDIR=$(mktemp -d)
- name: Check disk space
run: df -h || true
- name: Trim dune cache
run: opam exec -- dune cache trim --size=2GiB