forked from ethereum/c-kzg-4844
-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (67 loc) · 1.73 KB
/
c-tests.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
name: C
on:
push:
branches:
- main
pull_request:
branches:
- main
defaults:
run:
shell: bash
working-directory: src
jobs:
tests:
runs-on: ${{matrix.os}}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
# Checkout repository and blst submodule.
- uses: actions/checkout@v3
with:
submodules: recursive
# Check formatting.
# Only need to check this once.
- name: Check formatting
if: matrix.os == 'ubuntu-latest'
run: |
make format
git diff --exit-code
# Build and test.
- name: Build
run: make test_c_kzg_4844
- name: Test
run: make test
# Run sanitizers.
# Doesn't work on Windows.
- name: Clang Sanitizers
if: matrix.os != 'windows-latest'
run: make sanitize
# Run static analyzer.
# Doesn't work on Windows.
- name: Clang Static Analyzer
if: matrix.os != 'windows-latest'
run: make analyze
# Install LLVM for coverage report.
# Already installed on macOS.
# Doesn't work on Windows.
- name: Install LLVM
if: matrix.os == 'ubuntu-latest'
uses: egor-tensin/setup-clang@v1
# Generate the coverage report.
# Doesn't work on Windows.
- name: Generate coverage report
if: matrix.os != 'windows-latest'
run: make coverage
# Upload the coverage report.
# Didn't generate it for Windows.
- name: Save coverage report
if: matrix.os != 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: coverage
path: src/coverage.html