2021-05-31 08:29:55 +08:00
|
|
|
name: Cross Compile
|
|
|
|
|
|
|
|
on: [pull_request, push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
cross-compilation:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-07-22 17:13:41 +08:00
|
|
|
# The platform matrix specifies:
|
|
|
|
# arch: the architecture to build for, this defines the tool-chain
|
|
|
|
# prefix {arch}- and the Debian compiler package gcc-{arch}
|
|
|
|
# name.
|
|
|
|
# libs: the Debian package for the necessary link/runtime libraries.
|
|
|
|
# target: the OpenSSL configuration target to use, this is passed
|
|
|
|
# directly to the config command line.
|
2021-07-23 09:48:32 +08:00
|
|
|
# fips: set to "no" to disable building FIPS, leave unset to
|
|
|
|
# build the FIPS provider.
|
2021-07-22 17:13:41 +08:00
|
|
|
# tests: omit this to run all the tests using QEMU, set it to "none"
|
2021-08-19 19:05:15 +08:00
|
|
|
# to never run the tests, otherwise its value is passed to
|
|
|
|
# the "make test" command to allow selective disabling of
|
2021-07-22 17:13:41 +08:00
|
|
|
# tests.
|
2021-05-31 08:29:55 +08:00
|
|
|
platform: [
|
|
|
|
{
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: aarch64-linux-gnu,
|
|
|
|
libs: libc6-dev-arm64-cross,
|
2021-05-31 08:29:55 +08:00
|
|
|
target: linux-aarch64
|
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: alpha-linux-gnu,
|
|
|
|
libs: libc6.1-dev-alpha-cross,
|
2021-05-31 08:29:55 +08:00
|
|
|
target: linux-alpha-gcc
|
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: arm-linux-gnueabi,
|
|
|
|
libs: libc6-dev-armel-cross,
|
|
|
|
target: linux-armv4,
|
|
|
|
tests: -test_includes -test_store -test_x509_store
|
2021-05-31 08:29:55 +08:00
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: arm-linux-gnueabihf,
|
|
|
|
libs: libc6-dev-armhf-cross,
|
|
|
|
target: linux-armv4,
|
|
|
|
tests: -test_includes -test_store -test_x509_store
|
2021-05-31 08:29:55 +08:00
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: hppa-linux-gnu,
|
|
|
|
libs: libc6-dev-hppa-cross,
|
2021-07-23 09:48:32 +08:00
|
|
|
target: -static linux-generic32,
|
|
|
|
fips: no,
|
|
|
|
tests: -test_includes -test_store -test_x509_store
|
2021-05-31 08:29:55 +08:00
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: m68k-linux-gnu,
|
|
|
|
libs: libc6-dev-m68k-cross,
|
2021-07-26 09:57:48 +08:00
|
|
|
target: -static -m68040 linux-latomic,
|
2021-07-23 09:48:32 +08:00
|
|
|
fips: no,
|
2021-07-26 09:54:12 +08:00
|
|
|
tests: -test_includes -test_store -test_x509_store
|
2021-05-31 08:29:55 +08:00
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: mips-linux-gnu,
|
|
|
|
libs: libc6-dev-mips-cross,
|
2021-07-23 09:48:32 +08:00
|
|
|
target: -static linux-mips32,
|
|
|
|
fips: no,
|
|
|
|
tests: -test_includes -test_store -test_x509_store
|
2021-07-22 17:13:41 +08:00
|
|
|
}, {
|
|
|
|
arch: mips64-linux-gnuabi64,
|
|
|
|
libs: libc6-dev-mips64-cross,
|
2021-07-23 09:48:32 +08:00
|
|
|
target: -static linux64-mips64,
|
|
|
|
fips: no
|
2021-07-22 17:13:41 +08:00
|
|
|
}, {
|
|
|
|
arch: mipsel-linux-gnu,
|
|
|
|
libs: libc6-dev-mipsel-cross,
|
|
|
|
target: linux-mips32,
|
|
|
|
tests: -test_includes -test_store -test_x509_store
|
|
|
|
}, {
|
|
|
|
arch: powerpc64le-linux-gnu,
|
|
|
|
libs: libc6-dev-ppc64el-cross,
|
2021-05-31 08:29:55 +08:00
|
|
|
target: linux-ppc64le
|
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: riscv64-linux-gnu,
|
|
|
|
libs: libc6-dev-riscv64-cross,
|
2021-05-31 08:29:55 +08:00
|
|
|
target: linux64-riscv64
|
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: s390x-linux-gnu,
|
|
|
|
libs: libc6-dev-s390x-cross,
|
2021-05-31 08:29:55 +08:00
|
|
|
target: linux64-s390x
|
|
|
|
}, {
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: sh4-linux-gnu,
|
|
|
|
libs: libc6-dev-sh4-cross,
|
2021-07-26 10:54:50 +08:00
|
|
|
target: no-async linux-latomic,
|
|
|
|
tests: -test_includes -test_store -test_x509_store
|
2021-07-23 09:48:32 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
# These build with shared libraries but they crash when run
|
|
|
|
# They mirror static builds above in order to cover more of the
|
|
|
|
# code base.
|
|
|
|
{
|
|
|
|
arch: hppa-linux-gnu,
|
|
|
|
libs: libc6-dev-hppa-cross,
|
|
|
|
target: linux-generic32,
|
|
|
|
tests: none
|
2021-07-22 17:13:41 +08:00
|
|
|
}, {
|
2021-07-23 09:48:32 +08:00
|
|
|
arch: m68k-linux-gnu,
|
|
|
|
libs: libc6-dev-m68k-cross,
|
2021-07-26 09:57:48 +08:00
|
|
|
target: -mcfv4e linux-latomic,
|
2021-07-23 09:48:32 +08:00
|
|
|
tests: none
|
|
|
|
}, {
|
|
|
|
arch: mips-linux-gnu,
|
|
|
|
libs: libc6-dev-mips-cross,
|
|
|
|
target: linux-mips32,
|
|
|
|
tests: none
|
|
|
|
}, {
|
|
|
|
arch: mips64-linux-gnuabi64,
|
|
|
|
libs: libc6-dev-mips64-cross,
|
|
|
|
target: linux64-mips64,
|
|
|
|
tests: none
|
|
|
|
},
|
|
|
|
|
|
|
|
# This build doesn't execute either with or without shared libraries.
|
|
|
|
{
|
2021-07-22 17:13:41 +08:00
|
|
|
arch: sparc64-linux-gnu,
|
|
|
|
libs: libc6-dev-sparc64-cross,
|
|
|
|
target: linux64-sparcv9,
|
|
|
|
tests: none
|
2021-05-31 08:29:55 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: install packages
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-07-22 17:13:41 +08:00
|
|
|
sudo apt-get -yq --force-yes install \
|
|
|
|
gcc-${{ matrix.platform.arch }} \
|
|
|
|
${{ matrix.platform.libs }}
|
2021-05-31 08:29:55 +08:00
|
|
|
- uses: actions/checkout@v2
|
2021-07-22 17:13:41 +08:00
|
|
|
|
2021-07-23 09:48:32 +08:00
|
|
|
- name: config with FIPS
|
|
|
|
if: matrix.platform.fips != 'no'
|
2021-07-22 17:13:41 +08:00
|
|
|
run: |
|
|
|
|
./config --banner=Configured --strict-warnings enable-fips \
|
|
|
|
--cross-compile-prefix=${{ matrix.platform.arch }}- \
|
|
|
|
${{ matrix.platform.target }}
|
2021-07-23 09:48:32 +08:00
|
|
|
- name: config without FIPS
|
|
|
|
if: matrix.platform.fips == 'no'
|
|
|
|
run: |
|
|
|
|
./config --banner=Configured --strict-warnings \
|
|
|
|
--cross-compile-prefix=${{ matrix.platform.arch }}- \
|
|
|
|
${{ matrix.platform.target }}
|
2021-07-22 17:13:41 +08:00
|
|
|
- name: config dump
|
|
|
|
run: ./configdata.pm --dump
|
|
|
|
|
2021-05-31 08:29:55 +08:00
|
|
|
- name: make
|
|
|
|
run: make -s -j4
|
2021-07-22 17:13:41 +08:00
|
|
|
|
|
|
|
- name: install qemu
|
|
|
|
if: github.event_name == 'push' && matrix.platform.tests != 'none'
|
|
|
|
run: sudo apt-get -yq --force-yes install qemu-user
|
|
|
|
|
|
|
|
- name: make all tests
|
|
|
|
if: github.event_name == 'push' && matrix.platform.tests == ''
|
|
|
|
run: |
|
|
|
|
make test HARNESS_JOBS=${HARNESS_JOBS:-4} \
|
|
|
|
QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }}
|
|
|
|
- name: make some tests
|
|
|
|
if: github.event_name == 'push' && matrix.platform.tests != 'none' && matrix.platform.tests != ''
|
|
|
|
run: |
|
|
|
|
make test HARNESS_JOBS=${HARNESS_JOBS:-4} \
|
|
|
|
TESTS="${{ matrix.platform.tests }}" \
|
|
|
|
QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }}
|