-
Notifications
You must be signed in to change notification settings - Fork 113
146 lines (120 loc) · 3.56 KB
/
ci.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
name: CI
on:
workflow_dispatch:
pull_request:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
# https://doc.rust-lang.org/cargo/reference/profiles.html#release
RUSTFLAGS: -Coverflow-checks=y -Cdebug-assertions=y
# https://doc.rust-lang.org/cargo/reference/profiles.html#incremental
CARGO_INCREMENTAL: 1
# https://nexte.st/book/pre-built-binaries.html#using-nextest-in-github-actions
CARGO_TERM_COLOR: always
# 30 MB of stack for Keccak tests
RUST_MIN_STACK: 31457280
CARGO_EXTRA_ARGS: "--workspace --exclude saffron"
jobs:
run_mdbook:
name: Building MDBook
runs-on: ubuntu-latest
strategy:
matrix:
rust_toolchain_version: ["1.72"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Use shared Rust toolchain setting up steps
uses: ./.github/actions/toolchain-shared
with:
rust_toolchain_version: ${{ matrix.rust_toolchain_version }}
- name: Build the mdbook
run: |
cd book
make deps
make build
run_checks:
name: Run checks and tests
runs-on: 'ubuntu-latest'
strategy:
matrix:
rust_toolchain_version: ["1.72", "1.73", "1.74", "1.75", "1.76", "1.77", "1.78", "1.79"]
# FIXME: currently not available for 5.0.0.
# It might be related to boxroot dependency, and we would need to bump
# up the ocaml-rs dependency
ocaml_version: ["4.14"]
node: [20]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up NodeJS
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Use shared Rust toolchain setting up steps
uses: ./.github/actions/toolchain-shared
with:
rust_toolchain_version: ${{ matrix.rust_toolchain_version }}
- name: Apply the Rust smart cacheing
uses: Swatinem/rust-cache@v2
- name: Use shared OCaml setting up steps
uses: ./.github/actions/ocaml-shared
with:
ocaml_version: ${{ matrix.ocaml_version }}
- name: Install markdownlint
run: |
# FIXME: 0.39.0 makes the CI fail
npm install -g [email protected]
#
# Doc & Spec
#
- name: Install cargo-spec for specifications
run: |
eval $(opam env)
cargo install --locked cargo-spec
- name: Build the kimchi specification
run: |
cd book/specifications/kimchi
make build
- name: Build the polynomial commitment specification
run: |
cd book/specifications/poly-commitment
make build
- name: Check that up-to-date specification is checked in
run: |
git diff --exit-code ":(exclude)rust-toolchain"
#
# Coding guidelines
#
- name: Lint (clippy)
run: |
eval $(opam env)
make lint
#
# Build
#
- name: Ensure that everything builds
run: |
eval $(opam env)
make
#
# Tests
#
- name: Install test dependencies
run: |
make install-test-deps
- name: Build the MIPS binaries
uses: ./.github/actions/build-mips
- name: Doc tests
run: |
eval $(opam env)
make test-doc
- name: Run non-heavy tests without the code coverage
run: |
eval $(opam env)
make nextest