forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (73 loc) · 2.22 KB
/
Copy pathmain.yml
File metadata and controls
79 lines (73 loc) · 2.22 KB
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
# Main tests
# ==========
# Build the compiler with makefiles and run the testsuite
name: main
# Configure when to run the workflows. Currently only when
# it affects the `flambda2.0-stable` branch (either pushes to the branch,
# or pull request against it).
on:
push:
branches:
- flambda2.0-stable
pull_request:
branches:
- flambda2.0-stable
jobs:
# Makefile-based: compile & run the testsuite
# ===========================================
build:
runs-on: ${{ matrix.os }}
# Build Matrix
# --------------
strategy:
matrix:
# Operating system to run tests on. TODO: add macos-latest and windows-latest
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
# Build ENV
# ---------
env:
# Paralellism for builds
J: "3"
# disable flambda invariants else everything takes forever to compile
OCAMLPARAM: "_,flambda-invariants=0"
# Build/test steps
# ----------------
steps:
# checkout the repo (shallow clone, currently)
- name: Checkout the repo
uses: actions/checkout@master
# Apply ocamltest patch
- name: Patch the repo
run: git apply .github/workflows/ocamltest_makefile.patch
# Install dependencies
- name: Install dependencies
run: sudo apt-get install parallel
# Configure the compiler
- name: configure
run: ./configure --enable-flambda --without-ocamldoc
# Debug step
- name: Debug step
run: echo "J is $J"
# Build the compiler
- name: Build the compiler
run: |
make -j $J world
make -j $J opt
make -j $J opt.opt
# Build ocamlnat
- name: Build ocamlnat
run: |
make -j $J ocamlnat
# Generate list of tests to run
- name: Generate test list
run: grep -v '#' .github/workflows/test-list > .github/workflows/main.list
# Build & Run some part of the testsuite
- name: Running the testsuite
run: |
make -C testsuite tools lib
make -C testsuite list-parallel FILE=../.github/workflows/main.list
# If the testsuite has failed, dump the relavant ocamltest logs
- name: Ocamltest failing logs
if: failure()
run: cd testsuite && make logs