1 # Copyright 2021-2022 The OpenSSL Project Authors. All Rights Reserved.
3 # Licensed under the Apache License 2.0 (the "License"). You may not use
4 # this file except in compliance with the License. You can obtain a copy
5 # in the file LICENSE in the source distribution or at
6 # https://www.openssl.org/source/license.html
10 on: [pull_request, push]
17 # The platform matrix specifies:
18 # arch: the architecture to build for, this defines the tool-chain
19 # prefix {arch}- and the Debian compiler package gcc-{arch}
21 # libs: the Debian package for the necessary link/runtime libraries.
22 # target: the OpenSSL configuration target to use, this is passed
23 # directly to the config command line.
24 # fips: set to "no" to disable building FIPS, leave unset to
25 # build the FIPS provider.
26 # tests: omit this to run all the tests using QEMU, set it to "none"
27 # to never run the tests, otherwise its value is passed to
28 # the "make test" command to allow selective disabling of
32 arch: aarch64-linux-gnu,
33 libs: libc6-dev-arm64-cross,
36 arch: alpha-linux-gnu,
37 libs: libc6.1-dev-alpha-cross,
38 target: linux-alpha-gcc
40 arch: arm-linux-gnueabi,
41 libs: libc6-dev-armel-cross,
43 tests: -test_includes -test_store -test_x509_store
45 arch: arm-linux-gnueabihf,
46 libs: libc6-dev-armhf-cross,
48 tests: -test_includes -test_store -test_x509_store
51 libs: libc6-dev-hppa-cross,
52 target: -static linux-generic32,
54 tests: -test_includes -test_store -test_x509_store
57 libs: libc6-dev-m68k-cross,
58 target: -static -m68040 linux-latomic,
60 tests: -test_includes -test_store -test_x509_store
63 libs: libc6-dev-mips-cross,
64 target: -static linux-mips32,
66 tests: -test_includes -test_store -test_x509_store
68 arch: mips64-linux-gnuabi64,
69 libs: libc6-dev-mips64-cross,
70 target: -static linux64-mips64,
73 arch: mipsel-linux-gnu,
74 libs: libc6-dev-mipsel-cross,
76 tests: -test_includes -test_store -test_x509_store
78 arch: powerpc64le-linux-gnu,
79 libs: libc6-dev-ppc64el-cross,
82 arch: riscv64-linux-gnu,
83 libs: libc6-dev-riscv64-cross,
84 target: linux64-riscv64
86 arch: s390x-linux-gnu,
87 libs: libc6-dev-s390x-cross,
91 libs: libc6-dev-sh4-cross,
92 target: no-async linux-latomic,
93 tests: -test_includes -test_store -test_x509_store
96 # These build with shared libraries but they crash when run
97 # They mirror static builds above in order to cover more of the
100 arch: hppa-linux-gnu,
101 libs: libc6-dev-hppa-cross,
102 target: linux-generic32,
105 arch: m68k-linux-gnu,
106 libs: libc6-dev-m68k-cross,
107 target: -mcfv4e linux-latomic,
110 arch: mips-linux-gnu,
111 libs: libc6-dev-mips-cross,
112 target: linux-mips32,
115 arch: mips64-linux-gnuabi64,
116 libs: libc6-dev-mips64-cross,
117 target: linux64-mips64,
121 # This build doesn't execute either with or without shared libraries.
123 arch: sparc64-linux-gnu,
124 libs: libc6-dev-sparc64-cross,
125 target: linux64-sparcv9,
129 runs-on: ubuntu-latest
131 - name: install packages
134 sudo apt-get -yq --force-yes install \
135 gcc-${{ matrix.platform.arch }} \
136 ${{ matrix.platform.libs }}
137 - uses: actions/checkout@v2
139 - name: config with FIPS
140 if: matrix.platform.fips != 'no'
142 ./config --banner=Configured --strict-warnings enable-fips \
143 --cross-compile-prefix=${{ matrix.platform.arch }}- \
144 ${{ matrix.platform.target }}
145 - name: config without FIPS
146 if: matrix.platform.fips == 'no'
148 ./config --banner=Configured --strict-warnings \
149 --cross-compile-prefix=${{ matrix.platform.arch }}- \
150 ${{ matrix.platform.target }}
152 run: ./configdata.pm --dump
158 if: github.event_name == 'push' && matrix.platform.tests != 'none'
159 run: sudo apt-get -yq --force-yes install qemu-user
161 - name: make all tests
162 if: github.event_name == 'push' && matrix.platform.tests == ''
164 make test HARNESS_JOBS=${HARNESS_JOBS:-4} \
165 TESTS="-test_afalg" \
166 QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }}
167 - name: make some tests
168 if: github.event_name == 'push' && matrix.platform.tests != 'none' && matrix.platform.tests != ''
170 make test HARNESS_JOBS=${HARNESS_JOBS:-4} \
171 TESTS="${{ matrix.platform.tests }} -test_afalg" \
172 QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }}