actions: self hosted arm64 runner, take 1

This will probably blow up, but the flames should look cool :-)
This commit is contained in:
Jay Lee
2023-07-28 08:39:44 -04:00
committed by GitHub
parent 5d03661357
commit c4cca8cf42

View File

@@ -54,8 +54,18 @@ jobs:
- os: macos-12
jid: 5
goal: build
arch: x86_64
openssl_archs: darwin64-x86_64
- os: [self-hosted, macOS, ARM64]
jid: 7
gaol: build
arch: aarch64
openssl_archs: darwin64-arm64
- os: [self-hosted, macOS, ARM64]
jid: 12
gaol: build
arch: universal2
openssl_archs: darwin64-x86_64 darwin64-arm64
openssl_archs: darwin64-arm64 darwin64-x86_64
- os: windows-2022
jid: 6
goal: build
@@ -104,7 +114,7 @@ jobs:
path: |
bin.tar.xz
src/cpython
key: gam-${{ matrix.jid }}-20230608
key: gam-${{ matrix.jid }}-20230728
- name: Untar Cache archive
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
@@ -167,14 +177,15 @@ jobs:
sudo apt-get -qq --yes install swig libpcsclite-dev libxslt1-dev
- name: MacOS install tools
if: runner.os == 'macOS'
if: runner.os == 'macOS' && runner.arch == 'x86_64'
run: |
# Install latest Rust
curl $curl_retry -fsS -o rust.sh https://sh.rustup.rs
bash ./rust.sh -y
source $HOME/.cargo/env
# needed for Rust to compile cryptography Python package for universal2
rustup target add aarch64-apple-darwin
# not needed since MacOS ARM and universal will be on self-hosted
#rustup target add aarch64-apple-darwin
- name: Windows Configure VCode
uses: ilammy/msvc-dev-cmd@v1
@@ -248,7 +259,7 @@ jobs:
git checkout "${LATEST_STABLE_TAG}"
export COMPILED_OPENSSL_VERSION=${LATEST_STABLE_TAG:8} # Trim the openssl- prefix
echo "COMPILED_OPENSSL_VERSION=${COMPILED_OPENSSL_VERSION}" >> $GITHUB_ENV
if [[ "${RUNNER_OS}" == "macOS" ]]; then
if [[ "${RUNNER_OS}" == "macOS" ] && [ "$arch" == "universal2"]]; then
for openssl_arch in $openssl_archs; do
ssldir="${OPENSSL_SOURCE_PATH}-${openssl_arch}"
mkdir -v "${ssldir}"
@@ -288,7 +299,7 @@ jobs:
- name: Install OpenSSL
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
run: |
if [[ "${RUNNER_OS}" == "macOS" ]]; then
if [[ "${RUNNER_OS}" == "macOS" ] && [ "$arch" == "universal2"]]; then
for openssl_arch in $openssl_archs; do
cd "${GITHUB_WORKSPACE}/src/openssl-${openssl_arch}"
# install_sw saves us ages processing man pages :-)
@@ -340,7 +351,7 @@ jobs:
if: matrix.goal == 'build' && runner.os != 'Windows' && steps.cache-python-ssl.outputs.cache-hit != 'true'
run: |
cd "${PYTHON_SOURCE_PATH}"
if [[ "${RUNNER_OS}" == "macOS" ]]; then
if [[ "${RUNNER_OS}" == "macOS" ] && [ "$arch" == "universal2"]]; then
extra_args=( "--enable-universalsdk" "--with-universal-archs=universal2" )
else
extra_args=( )
@@ -430,7 +441,7 @@ jobs:
run: |
echo "before anything..."
"${PYTHON}" -m pip list
if [[ "${RUNNER_OS}" == "macOS" ]]; then
if [[ "${RUNNER_OS}" == "macOS" ] && [ "$arch" == "universal2"]]; then
# cffi is a dep of cryptography and doesn't ship
# a universal2 wheel so we must build one ourself :-/
export CFLAGS="-arch x86_64 -arch arm64"
@@ -522,6 +533,7 @@ jobs:
cp -v cacerts.pem $gampath
cp -v LICENSE $gampath
cp -v GamCommands.txt $gampath
cp -v GamUpdate.txt $gampath
if [[ "${RUNNER_OS}" == "Windows" ]]; then
cp -v gam-setup.bat $gampath
fi
@@ -561,7 +573,7 @@ jobs:
if: runner.os != 'Windows' && matrix.goal == 'build'
run: |
if [[ "${RUNNER_OS}" == "macOS" ]]; then
GAM_ARCHIVE="gam-${GAMVERSION}-macos-universal2.tar.xz"
GAM_ARCHIVE="gam-${GAMVERSION}-macos-${arch}.tar.xz"
elif [[ "${RUNNER_OS}" == "Linux" ]]; then
if [[ "${staticx}" == "yes" ]]; then
libver="legacy"