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]
20 # The platform matrix specifies:
21 # arch: the architecture to build for, this defines the tool-chain
22 # prefix {arch}- and the Debian compiler package gcc-{arch}
24 # libs: the Debian package for the necessary link/runtime libraries.
25 # target: the OpenSSL configuration target to use, this is passed
26 # directly to the config command line.
27 # fips: set to "no" to disable building FIPS, leave unset to
28 # build the FIPS provider.
29 # tests: omit this to run all the tests using QEMU, set it to "none"
30 # to never run the tests, otherwise its value is passed to
31 # the "make test" command to allow selective disabling of
35 arch: aarch64-linux-gnu,
36 libs: libc6-dev-arm64-cross,
39 arch: alpha-linux-gnu,
40 libs: libc6.1-dev-alpha-cross,
41 target: linux-alpha-gcc
43 arch: arm-linux-gnueabi,
44 libs: libc6-dev-armel-cross,
46 tests: -test_includes -test_store -test_x509_store
48 arch: arm-linux-gnueabihf,
49 libs: libc6-dev-armhf-cross,
51 tests: -test_includes -test_store -test_x509_store
54 libs: libc6-dev-hppa-cross,
55 target: -static linux-generic32,
57 tests: -test_includes -test_store -test_x509_store
60 libs: libc6-dev-m68k-cross,
61 target: -static -m68040 linux-latomic -Wno-stringop-overflow,
63 tests: -test_includes -test_store -test_x509_store
66 libs: libc6-dev-mips-cross,
67 target: -static linux-mips32,
69 tests: -test_includes -test_store -test_x509_store
71 arch: mips64-linux-gnuabi64,
72 libs: libc6-dev-mips64-cross,
73 target: -static linux64-mips64,
76 arch: mipsel-linux-gnu,
77 libs: libc6-dev-mipsel-cross,
79 tests: -test_includes -test_store -test_x509_store
81 arch: powerpc64le-linux-gnu,
82 libs: libc6-dev-ppc64el-cross,
83 # The default compiler for this platform on Ubuntu 20.04 seems
84 # buggy and causes test failures. Dropping the optimisation level
86 target: -O2 linux-ppc64le
88 arch: riscv64-linux-gnu,
89 libs: libc6-dev-riscv64-cross,
90 target: linux64-riscv64
92 arch: s390x-linux-gnu,
93 libs: libc6-dev-s390x-cross,
94 target: linux64-s390x -Wno-stringop-overflow
97 libs: libc6-dev-sh4-cross,
98 target: no-async linux-latomic,
99 tests: -test_includes -test_store -test_x509_store
102 # These build with shared libraries but they crash when run
103 # They mirror static builds above in order to cover more of the
106 arch: hppa-linux-gnu,
107 libs: libc6-dev-hppa-cross,
108 target: linux-generic32,
111 arch: m68k-linux-gnu,
112 libs: libc6-dev-m68k-cross,
113 target: -mcfv4e linux-latomic -Wno-stringop-overflow,
116 arch: mips-linux-gnu,
117 libs: libc6-dev-mips-cross,
118 target: linux-mips32,
121 arch: mips64-linux-gnuabi64,
122 libs: libc6-dev-mips64-cross,
123 target: linux64-mips64,
127 # This build doesn't execute either with or without shared libraries.
129 arch: sparc64-linux-gnu,
130 libs: libc6-dev-sparc64-cross,
131 target: linux64-sparcv9,
135 runs-on: ubuntu-latest
137 - name: install packages
140 sudo apt-get -yq --force-yes install \
141 gcc-${{ matrix.platform.arch }} \
142 ${{ matrix.platform.libs }}
143 - uses: actions/checkout@v3
145 - name: config with FIPS
146 if: matrix.platform.fips != 'no'
148 ./config --banner=Configured --strict-warnings enable-fips \
149 --cross-compile-prefix=${{ matrix.platform.arch }}- \
150 ${{ matrix.platform.target }}
151 - name: config without FIPS
152 if: matrix.platform.fips == 'no'
154 ./config --banner=Configured --strict-warnings \
155 --cross-compile-prefix=${{ matrix.platform.arch }}- \
156 ${{ matrix.platform.target }}
158 run: ./configdata.pm --dump
164 if: github.event_name == 'push' && matrix.platform.tests != 'none'
165 run: sudo apt-get -yq --force-yes install qemu-user
167 - name: make all tests
168 if: github.event_name == 'push' && matrix.platform.tests == ''
170 make test HARNESS_JOBS=${HARNESS_JOBS:-4} \
171 TESTS="-test_afalg" \
172 QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }}
173 - name: make some tests
174 if: github.event_name == 'push' && matrix.platform.tests != 'none' && matrix.platform.tests != ''
176 make test HARNESS_JOBS=${HARNESS_JOBS:-4} \
177 TESTS="${{ matrix.platform.tests }} -test_afalg" \
178 QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }}