xref: /freebsd/crypto/libecc/.github/workflows/libecc_examples.yml (revision f0865ec9906d5a18fa2a3b61381f22ce16e606ad)
1*f0865ec9SKyle Evansname: libecc
2*f0865ec9SKyle Evans
3*f0865ec9SKyle Evans# Run this workflow every time a new commit pushed to your repository
4*f0865ec9SKyle Evanson: push
5*f0865ec9SKyle Evans
6*f0865ec9SKyle Evansjobs:
7*f0865ec9SKyle Evans  examples:
8*f0865ec9SKyle Evans    runs-on: ubuntu-22.04
9*f0865ec9SKyle Evans    strategy:
10*f0865ec9SKyle Evans      #max-parallel: 10
11*f0865ec9SKyle Evans      matrix:
12*f0865ec9SKyle Evans        cc: [gcc, clang]
13*f0865ec9SKyle Evans        blinding: [0, 1]
14*f0865ec9SKyle Evans        cryptofuzz: [1]
15*f0865ec9SKyle Evans    steps:
16*f0865ec9SKyle Evans      # Checkout repository
17*f0865ec9SKyle Evans      - name: checkout repository
18*f0865ec9SKyle Evans        uses: actions/checkout@v2
19*f0865ec9SKyle Evans      # Run actions
20*f0865ec9SKyle Evans      # libecc examples tests
21*f0865ec9SKyle Evans      - name: libecc examples tests
22*f0865ec9SKyle Evans        env:
23*f0865ec9SKyle Evans          CC: ${{ matrix.cc }}
24*f0865ec9SKyle Evans          BLINDING: ${{ matrix.blinding }}
25*f0865ec9SKyle Evans          CRYPTOFUZZ: ${{ matrix.cryptofuzz }}
26*f0865ec9SKyle Evans          ASSERT_PRINT: 1
27*f0865ec9SKyle Evans          # We want to parallelize self tests
28*f0865ec9SKyle Evans          OPENMP_SELF_TESTS: 1
29*f0865ec9SKyle Evans        shell: bash
30*f0865ec9SKyle Evans        run: |
31*f0865ec9SKyle Evans          # Install OpenMP
32*f0865ec9SKyle Evans          sudo apt-get update;
33*f0865ec9SKyle Evans          sudo apt-get -y install libomp-dev;
34*f0865ec9SKyle Evans          # Compile and compile the tests
35*f0865ec9SKyle Evans          #
36*f0865ec9SKyle Evans          EXTRA_CFLAGS="-DUSER_NN_BIT_LEN=4096" make && cd src/examples/ && EXTRA_CFLAGS="-DUSER_NN_BIT_LEN=4096" make && ./sig/rsa/rsa && ./sig/dsa/dsa && ./sig/kcdsa/kcdsa && ./sig/sdsa/sdsa && ./sig/gostr34_10_94/gostr34_10_94 && ./sss/sss && ./basic/curve_basic_examples && ./basic/curve_ecdh && make clean && cd - && make clean;
37*f0865ec9SKyle Evans          make 32 && cd src/examples/ && make 32 && ./sss/sss && ./basic/curve_basic_examples && ./basic/curve_ecdh && make clean && cd - && make clean;
38*f0865ec9SKyle Evans          make 16 && cd src/examples/ && make 16 && ./sss/sss && ./basic/curve_basic_examples && ./basic/curve_ecdh && make clean && cd - && make clean;
39*f0865ec9SKyle Evans        continue-on-error: false
40