diff options
author | Christoph Müllner <christoph.muellner@vrull.eu> | 2023-01-21 15:49:17 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-01-24 11:01:20 +0000 |
commit | af0a4c46846323fc33f713b5ccd758a526c19ed0 (patch) | |
tree | d2106b93111c04a386cd2eb03faea90119573dd5 /.github | |
parent | 3147785eb23bb27080a0b7accbbff46ac471e86c (diff) |
CI: cross-compile: Allow to set CPU capabilities
The cross-compile CI tests use cross-compilers for building
and QEMU for testing. This implies that testing of ISA extension
for HW accelerated cryptographic calculations is undefined
(it depends on arch-specific QEMU defaults and arch-specific
detection mechanisms in OpenSSL).
Let's add a mechanism to set two environment variables, that allow
to control the ISA extensions:
* QEMU_CPU: used by QEMU to specify CPU capabilities of the emulation
* OPENSSL_*: used by OpenSSL (on some architectures) to enable ISA
extensions.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20107)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/cross-compiles.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.github/workflows/cross-compiles.yml b/.github/workflows/cross-compiles.yml index 81f60b232e..124553c743 100644 --- a/.github/workflows/cross-compiles.yml +++ b/.github/workflows/cross-compiles.yml @@ -30,6 +30,15 @@ jobs: # to never run the tests, otherwise its value is passed to # the "make test" command to allow selective disabling of # tests. + # qemucpu: optional; string that describes CPU properties. + # The string will be used to set the QEMU_CPU variable. + # opensslcapsname: optional; string that describes the postfix of the + # OpenSSL environment variable that defines CPU + # capabilities. E.g. "foo" will result in an + # environment variable with the name OPENSSL_foo. + # opensslcaps: optional; if opensslcapsname (see above) is set, then + # this string will be used as content for the OpenSSL + # capabilities variable. platform: [ { arch: aarch64-linux-gnu, @@ -164,6 +173,15 @@ jobs: if: github.event_name == 'push' && matrix.platform.tests != 'none' run: sudo apt-get -yq --force-yes install qemu-user + - name: Set QEMU environment + if: github.event_name == 'push' && matrix.platform.qemucpu != '' + run: echo "QEMU_CPU=${{ matrix.platform.qemucpu }}" >> $GITHUB_ENV + + - name: Set OpenSSL caps environment + if: github.event_name == 'push' && matrix.platform.opensslcapsname != '' + run: echo "OPENSSL_${{ matrix.platform.opensslcapsname }}=\ + ${{ matrix.platform.opensslcaps }}" >> $GITHUB_ENV + - name: make all tests if: github.event_name == 'push' && matrix.platform.tests == '' run: | |