Add crossbuild variable

This commit is contained in:
Andrea Cavalli 2023-04-27 19:17:42 +02:00
parent 68edb3393c
commit 0ac5986b18
3 changed files with 18 additions and 10 deletions

View File

@ -13,16 +13,16 @@ jobs:
strategy:
matrix:
include:
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", arch: "linux/386", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", arch: "linux/amd64", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", arch: "linux/armhf", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", arch: "linux/arm64", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", arch: "linux/s390x", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", arch: "linux/ppc64le", implementation: "tdlight"}
- {os: ubuntu-22.04, usedocker: "false", ssl: "ssl3", useqemu: "false", arch: "linux/amd64", implementation: "tdlight"}
- {os: ubuntu-22.04, usedocker: "false", ssl: "ssl3", useqemu: "false", arch: "linux/arm64", implementation: "tdlight"}
- {os: windows-2019, usedocker: "false", ssl: "ssl1", useqemu: "false", arch: "amd64", implementation: "tdlight", vcpkgCommitId: "6ca56aeb457f033d344a7106cb3f9f1abf8f4e98", triplet: "x64-windows-static"}
- {os: macos-12, usedocker: "false", ssl: "ssl1", useqemu: "false", arch: "amd64", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", crossbuild: "false", arch: "linux/386", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", crossbuild: "false", arch: "linux/amd64", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", crossbuild: "false", arch: "linux/armhf", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", crossbuild: "false", arch: "linux/arm64", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", crossbuild: "false", arch: "linux/s390x", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "true", ssl: "ssl1", useqemu: "false", crossbuild: "false", arch: "linux/ppc64le", implementation: "tdlight"}
- {os: ubuntu-22.04, usedocker: "false", ssl: "ssl3", useqemu: "false", crossbuild: "false", arch: "linux/amd64", implementation: "tdlight"}
- {os: ubuntu-22.04, usedocker: "false", ssl: "ssl3", useqemu: "false", crossbuild: "false", arch: "linux/arm64", implementation: "tdlight"}
- {os: windows-2019, usedocker: "false", ssl: "ssl1", useqemu: "false", crossbuild: "false", arch: "amd64", implementation: "tdlight", vcpkgCommitId: "6ca56aeb457f033d344a7106cb3f9f1abf8f4e98", triplet: "x64-windows-static"}
- {os: macos-12, usedocker: "false", ssl: "ssl1", useqemu: "false", crossbuild: "false", arch: "amd64", implementation: "tdlight"}
steps:
- name: Checkout current repo
uses: actions/checkout@v2
@ -125,6 +125,7 @@ jobs:
GH_MATRIX_OS=${{ matrix.os }}
GH_MATRIX_ARCH=${{ matrix.arch }}
GH_MATRIX_SSL=${{ matrix.ssl }}
GH_CROSSBUILD=${{ matrix.crossbuild }}
IMPLEMENTATION_NAME=${{ matrix.implementation }}
- name: Extract jni from docker image
@ -159,6 +160,7 @@ jobs:
export GH_MATRIX_OS=${{ matrix.os }}
export GH_MATRIX_ARCH=${{ matrix.arch }}
export GH_MATRIX_SSL=${{ matrix.ssl }}
export GH_CROSSBUILD=${{ matrix.crossbuild }}
export IMPLEMENTATION_NAME=${{ matrix.implementation }}
source ./scripts/continuous-integration/github-workflows/setup-variables.sh
@ -185,6 +187,7 @@ jobs:
echo "MAVEN_OPTS=$MAVEN_OPTS" >> $GITHUB_ENV
echo "GH_CPU_ARCH=$GH_CPU_ARCH" >> $GITHUB_ENV
echo "SSL_TYPE=$GH_MATRIX_SSL" >> $GITHUB_ENV
echo "CROSSBUILD=$GH_CROSSBUILD" >> $GITHUB_ENV
echo "CPU_ARCH_JAVA=$CPU_ARCH_JAVA" >> $GITHUB_ENV
echo "CPU_ARCHITECTURE_NAME=$CPU_ARCHITECTURE_NAME" >> $GITHUB_ENV
echo "CPU_CORES_NUM=$CPU_CORES_NUM" >> $GITHUB_ENV

View File

@ -1,4 +1,5 @@
ARG GH_MATRIX_SSL
ARG GH_CROSSBUILD
FROM debian:buster as img_ssl1
ONBUILD ENV SSL_LIB_NAME=libssl1.1
@ -12,6 +13,7 @@ ARG GH_MATRIX_ARCH
ARG GH_MATRIX_SSL
ARG IMPLEMENTATION_NAME
ARG CPU_CORES_NUM
ARG GH_CROSSBUILD
ENV DEBIAN_FRONTEND noninteractive

View File

@ -1,4 +1,7 @@
#!/bin/bash -e
if [[ -n ${GH_CROSSBUILD} ]]; then
export CROSS_BUILD_DEPS_DIR=""
fi
source ./scripts/continuous-integration/github-workflows/setup-variables.sh
export JAVA_HOME