Skip to content

Commit c59f916

Browse files
committed
ci: Build macOS toolchains on AArch64 runners
This commit updates the CI workflow to build the AArch64 and x86-64 host macOS toolchains on the AArch64 runners instead of the x86-64 runners. This is in preparation of migrating from the existing Intel-based Mac Mini runners to the new Apple Silicon-based M1 Mac Mini runners. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 6dfe3b0 commit c59f916

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
if [ "${build_host_macos_x86_64}" == "y" ]; then
233233
MATRIX_HOSTS+='{
234234
"name": "macos-x86_64",
235-
"runner": "zephyr_runner-macos-x86_64",
235+
"runner": "zephyr-runner-macos-arm64-2xlarge",
236236
"container": "",
237237
"archive": "tar.xz"
238238
},'
@@ -241,7 +241,7 @@ jobs:
241241
if [ "${build_host_macos_aarch64}" == "y" ]; then
242242
MATRIX_HOSTS+='{
243243
"name": "macos-aarch64",
244-
"runner": "zephyr_runner-macos-x86_64",
244+
"runner": "zephyr-runner-macos-arm64-2xlarge",
245245
"container": "",
246246
"archive": "tar.xz"
247247
},'
@@ -502,18 +502,18 @@ jobs:
502502
fi
503503
504504
# Install dependencies for cross compilation
505-
if [ "${{ matrix.host.name }}" == "macos-aarch64" ]; then
506-
# Clone x86-AArch64 crosskit
505+
if [ "${{ matrix.host.name }}" == "macos-x86_64" ]; then
506+
# Clone AArch64-x86 crosskit
507507
git clone \
508-
https://github.com/stephanosio/crosskit-aarch64-apple-darwin.git \
508+
https://github.com/stephanosio/crosskit-x86_64-apple-darwin.git \
509509
${WORKSPACE}/crosskit
510510
511511
# Make crosskit available in PATH
512512
echo "${WORKSPACE}/crosskit/scripts" >> $GITHUB_PATH
513513
fi
514514
515515
# Make Python 3.8 available in PATH
516-
echo "/usr/local/opt/[email protected]/bin" >> $GITHUB_PATH
516+
echo "${HOMEBREW_PREFIX}/opt/[email protected]/bin" >> $GITHUB_PATH
517517
518518
# Set environment variables
519519
echo "TAR=gtar" >> $GITHUB_ENV
@@ -538,9 +538,9 @@ jobs:
538538
run: |
539539
# Configure macOS build environment
540540
if [ "$RUNNER_OS" == "macOS" ]; then
541-
export PATH="$PATH:/usr/local/opt/binutils/bin"
542-
export CPPFLAGS="-I/usr/local/opt/ncurses/include -I/usr/local/opt/gettext/include"
543-
export LDFLAGS="-L/usr/local/opt/ncurses/lib -L/usr/local/opt/gettext/lib"
541+
export PATH="$PATH:${HOMEBREW_PREFIX}/opt/binutils/bin"
542+
export CPPFLAGS="-I${HOMEBREW_PREFIX}/opt/ncurses/include -I${HOMEBREW_PREFIX}/opt/gettext/include"
543+
export LDFLAGS="-L${HOMEBREW_PREFIX}/opt/ncurses/lib -L${HOMEBREW_PREFIX}/opt/gettext/lib"
544544
fi
545545
546546
# Create build directory
@@ -639,11 +639,11 @@ jobs:
639639
EOF
640640
641641
# Set Canadian cross compilation configurations
642-
if [ "${{ matrix.host.name }}" == "macos-aarch64" ]; then
643-
# Building for macos-aarch64 on macos-x86_64
642+
if [ "${{ matrix.host.name }}" == "macos-x86_64" ]; then
643+
# Building for macos-x86_64 on macos-aarch64
644644
cat <<EOF >> .config
645645
CT_CANADIAN=y
646-
CT_HOST="aarch64-apple-darwin"
646+
CT_HOST="x86_64-apple-darwin"
647647
EOF
648648
elif [ "${{ matrix.host.name }}" == "windows-x86_64" ]; then
649649
# Building for windows-x86_64 on linux-x86_64
@@ -659,13 +659,13 @@ jobs:
659659
CT_GDB_CROSS_PYTHON_VARIANT=y
660660
EOF
661661
662-
if [ "${{ matrix.host.name }}" == "macos-aarch64" ]; then
663-
# Clone crosskit-aarch64-darwin-libpython cross compilation kit
662+
if [ "${{ matrix.host.name }}" == "macos-x86_64" ]; then
663+
# Clone crosskit-x86_64-darwin-libpython cross compilation kit
664664
git clone \
665-
https://github.com/stephanosio/crosskit-aarch64-darwin-libpython.git \
666-
${WORKSPACE}/crosskit-aarch64-darwin-libpython
665+
https://github.com/stephanosio/crosskit-x86_64-darwin-libpython.git \
666+
${WORKSPACE}/crosskit-x86_64-darwin-libpython
667667
# Use Python 3.8.12
668-
export LIBPYTHON_KIT_ROOT=${WORKSPACE}/crosskit-aarch64-darwin-libpython/python-3.8.12
668+
export LIBPYTHON_KIT_ROOT=${WORKSPACE}/crosskit-x86_64-darwin-libpython/python-3.8.12
669669
# Set Python configuration resolver for GDB
670670
cat <<EOF >> .config
671671
CT_GDB_CROSS_PYTHON_BINARY="${LIBPYTHON_KIT_ROOT}/bin/python"
@@ -708,9 +708,9 @@ jobs:
708708
popd
709709
710710
# Resolve output directory path
711-
if [ "${{ matrix.host.name }}" == "macos-aarch64" ]; then
711+
if [ "${{ matrix.host.name }}" == "macos-x86_64" ]; then
712712
OUTPUT_BASE="${WORKSPACE}/output"
713-
OUTPUT_DIR="HOST-aarch64-apple-darwin"
713+
OUTPUT_DIR="HOST-x86_64-apple-darwin"
714714
elif [ "${{ matrix.host.name }}" == "windows-x86_64" ]; then
715715
OUTPUT_BASE="${WORKSPACE}/output"
716716
OUTPUT_DIR="HOST-x86_64-w64-mingw32"

0 commit comments

Comments
 (0)