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:02:25 +0000 |
commit | 27527f230cd73866af118287b2ab302255063392 (patch) | |
tree | 44047f6ec15a432e4356ce64e4f4d40ce2b5af27 /.github/workflows | |
parent | 538358abc9fb007a29f6f41dacb1ea411e9c4a5f (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)
(cherry picked from commit af0a4c46846323fc33f713b5ccd758a526c19ed0)
Diffstat (limited to '.github/workflows')
-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: | |