xref: /src/crypto/libecc/.github/workflows/libecc_python_tests.yml (revision f0865ec9906d5a18fa2a3b61381f22ce16e606ad)
1736d6639SKyle Evansname: libecc
2736d6639SKyle Evans
3736d6639SKyle Evans# Run this workflow every time a new commit pushed to your repository
4736d6639SKyle Evanson: push
5736d6639SKyle Evans
6736d6639SKyle Evansjobs:
7736d6639SKyle Evans  runtime_tests:
8736d6639SKyle Evans    runs-on: ubuntu-22.04
9736d6639SKyle Evans    strategy:
10736d6639SKyle Evans      #max-parallel: 10
11736d6639SKyle Evans      matrix:
12736d6639SKyle Evans        cc: [gcc, clang]
13736d6639SKyle Evans        blinding: [0, 1]
14736d6639SKyle Evans        cryptofuzz: [1]
15736d6639SKyle Evans    steps:
16736d6639SKyle Evans      # Checkout repository
17736d6639SKyle Evans      - name: checkout repository
18736d6639SKyle Evans        uses: actions/checkout@v2
19736d6639SKyle Evans      # Run actions
20736d6639SKyle Evans      # libecc python tests
21736d6639SKyle Evans      - name: libecc python tests
22736d6639SKyle Evans        env:
23736d6639SKyle Evans          CC: ${{ matrix.cc }}
24736d6639SKyle Evans          BLINDING: ${{ matrix.blinding }}
25736d6639SKyle Evans          CRYPTOFUZZ: ${{ matrix.cryptofuzz }}
26736d6639SKyle Evans          ASSERT_PRINT: 1
27736d6639SKyle Evans          # We want to parallelize self tests
28736d6639SKyle Evans          OPENMP_SELF_TESTS: 1
29736d6639SKyle Evans        shell: bash
30736d6639SKyle Evans        run: |
31736d6639SKyle Evans          # Install Python2 and OpenMP
32736d6639SKyle Evans          sudo apt-get update;
33736d6639SKyle Evans          sudo apt-get -y install python2 libomp-dev;
34736d6639SKyle Evans          # Test our Python libecc expanding script
35736d6639SKyle Evans          # Python3
36736d6639SKyle Evans          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;
37736d6639SKyle Evans          # Clean
38736d6639SKyle Evans          echo "y" | python3 scripts/expand_libecc.py --remove-all && make clean;
39736d6639SKyle Evans          # Python2
40736d6639SKyle Evans          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;
41736d6639SKyle Evans          # Clean
42736d6639SKyle Evans          echo "y" | python2 scripts/expand_libecc.py --remove-all && make clean;
43736d6639SKyle Evans        continue-on-error: false
44