-
Notifications
You must be signed in to change notification settings - Fork 365
187 lines (186 loc) · 5.65 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# SPDX-FileCopyrightText: 2020 - 2022 Intel
# SPDX-FileCopyrightText: 2021 - 2022 Fraunhofer SIT sponsored by Infineon
# SPDX-FileCopyrightText: 2024 Juergen Repp
# SPDX-License-Identifier: BSD-2-Clause
name: CI
on:
[push, pull_request]
jobs:
build-test:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
strategy:
matrix:
docker_image: [ubuntu-20.04, fedora-32, opensuse-leap, ubuntu-22.04, alpine-3.15]
compiler: [gcc, clang]
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fix-sanitizer
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Launch Action
uses:
tpm2-software/ci/runCI@main
with:
DOCKER_IMAGE: ${{ matrix.docker_image }}
CC: ${{ matrix.compiler }}
BASE_REF: ${{ github.base_ref }}
PROJECT_NAME: ${{ github.event.repository.name }}
- name: failure
if: ${{ failure() }}
run: cat $(find ../ -name test-suite.log) || true
scanbuild:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fix-sanitizer
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Launch Action
uses:
tpm2-software/ci/runCI@main
with:
CC: clang
DOCKER_IMAGE: fedora-32
SCANBUILD: yes
PROJECT_NAME: ${{ github.event.repository.name }}
- name: failure
if: ${{ failure() }}
run: cat $(find ../ -name test-suite.log) || true
test-tcti-config:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fix-sanitizer
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Launch Action
uses:
tpm2-software/ci/runCI@main
with:
CC: gcc
DOCKER_IMAGE: fedora-32
TEST_TCTI_CONFIG: true
PROJECT_NAME: ${{ github.event.repository.name }}
- name: failure
if: ${{ failure() }}
run: cat $(find ../ -name test-suite.log) || true
test-mbedtls:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
strategy:
matrix:
docker_image: [ubuntu-20.04, ubuntu-22.04-mbedtls-3.1]
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fix-sanitizer
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Launch Action
uses:
tpm2-software/ci/runCI@main
with:
CC: gcc
DOCKER_IMAGE: ${{ matrix.docker_image }}
WITH_CRYPTO: mbed
PROJECT_NAME: ${{ github.event.repository.name }}
- name: failure
if: ${{ failure() }}
run: cat $(find ../ -name test-suite.log) || true
test-no-crypto-build:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fix-sanitizer
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Launch Action
uses:
tpm2-software/ci/runCI@main
with:
CC: gcc
DOCKER_IMAGE: ubuntu-20.04
WITH_CRYPTO: none
PROJECT_NAME: ${{ github.event.repository.name }}
- name: failure
if: ${{ failure() }}
run: cat $(find ../ -name test-suite.log) || true
test-coverage:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fix-sanitizer
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Launch Action
uses:
tpm2-software/ci/runCI@main
with:
CC: gcc
DOCKER_IMAGE: ubuntu-20.04
ENABLE_COVERAGE: true
PROJECT_NAME: ${{ github.event.repository.name }}
- name: failure
if: ${{ failure() }}
run: cat $(find ../ -name test-suite.log) || true
test-fuzz:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Launch Action
uses:
tpm2-software/ci/runCI@main
with:
DOCKER_IMAGE: fedora-32
GEN_FUZZ: 1
CXX: clang++
CC: clang
PROJECT_NAME: ${{ github.event.repository.name }}
- name: failure
if: ${{ failure() }}
run: cat $(find ../ -name test-suite.log) || true
coverity-test:
runs-on: ubuntu-latest
if: contains(github.ref, 'coverity_scan')
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fix-sanitizer
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Launch Coverity Action
uses:
tpm2-software/ci/coverityScan@main
with:
PROJECT_NAME: ${{ github.event.repository.name }}
REPO_BRANCH: ${{ github.ref }}
REPO_NAME: ${{ github.repository }}
ENABLE_COVERITY: true
DOCKER_IMAGE: ubuntu-20.04
CC: gcc
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
COVERITY_SUBMISSION_EMAIL: [email protected]
- name: failure
if: ${{ failure() }}
run: cat $(find ../ -name test-suite.log) || true