-
Notifications
You must be signed in to change notification settings - Fork 1
125 lines (107 loc) · 3.9 KB
/
run_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
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
name: Run tests
on:
# Let's run it on any commit
[push]
# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
env:
SUITE_REPO: "NilFoundation/crypto3"
LIB_NAME: "zk"
CACHE_NAME: "checkout-job-cache"
jobs:
checkout:
runs-on: [self-hosted, tests-runner]
steps:
- name: Cleanup # TODO - move to scripts on runner
run: |
rm -rf ./* || true
rm -rf ./.??* || true
- name: Checkout suite
uses: actions/checkout@v3
with:
repository: ${{ env.SUITE_REPO }}
submodules: recursive
- name: Checkout source code
uses: actions/checkout@v3
with:
path: ./libs/${{ env.LIB_NAME }}
submodules: recursive
- name: Cmake and build
env:
CMAKE_ARGS: "
-DCMAKE_BUILD_TYPE=Debug
-DBUILD_SHARED_LIBS=FALSE
-DBUILD_TESTS=TRUE
-DZK_PLACEHOLDER_PROFILING=TRUE
"
run: |
mkdir build
cd build
cmake ${{ env.CMAKE_ARGS }} ..
- name: Archive build results
run: |
touch ${{ env.CACHE_NAME }}.tar.gz
tar -czf ${{ env.CACHE_NAME }}.tar.gz --exclude=${{ env.CACHE_NAME }}.tar.gz .
- name: Cache archived job output
uses: actions/upload-artifact@v3
with:
name: ${{ env.CACHE_NAME }}
path: ${{ env.CACHE_NAME }}.tar.gz
retention-days: 1
run_tests:
runs-on: [self-hosted, tests-runner]
needs: [checkout]
strategy:
fail-fast: false
matrix:
target: [
actor_zk_commitment_fold_polynomial_test,
actor_zk_commitment_fri_test,
actor_zk_commitment_lpc_test,
actor_zk_commitment_kzg_test,
actor_zk_systems_plonk_placeholder_placeholder_test,
actor_zk_commitment_powers_of_tau_test,
actor_zk_commitment_proof_of_knowledge_test,
actor_zk_commitment_r1cs_gg_ppzksnark_mpc_test,
actor_zk_math_expression_test,
actor_zk_systems_plonk_plonk_constraint_test,
actor_zk_commitment_proof_of_knowledge_test,
actor_zk_transcript_transcript_test
# Performance tests pass, but they are excluded from here due to speed.
# actor_zk_commitment_lpc_performance_test
# The following tests are temporarily failing.
# actor_zk_commitment_pedersen_test
# actor_zk_transcript_kimchi_transcript_test
# actor_zk_commitment_kimchi_pedersen_test
# actor_zk_commitment_type_traits_test
# actor_zk_relations_numeric_qap_test
# actor_zk_relations_numeric_sap_test
# actor_zk_relations_numeric_ssp_test
# actor_zk_routing_algorithms_test_routing_algorithms_test
# actor_zk_systems_pcd_r1cs_pcd_r1cs_mp_ppzkpcd_r1cs_mp_ppzkpcd_test
# actor_zk_systems_plonk_pickles_kimchi_test
# actor_zk_systems_plonk_pickles_oracles_test
] # Tests to execute
steps:
- name: Cleanup # TODO - move to scripts on runner
run: |
rm -rf ./* || true
rm -rf ./.??* || true
- name: Upload checkout job cache
uses: actions/download-artifact@v3
with:
name: ${{ env.CACHE_NAME }}
- name: Extract artifacts
run: |
tar -xf ${{ env.CACHE_NAME }}.tar.gz
rm ${{ env.CACHE_NAME }}.tar.gz
- name: Build
working-directory: ./build
run: cmake --build . -t ${{ matrix.target }}
- name: Run test
working-directory: ./build
run: |
cd libs/${{ env.LIB_NAME }}/test
COLOR='\033[0;33m'
echo -e "${COLOR}${{ matrix.target }}"
./${{ matrix.target }}