Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build against LLVM 9 on macOS/Azure #296

Merged
merged 8 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 12 additions & 22 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,44 +111,34 @@ jobs:
# whereas the brew version does not, this causes curl-sys to
# build its own curl which then fails to link on Azure Devops.
brew remove curl
# prepare environment for the following steps
source $HOME/.cargo/env
brew info llvm@9
displayName: 'Provision macOS'

- script: |
source $HOME/.cargo/env
# Temporary fix to use LLVM 9 due to problems with LLVM 10.0.1
export LLVM_CONFIG_PATH=$(brew --prefix llvm@9)/bin/llvm-config
cargo build --release
displayName: 'Fast build against host clang/LLVM'

- script: |
source $HOME/.cargo/env
python3 ./scripts/test_translator.py ./tests
- script: python3 ./scripts/test_translator.py ./tests
displayName: 'Test translator (fast build)'

- script: |
source $HOME/.cargo/env
cargo clean
- script: cargo clean
displayName: 'Cargo clean'

- script: |
source $HOME/.cargo/env
python3 ./scripts/build_translator.py --with-llvm-version=7.0.1
- script: python3 ./scripts/build_translator.py --with-llvm-version=7.0.1
displayName: 'Developer build against local LLVM 7'

- script: |
source $HOME/.cargo/env
python3 ./scripts/test_translator.py ./tests
- script: python3 ./scripts/test_translator.py ./tests
displayName: 'Test translator against developer build (LLVM 7)'

- script: |
source $HOME/.cargo/env
cargo clean && rm -rf build
- script: cargo clean && rm -rf build
displayName: 'Cargo clean && rm -rf build'

- script: |
source $HOME/.cargo/env
python3 ./scripts/build_translator.py --with-llvm-version=8.0.0
- script: python3 ./scripts/build_translator.py --with-llvm-version=8.0.0
displayName: 'Developer build against local LLVM 8'

- script: |
source $HOME/.cargo/env
python3 ./scripts/test_translator.py ./tests
- script: python3 ./scripts/test_translator.py ./tests
displayName: 'Test translator against developer build (LLVM 8)'
8 changes: 5 additions & 3 deletions scripts/provision_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ done
SCRIPT_DIR="$(dirname "$0")"
export HOMEBREW_NO_AUTO_UPDATE=1

hb_packages=(python cmake ninja gpg ccache llvm)
# NOTE(perl): Due to problems with LLVM 10.0.1 we request LLVM 9 for now
# https://discourse.brew.sh/t/llvm-config-10-0-1-advertise-libxml2-tbd-as-system-libs/8593
hb_packages=(python cmake ninja gpg ccache llvm@9)
for item in "${hb_packages[@]}"; do
brew info "${item}" | grep --quiet 'Not installed' && brew install "${item}"
brew info "${item}" | grep 'Not installed' > /dev/null && brew install "${item}"
done

type -P "pip3" >/dev/null || {
Expand All @@ -30,7 +32,7 @@ type -P "pip3" >/dev/null || {

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

RUST_TOOLCHAIN_FILE="$SCRIPT_DIR/../rust-toolchain"
export RUST_VER=$(cat $RUST_TOOLCHAIN_FILE | tr -d '\n')
Expand Down
2 changes: 1 addition & 1 deletion scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pip
plumbum >= 1.6.3
psutil
pygments
typing
typing;python_version<"3.5"
scan-build
pyyaml