Skip to content

Commit

Permalink
CI: Fix macOS provisioning of python packages
Browse files Browse the repository at this point in the history
Plus a few other assorted adjustmentst
  • Loading branch information
thedataking committed Nov 30, 2023
1 parent 503a75b commit d48f336
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ jobs:
export HOMEBREW_NO_AUTO_UPDATE=1
# prepare environment for the following steps
source $HOME/.cargo/env
# print some useful info to help troubleshoot
brew info llvm
which python3
/usr/bin/env python3 -c "import sys; print(sys.path)"
displayName: 'Provision macOS'
- script: |
Expand Down
15 changes: 3 additions & 12 deletions scripts/provision_mac.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -e

# complain if we're not on macOS
UNAME=$(uname -s)
if [ "$UNAME" != "Darwin" ]; then
Expand All @@ -22,18 +20,11 @@ export HOMEBREW_NO_AUTO_UPDATE=1
# NOTE: Pin LLVM to a known good version since new releases
# tend not to be backwards compatible
# `bash` needed b/c macOS ships with bash 3, which doesn't support arrays properly
hb_packages=(python cmake ninja gpg llvm bash)
for item in "${hb_packages[@]}"; do
brew info "${item}" | grep 'Not installed' > /dev/null && brew install "${item}"
done

type -P "pip3" >/dev/null || {
echo >&2 "pip3 not in path."; exit 1;
}
brew install -q python cmake ninja gpg llvm@17 bash

# Python 3 packages
pip3 install --user --upgrade pip
pip3 install -r "$SCRIPT_DIR/requirements.txt" --user --disable-pip-version-check
python3 -m pip install --user --upgrade pip
python3 -m pip install --user -r "$SCRIPT_DIR/requirements.txt"

# Rust and dependencies
RUST_TOOLCHAIN_FILE="$SCRIPT_DIR/../rust-toolchain.toml"
Expand Down

0 comments on commit d48f336

Please sign in to comment.