From c5cfe5f2bdb1ed131bff9df5e35d7ce6387fa142 Mon Sep 17 00:00:00 2001 From: fruffy Date: Mon, 5 Feb 2024 08:30:47 -0500 Subject: [PATCH] Use M1 Github runner. --- .github/workflows/ci-test.yml | 2 +- tools/install_mac_deps.sh | 31 +++++++++++++++++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 8dc39da6021..6c2e6c61f4c 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -120,7 +120,7 @@ jobs: test-mac-os: strategy: fail-fast: false - runs-on: macos-12 + runs-on: macos-13-xlarge env: CTEST_PARALLEL_LEVEL: 4 steps: diff --git a/tools/install_mac_deps.sh b/tools/install_mac_deps.sh index 3f14ae49ddd..9d70456457a 100755 --- a/tools/install_mac_deps.sh +++ b/tools/install_mac_deps.sh @@ -5,30 +5,33 @@ set -e # Exit on error. set -x # Make command execution verbose -# Install some custom requirements on OS X using brew -BREW=/usr/local/bin/brew + +# Set up Homebrew differently for arm64. +if [[ $(uname -m) == 'arm64' ]]; then + BREW=/opt/homebrew/bin/brew +else + BREW=/usr/local/bin/brew +fi + if [[ ! -x $BREW ]]; then /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi +HOMEBREW_PREFIX=$($BREW --prefix) +# Install some custom requirements on OS X using brew BOOST_LIB="boost@1.76" - $BREW install autoconf automake bdw-gc ccache cmake \ - libtool openssl pkg-config python coreutils + libtool openssl pkg-config coreutils bison grep \ + ${BOOST_LIB} # We need to link boost. -$BREW install ${BOOST_LIB} $BREW link ${BOOST_LIB} # Prefer Homebrew's bison and grep over the macOS-provided version -$BREW install bison -echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> ~/.bash_profile -$BREW install grep -echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bash_profile +echo 'export PATH="$($BREW --prefix bison)/bin:$PATH"' >> ~/.bash_profile +echo 'export PATH="$HOMEBREW_PREFIX/opt/grep/libexec/gnubin:$PATH"' >> ~/.bash_profile + source ~/.bash_profile -# install pip and required pip packages -# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py -# python get-pip.py --user -# use scapy 2.4.5, which is the version on which ptf depends -pip3 install --user scapy==2.4.5 ply==3.8 +# Install required pip packages +pip3 install --user -r requirements.txt