xref: /freebsd/crypto/libecc/.github/workflows/libecc_crossarch_tests.yml (revision f0865ec9906d5a18fa2a3b61381f22ce16e606ad)
1name: libecc
2
3# Run this workflow every time a new commit pushed to your repository
4on: push
5
6jobs:
7  cross_arch_tests:
8    runs-on: ubuntu-20.04
9    strategy:
10      #max-parallel: 10
11      matrix:
12        blinding: [0, 1]
13        complete: [1]
14        ladder: [1]
15        #cross_target: [arm-linux-gnueabi, arm-linux-gnueabihf, aarch64-linux-gnu, powerpc64le-linux-gnu, mipsel-linux-gnu, i686-w64-mingw32, x86_64-w64-mingw32, i386-apple-darwin, x86_64-apple-darwin, x86_64h-apple-darwin]
16        cross_target: [arm-linux-gnueabi, arm-linux-gnueabihf, aarch64-linux-gnu, powerpc64le-linux-gnu, mipsel-linux-gnu, i686-w64-mingw32, x86_64-w64-mingw32]
17        cross_size: [16, 32, 64]
18    steps:
19      # Add swap because of possible out of memory issues
20      - name: Set Swap Space
21        uses: pierotofy/set-swap-space@master
22        with:
23          swap-size-gb: 10
24      # Checkout repository
25      - name: checkout repository
26        uses: actions/checkout@v2
27      # Run actions
28      # Cross build and cross run tests
29      - name: libecc cross-arch tests
30        env:
31          BLINDING: ${{ matrix.blinding }}
32          COMPLETE: ${{ matrix.complete }}
33          LADDER: ${{ matrix.ladder }}
34          CROSS_TARGET: ${{ matrix.cross_target }}
35          CROSS_SIZE: ${{ matrix.cross_size }}
36          CRYPTOFUZZ: 1
37        shell: bash
38        run: |
39          # Install stuff
40          sudo apt-get update;
41          # This oddity is due to ubuntu (18.04 and 20.04) issue with wine32 in
42          # githbub actions runners ...
43          sudo apt-get -y install software-properties-common;
44          sudo apt-add-repository "ppa:ondrej/php" -y;
45          sudo dpkg --add-architecture i386;
46          sudo apt-get update;
47          sudo apt-get -y install qemu-user-static wine-stable wine32 wine64;
48          # Cross build jobs
49          docker pull multiarch/crossbuild;
50          sh scripts/crossbuild.sh -triplet "${CROSS_TARGET}" "${CROSS_SIZE}";
51          # Check for errors
52          [ ! -z "$(ls -A scripts/crossbuild_out/error_log/)" ] && exit -1;
53          # Test generated cross binaries through qemu-static;
54          sh scripts/crossrun.sh -triplet "${CROSS_TARGET}" "${CROSS_SIZE}";
55        continue-on-error: false
56