-
Notifications
You must be signed in to change notification settings - Fork 3
86 lines (78 loc) · 3.02 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
on: # Run the workflow for each of the following event:
push: # - A branch is pushed or updated.
branches:
- master
pull_request: # - A pull-request is openned or updated.
workflow_dispatch: # - A manual run of the workflow is requested from the GitHub web interface.
release:
types: [created] # - A release is created.
jobs:
build-and-test:
strategy:
fail-fast: false # Don't stop all the workflows when one of them fails.
matrix:
# List of build configurations to test
include:
- arch: generic
simd: none
- arch: x86_64
simd: SSE2
- arch: x86_64
simd: AVX2
runs-on: ubuntu-latest
steps:
# Checkout the repository
- uses: actions/checkout@v2
# Install and setup Alire package manager
- uses: alire-project/setup-alire@v1
with:
version: 1.2.0
# Build the project using the validation build profile to enforce static analysis and coding style.
- name: Build libkeccak
run: |
alr build --validation -- \
-XLIBKECCAK_ARCH=${{ matrix.arch }} \
-XLIBKECCAK_SIMD=${{ matrix.simd }} \
-XLIBKECCAK_COMPILE_CHECKS=enabled \
-XLIBKECCAK_STYLE_CHECKS=enabled
# Build and run the benchmark program
# Note that the benchmark measurements are unlikely to be fully representative
# due to interference from other processes on the CI runner, but the purpose
# of this check is to ensure that the benchmark builds and runs without errors.
- name: Build and run the benchmark
run: |
cd tests/benchmark
alr build -- \
-XLIBKECCAK_ARCH=${{ matrix.arch }} \
-XLIBKECCAK_SIMD=${{ matrix.simd }} \
-XBENCHMARK_COMPILE_CHECKS=enabled \
-XBENCHMARK_STYLE_CHECKS=enabled
alr run -s
# Build and run the Known Answer Tests
- name: Build and run Known Answer Tests
run: |
cd tests/kat
alr build --validation -- \
-XLIBKECCAK_ARCH=${{ matrix.arch }} \
-XLIBKECCAK_SIMD=${{ matrix.simd }} \
-XLIBKECCAK_CONTRACTS=enabled \
-XLIBKECCAK_RUNTIME_CHECKS=enabled \
-XKAT_CONTRACTS=enabled \
-XKAT_RUNTIME_CHECKS=enabled \
-XKAT_COMPILE_CHECKS=enabled \
-XKAT_STYLE_CHECKS=enabled
./run-all-tests.sh
# Build and run the unit tests
- name: Build and run unit tests
run: |
cd tests/unit_tests
alr build --validation -- \
-XLIBKECCAK_ARCH=${{ matrix.arch }} \
-XLIBKECCAK_SIMD=${{ matrix.simd }} \
-XLIBKECCAK_CONTRACTS=enabled \
-XLIBKECCAK_RUNTIME_CHECKS=enabled \
-XUNIT_TESTS_CONTRACTS=enabled \
-XUNIT_TESTS_RUNTIME_CHECKS=enabled \
-XUNIT_TESTS_COMPILE_CHECKS=enabled \
-XUNIT_TESTS_STYLE_CHECKS=enabled
alr run -s