diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 5c5c891fde..5e938f38b3 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -7,7 +7,7 @@ concurrency: jobs: build: - runs-on: 'macos-latest' + runs-on: macos-latest strategy: fail-fast: false # don't cancel if a job from the matrix fails matrix: @@ -17,7 +17,7 @@ jobs: ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: 'recursive' - name: Install Prerequisites @@ -31,11 +31,12 @@ jobs: # Put ccache into github cache for faster build - name: Prepare ccache timestamp id: ccache_cache_timestamp + shell: bash run: | NOW=$(date -u +"%F-%T") - echo "::set-output name=timestamp::${NOW}" + echo "timestamp=${NOW}" >> $GITHUB_OUTPUT - name: ccache cache files - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.ccache key: ${{github.workflow}}-ccache-${{matrix.config}}-${{steps.ccache_cache_timestamp.outputs.timestamp}} diff --git a/Tools/environment_install/install-prereqs-mac.sh b/Tools/environment_install/install-prereqs-mac.sh index 7039f8ecd2..0827a01153 100755 --- a/Tools/environment_install/install-prereqs-mac.sh +++ b/Tools/environment_install/install-prereqs-mac.sh @@ -96,6 +96,13 @@ function maybe_prompt_user() { fi } +# delete links installed by github in /usr/local/bin; installing or +# upgrading python via brew fails if these links are in place. brew +# auto-updates things when you install other packages which depend on +# more recent versions. +# see https://github.com/orgs/Homebrew/discussions/3895 +find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete + brew update brew install gawk curl coreutils wget @@ -111,7 +118,7 @@ if maybe_prompt_user "Install python using pyenv [N/y]?" ; then pushd $HOME/.pyenv git fetch --tags - git checkout v2.0.4 + git checkout v2.3.12 popd exportline="export PYENV_ROOT=\$HOME/.pyenv" echo $exportline >> ~/$SHELL_LOGIN @@ -124,8 +131,12 @@ if maybe_prompt_user "Install python using pyenv [N/y]?" ; then source ~/$SHELL_LOGIN } echo "pyenv installed" - env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.9.4 - pyenv global 3.9.4 + { + $(pyenv global 3.10.4) + } || { + env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.10.4 + pyenv global 3.10.4 +} fi @@ -148,7 +159,7 @@ if [[ $DO_AP_STM_ENV -eq 1 ]]; then install_arm_none_eabi_toolchain fi -PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect geocoder flake8 empy" +PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect geocoder flake8 empy dronecan" # add some Python packages required for commonly-used MAVProxy modules and hex file generation: if [[ $SKIP_AP_EXT_ENV -ne 1 ]]; then PYTHON_PKGS="$PYTHON_PKGS intelhex gnureadline"