mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Update build.yml
This commit is contained in:
48
.github/workflows/build.yml
vendored
48
.github/workflows/build.yml
vendored
@@ -13,9 +13,9 @@ defaults:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
OPENSSL_CONFIG_OPTS: no-asm no-fips
|
OPENSSL_CONFIG_OPTS: no-asm no-fips
|
||||||
OPENSSL_INSTALL_PATH: ${{ github.workspace }}/src/ssl
|
OPENSSL_INSTALL_PATH: ${{ github.workspace }}/bin/ssl
|
||||||
OPENSSL_SOURCE_PATH: ${{ github.workspace }}/src/openssl
|
OPENSSL_SOURCE_PATH: ${{ github.workspace }}/src/openssl
|
||||||
PYTHON_INSTALL_PATH: ${{ github.workspace }}/src/python
|
PYTHON_INSTALL_PATH: ${{ github.workspace }}/bin/python
|
||||||
PYTHON_SOURCE_PATH: ${{ github.workspace }}/src/cpython
|
PYTHON_SOURCE_PATH: ${{ github.workspace }}/src/cpython
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -82,8 +82,7 @@ jobs:
|
|||||||
id: cache-python-ssl
|
id: cache-python-ssl
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
src/python
|
bin
|
||||||
src/ssl
|
|
||||||
key: gam-${{ matrix.jid }}-20220228-01
|
key: gam-${{ matrix.jid }}-20220228-01
|
||||||
|
|
||||||
- name: Use pre-compiled Python for testing
|
- name: Use pre-compiled Python for testing
|
||||||
@@ -160,9 +159,9 @@ jobs:
|
|||||||
export date=gdate
|
export date=gdate
|
||||||
export realpath=grealpath
|
export realpath=grealpath
|
||||||
echo "CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1" >> $GITHUB_ENV
|
echo "CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1" >> $GITHUB_ENV
|
||||||
echo "CFLAGS=-I${HOME}/ssl/include -arch arm64 -arch x86_64" >> $GITHUB_ENV
|
echo "CFLAGS=-I${OPENSSL_INSTALL_PATH}/include -arch arm64 -arch x86_64" >> $GITHUB_ENV
|
||||||
echo "MACOSX_DEPLOYMENT_TARGET=10.9" >> $GITHUB_ENV
|
echo "MACOSX_DEPLOYMENT_TARGET=10.9" >> $GITHUB_ENV
|
||||||
echo "LDFLAGS=${HOME}/ssl/lib/libssl.a" >> $GITHUB_ENV
|
echo "LDFLAGS=${OPENSSL_INSTALL_PATH}/lib/libssl.a" >> $GITHUB_ENV
|
||||||
echo "ARCHFLAGS=-arch x86_64 -arch arm64" >> $GITHUB_ENV
|
echo "ARCHFLAGS=-arch x86_64 -arch arm64" >> $GITHUB_ENV
|
||||||
echo 'PIP_ARGS=( "--no-binary" ":all:" )' >> $GITHUB_ENV
|
echo 'PIP_ARGS=( "--no-binary" ":all:" )' >> $GITHUB_ENV
|
||||||
elif [[ "${RUNNER_OS}" == "Linux" ]]; then
|
elif [[ "${RUNNER_OS}" == "Linux" ]]; then
|
||||||
@@ -208,9 +207,9 @@ jobs:
|
|||||||
echo "COMPILED_OPENSSL_VERSION=${COMPILED_OPENSSL_VERSION}" >> $GITHUB_ENV
|
echo "COMPILED_OPENSSL_VERSION=${COMPILED_OPENSSL_VERSION}" >> $GITHUB_ENV
|
||||||
cd "${HOME}"
|
cd "${HOME}"
|
||||||
for openssl_arch in $openssl_archs; do
|
for openssl_arch in $openssl_archs; do
|
||||||
ssldir="${HOME}/openssl-${openssl_arch}"
|
ssldir="${HOME}/src/openssl-${openssl_arch}"
|
||||||
mkdir "${ssldir}"
|
mkdir "${ssldir}"
|
||||||
cp -rf ${HOME}/openssl/* "${ssldir}/"
|
cp -rf ${OPENSSL_SOURCE_PATH}/* "${ssldir}/"
|
||||||
done
|
done
|
||||||
rm -rf openssl
|
rm -rf openssl
|
||||||
|
|
||||||
@@ -222,7 +221,7 @@ jobs:
|
|||||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
for openssl_arch in $openssl_archs; do
|
for openssl_arch in $openssl_archs; do
|
||||||
cd "openssl-${openssl_arch}"
|
cd "src/openssl-${openssl_arch}"
|
||||||
# --libdir=lib is needed so Python can find OpenSSL libraries
|
# --libdir=lib is needed so Python can find OpenSSL libraries
|
||||||
"${PERL}" ./Configure "${openssl_archs}" --libdir=lib --prefix="${OPENSSL_INSTALL_PATH}-${openssl_arch}" $OPENSSL_CONFIG_OPTS
|
"${PERL}" ./Configure "${openssl_archs}" --libdir=lib --prefix="${OPENSSL_INSTALL_PATH}-${openssl_arch}" $OPENSSL_CONFIG_OPTS
|
||||||
done
|
done
|
||||||
@@ -236,7 +235,7 @@ jobs:
|
|||||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
for openssl_arch in $openssl_archs; do
|
for openssl_arch in $openssl_archs; do
|
||||||
cd "openssl-${openssl_arch}"
|
cd "src/openssl-${openssl_arch}"
|
||||||
$MAKE "${MAKEOPT}"
|
$MAKE "${MAKEOPT}"
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -244,27 +243,28 @@ jobs:
|
|||||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
for openssl_arch in $openssl_archs; do
|
for openssl_arch in $openssl_archs; do
|
||||||
cd "openssl-${openssl_arch}"
|
cd "src/openssl-${openssl_arch}"
|
||||||
# install_sw saves us ages processing man pages :-)
|
# install_sw saves us ages processing man pages :-)
|
||||||
$MAKE install_sw
|
$MAKE install_sw
|
||||||
done
|
done
|
||||||
mkdir ssl
|
cd "${HOME}"
|
||||||
|
mkdir "{OPENSSL_INSTALL_PATH}"
|
||||||
if [[ "${RUNNER_OS}" == "macOS" ]]; then
|
if [[ "${RUNNER_OS}" == "macOS" ]]; then
|
||||||
mkdir ssl/lib
|
mkdir "${OPENSSL_INSTALL_PATH}/lib"
|
||||||
mdkir ssl/bin
|
mdkir "${OPENSSL_INSTALL_PATH}/bin"
|
||||||
for archlib in libcrypto.3.dylib libssl.3.dylib libcrypto.a libssl.a; do
|
for archlib in libcrypto.3.dylib libssl.3.dylib libcrypto.a libssl.a; do
|
||||||
lipo -create "ssl-darwin64-x86_64/lib/${archlib}" \
|
lipo -create "bin/ssl-darwin64-x86_64/lib/${archlib}" \
|
||||||
"ssl-darwin64-arm64/lib/${archlib}" \
|
"bin/ssl-darwin64-arm64/lib/${archlib}" \
|
||||||
-output "ssl/lib/${archlib}"
|
-output "bin/ssl/lib/${archlib}"
|
||||||
done
|
done
|
||||||
mv ssl-darwin64-x86_64/include ssl/
|
mv bin/ssl-darwin64-x86_64/include bin/ssl/
|
||||||
lipo -create "ssl-darwin64-x86_64/bin/openssl" \
|
lipo -create "bin/ssl-darwin64-x86_64/bin/openssl" \
|
||||||
"ssl-darwin64-arm64/bin/openssl" \
|
"bin/ssl-darwin64-arm64/bin/openssl" \
|
||||||
-output "nssl/bin/openssl"
|
-output "bin/ssl/bin/openssl"
|
||||||
rm -rf ssl-darwin64-x86_64
|
rm -rf bin/ssl-darwin64-x86_64
|
||||||
rm -rf ssl-darwin64-arm64
|
rm -rf bin/ssl-darwin64-arm64
|
||||||
else
|
else
|
||||||
mv "ssl-${openssl_archs}" ssl
|
mv "bin/ssl-${openssl_archs}" bin/ssl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Run OpenSSL
|
- name: Run OpenSSL
|
||||||
|
|||||||
Reference in New Issue
Block a user