Skip to content

Commit

Permalink
Use 'brew bundle' to install macOS dependencies in CI (#9609)
Browse files Browse the repository at this point in the history
  • Loading branch information
waj authored Jul 15, 2020
1 parent 4026318 commit 67b24ec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- brew-cache-v1
- checkout
- run: bin/ci prepare_system
- run: echo 'export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"' >> $BASH_ENV
- run: echo 'export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig"' >> $BASH_ENV
- run: echo 'export CURRENT_TAG="$CIRCLE_TAG"' >> $BASH_ENV
- run: bin/ci prepare_build
- run: bin/ci build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
env:
TRAVIS_OS_NAME: osx
LLVM_CONFIG: /usr/local/opt/llvm/bin/llvm-config
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
PKG_CONFIG_PATH: /usr/local/opt/openssl@1.1/lib/pkgconfig
SPEC_SPLIT_DOTS: 160

jobs:
Expand Down
6 changes: 6 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
brew "gmp"
brew "libevent"
brew "pcre"
brew "pkg-config"
brew "openssl@1.1"
brew "llvm@10", link: true, conflicts_with: ["python@2"]
7 changes: 1 addition & 6 deletions bin/ci
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ on_github() {
prepare_system() {
on_linux 'echo '"'"'{"ipv6":true, "fixed-cidr-v6":"2001:db8:1::/64"}'"'"' | sudo tee /etc/docker/daemon.json'
on_linux sudo service docker restart

on_osx brew update
}

build() {
Expand Down Expand Up @@ -119,11 +117,8 @@ prepare_build() {

on_osx curl -L https://github.com/crystal-lang/crystal/releases/download/0.35.1/crystal-0.35.1-1-darwin-x86_64.tar.gz -o ~/crystal.tar.gz
on_osx 'pushd ~;gunzip -c ~/crystal.tar.gz | tar xopf -;mv crystal-0.35.1-1 crystal;popd'
on_osx brew bundle --no-lock

on_osx 'brew unlink python@2 || true'
on_osx brew install z3 llvm@10 gmp libevent pcre pkg-config
on_osx brew reinstall openssl
on_osx brew link --force llvm@10
# Note: brew link --force might show:
# Warning: Refusing to link macOS-provided software: llvm
#
Expand Down

0 comments on commit 67b24ec

Please sign in to comment.