/ external / libecc / .github / workflows / libecc_python_tests.yml
libecc_python_tests.yml
 1  name: libecc
 2  
 3  # Run this workflow every time a new commit pushed to your repository
 4  on: push
 5  
 6  jobs:
 7    runtime_tests:
 8      runs-on: ubuntu-22.04
 9      strategy:
10        #max-parallel: 10
11        matrix:
12          cc: [gcc, clang]
13          blinding: [0, 1]
14          cryptofuzz: [1]
15      steps:
16        # Checkout repository
17        - name: checkout repository
18          uses: actions/checkout@v2
19        # Run actions
20        # libecc python tests
21        - name: libecc python tests
22          env:
23            CC: ${{ matrix.cc }}
24            BLINDING: ${{ matrix.blinding }}
25            CRYPTOFUZZ: ${{ matrix.cryptofuzz }}
26            ASSERT_PRINT: 1
27            # We want to parallelize self tests
28            OPENMP_SELF_TESTS: 1
29          shell: bash
30          run: |
31            # Install Python2 and OpenMP
32            sudo apt-get update;
33            sudo apt-get -y install python2 libomp-dev;
34            # Test our Python libecc expanding script
35            # Python3
36            echo "y" | python3 scripts/expand_libecc.py --remove-all && PYTHON=python3 sh scripts/gen_curves_tests.sh && make clean && make && ./build/ec_self_tests vectors rand;
37            # Clean
38            echo "y" | python3 scripts/expand_libecc.py --remove-all && make clean;
39            # Python2
40            echo "y" | python2 scripts/expand_libecc.py --remove-all && PYTHON=python2 sh scripts/gen_curves_tests.sh && make clean && make && ./build/ec_self_tests vectors rand;
41            # Clean
42            echo "y" | python2 scripts/expand_libecc.py --remove-all && make clean;
43          continue-on-error: false