-
Notifications
You must be signed in to change notification settings - Fork 16
164 lines (142 loc) · 4.88 KB
/
common.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Common CI workflow
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_call:
inputs:
runs_on:
description: 'Type of machine + OS on which to run the tests'
type: string
default: 'ubuntu-latest'
options:
description: >-
Configuration options for the compiler.
Space-separated list of '32bit', 'bytecode-only', 'fp'.
type: string
default: ''
platform:
description: 'Platform. One of: linux, macos, msvc, mingw, cygwin.'
type: string
default: 'linux'
timeout:
description: 'Timeout'
type: number
default: 180
dune_profile:
description: 'Dune profile to use'
type: string
default: 'dev'
runparam:
description: 'OCAMLRUNPARAM to use'
type: string
default: ''
dune_alias:
description: 'dune alias that should be built in the main step'
type: string
default: 'testsuite'
compiler_repository:
description: 'Repository from which to fetch the compiler'
type: string
default: 'ocaml/ocaml'
compiler_ref:
description: 'Git reference to use'
type: string
required: true
permissions: {}
jobs:
test:
env:
QCHECK_MSG_INTERVAL: '60'
OCAML_OPTIONS: ${{ inputs.options }}
OCAML_PLATFORM: ${{ inputs.platform }}
DUNE_PROFILE: ${{ inputs.dune_profile }}
OCAMLRUNPARAM: ${{ inputs.runparam }}
DUNE_CI_ALIAS: ${{ inputs.dune_alias }}
COMPILER_REPO: ${{ inputs.compiler_repository }}
COMPILER_REF: ${{ inputs.compiler_ref }}
LOGBEGINGRP: "::group::"
LOGENDGRP: "::endgroup::"
# For the record, PR 12345 of the compiler can be tested simply by setting
# COMPILER_REF: 'refs/pull/12345/head'
runs-on: ${{ inputs.runs_on }}
timeout-minutes: ${{ inputs.timeout }}
steps:
- name: Configure EOLs on Cygwin
run: |
# Ensure that .expected files are not modified by check out
# as, in Cygwin, the .expected should use LF line endings,
# rather than Windows’ CRLF
git config --global core.autocrlf input
if: inputs.platform == 'cygwin'
- name: Checkout code
uses: actions/checkout@v4
with:
path: multicoretests
- name: Fetch QCheck
uses: actions/checkout@v4
with:
repository: c-cube/qcheck
ref: v0.22
path: multicoretests/qcheck
- name: Pre-Setup
run: |
bash multicoretests/.github/runner.sh setup
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
if: inputs.platform == 'msvc'
- name: Restore cache
uses: actions/cache/restore@v4
id: cache
with:
path: |
${{ env.PREFIX }}
C:\cygwin-packages
key: ${{ env.cache_key }}
- name: Install Cygwin (Windows only)
uses: cygwin/cygwin-install-action@v4
with:
packages: make,bash${{ inputs.platform == 'mingw' && ',mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++' || '' }}${{ inputs.platform == 'cygwin' && ',gcc-core' }}
install-dir: 'D:\cygwin'
if: runner.os == 'Windows'
- name: Fetch OCaml
uses: actions/checkout@v4
with:
repository: ${{ env.COMPILER_REPO }}
ref: ${{ env.COMPILER_REF }}
path: ocaml
submodules: true
if: steps.cache.outputs.cache-hit != 'true' || inputs.platform == 'msvc'
# We need to fetch OCaml in all cases for MSVC for msvs-promote-path
- name: Fetch dune
uses: actions/checkout@v4
with:
repository: ocaml/dune
ref: 3.16.0
path: dune
if: steps.cache.outputs.cache-hit != 'true'
- name: Build and install OCaml and dune
run: |
bash multicoretests/.github/runner.sh ocaml
bash multicoretests/.github/runner.sh dune
if: steps.cache.outputs.cache-hit != 'true'
- name: Save cache
uses: actions/cache/save@v4
with:
path: |
${{ env.PREFIX }}
C:\cygwin-packages
key: ${{ env.cache_key }}
if: steps.cache.outputs.cache-hit != 'true'
- name: Show the configuration
run: |
bash multicoretests/.github/runner.sh show_config
- name: Build the test suite
run: |
bash multicoretests/.github/runner.sh build
- name: Run the internal package tests
run: |
bash multicoretests/.github/runner.sh internaltests
- name: Run the multicore test suite
run: |
bash multicoretests/.github/runner.sh testsuite