Skip to content

Commit

Permalink
Workflow: macos
Browse files Browse the repository at this point in the history
compared to master and only taken basic changes

Workflow: macos
  • Loading branch information
Lokesh-Carbonix committed Oct 3, 2023
1 parent 4d53982 commit 60d29e3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -17,7 +17,7 @@ jobs:
]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install Prerequisites
Expand All @@ -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}}
Expand Down
19 changes: 15 additions & 4 deletions Tools/environment_install/install-prereqs-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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


Expand All @@ -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"
Expand Down

0 comments on commit 60d29e3

Please sign in to comment.