Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'facebook/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Mar 2, 2018
2 parents e1d48c0 + 79e6c9c commit 0c687e0
Show file tree
Hide file tree
Showing 1,448 changed files with 42,862 additions and 19,022 deletions.
2 changes: 1 addition & 1 deletion .buckrelease
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2017.11.16.01
v2018.02.16.01
9 changes: 9 additions & 0 deletions .idea/libraries/objenesis_1_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/libraries/test_lib.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

192 changes: 136 additions & 56 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,157 @@
language: java
jdk:
- oraclejdk8
env:
- CI_ACTION=build
- CI_ACTION=unit
- CI_ACTION=integration
- CI_ACTION=heavy_integration
- CI_ACTION=ant
language: android

dist: trusty
matrix:
include:
- os: linux
jdk: oraclejdk8
dist: trusty
addons:
apt:
packages:
- ant
env: CI_ACTION=build
# ANDROID_SDK is required for build.
android:
components:
- tools
- platform-tools
- build-tools-23.0.2
- android-23
- os: linux
jdk: openjdk8
dist: trusty
addons:
apt:
packages:
- ant
env: CI_ACTION=build
# ANDROID_SDK is required for build.
android:
components:
- tools
- platform-tools
- build-tools-23.0.2
- android-23
- os: linux
jdk: openjdk8
dist: trusty
addons:
apt:
packages:
- ant
- groovy
env: CI_ACTION=unit GROOVY_HOME=/usr/share/groovy/
# ANDROID_SDK is required for build.
android:
components:
- tools
- platform-tools
- build-tools-23.0.2
- android-23
- os: linux
jdk: openjdk8
dist: trusty
addons:
apt:
packages:
- ant
env: CI_ACTION=ant
# ANDROID_HOME required for javadoc verification.
android:
components:
- tools
- platform-tools
- build-tools-23.0.2
- android-23
- os: linux
jdk: openjdk8
dist: trusty
addons:
apt:
packages:
- ant
- groovy
# We rely on -gno-record-gcc-switches which was added in 4.7.
- gcc
- g++
# Haskell tests require GHC (and at least version 7.6).
- ghc
# base ghc package does not include dynamic libraries
# https://stackoverflow.com/a/11711501/1548477
- ghc-dynamic
env: CI_ACTION=integration GROOVY_HOME=/usr/share/groovy/
# ANDROID_SDK is required for build.
android:
components:
- tools
- platform-tools
- build-tools-23.0.2
- android-23
- os: linux
jdk: openjdk8
android:
components:
- tools
- platform-tools
- build-tools-23.0.2
- android-23
- addon-google_apis-google-23
- android-21
- addon-google_apis-google-21
- extra-android-support
dist: trusty
addons:
apt:
packages:
- ant
# Travis is on 64bit and there will be a cryptic aapt error w/o these libs.
# For native code tests, we need some additional libraries if we are in a 64-bit environment.
- libgd2-xpm-dev
- libc6:i386
- libstdc++6:i386
- zlib1g:i386
# We rely on -gno-record-gcc-switches which was added in 4.7.
- gcc
- g++
# Haskell tests require GHC (and at least version 7.6).
- ghc
# base ghc package does not include dynamic libraries
# https://stackoverflow.com/a/11711501/1548477
- ghc-dynamic
# https://docs.travis-ci.com/user/caching#Things-not-to-cache
# https://docs.travis-ci.com/user/caching#Explicitly-disabling-caching
cache:
directories:
- $HOME/ndk_cache
env: CI_ACTION=heavy_integration

# Enable container-based architecture.
sudo: false

addons:
apt:
sources:
# For newer gcc than precise supports out of the box.
- ubuntu-toolchain-r-test
# For newer ghc than precise supports out of the box.
- hvr-ghc
packages:
# Travis is on 64bit and there will be a cryptic aapt error w/o these libs.
# For native code tests, we need some additional libraries if we are in a 64-bit environment.
- libgd2-xpm-dev
- libc6:i386
- libstdc++6:i386
- zlib1g:i386
- groovy
# We rely on -gno-record-gcc-switches which was added in 4.7.
- gcc-4.7
- g++-4.7
# Getting compile errors on javac 1.8.0_31-b13
- oracle-java8-installer
# Haskell tests require GHC (and at least version 7.6).
- ghc-8.0.2

before_install:
- rm -rf ${HOME}/travis-cxx
- mkdir ${HOME}/travis-cxx
- ln -s /usr/bin/gcc-4.7 ${HOME}/travis-cxx/gcc
- ln -s /usr/bin/g++-4.7 ${HOME}/travis-cxx/g++
- export PATH=${HOME}/travis-cxx:$PATH
# Install ant on MacOS
- if \[ ${TRAVIS_OS_NAME} == "osx" \]; then brew install ant; fi
# Limit Ant's and Buck's memory usage to avoid the OOM killer.
- export ANT_OPTS='-Xmx500m'
- echo '-Xmx500m' > .buckjavaargs.local
# Set up the Android environment.
- export NDK_HOME=${HOME}/android-ndk-linux
- ./scripts/travisci_install_android_ndk.sh
- export ANDROID_HOME=${HOME}/android-sdk-linux
- ./scripts/travisci_install_android_sdk.sh
# Install go 1.5
- eval "$(gimme 1.5)"
# Set up the Android environment. Only for Linux.
- if \[ ${TRAVIS_OS_NAME} == "linux" \] && \[ "${CI_ACTION}" == "heavy_integration" \]; then
export NDK_HOME="${HOME}/android-ndk-linux" ;
./scripts/travisci_install_android_ndk.sh ;
fi
# Install go 1.8, required for cgo -srcdir flag to work
- eval "$(gimme 1.8)"
- echo -e "[go]\n root = ${GOROOT}" >> .buckconfig.local
# Set up the Groovy environment
- export GROOVY_HOME=/usr/share/groovy/
# Haskell setup:
- export PATH=/opt/ghc/8.0.2/bin:$PATH

# Buck dependencies are checked in, so no need to download dependencies
install: true

# https://docs.travis-ci.com/user/caching#Things-not-to-cache
# https://docs.travis-ci.com/user/caching#Explicitly-disabling-caching
cache:
directories:
- $HOME/ndk_cache
- $HOME/sdk_cache

notifications:
slack:
rooms:
secure: SYKQV9DT55kHf5Mpe6g5a3NmGXJb5E7kWiLulRp+EmKDIhf3lVmxGbx4Yr/TKZixbNILsPzhhiB56V0H+0mAgMpygVXaq4M9eSHKLljJEmEdeLKmQaRuOUikMOkpLsHw/epvmqrsvlb3yVpsJZZhhHmi9B0oQc0AnjpL/qLBaZE=
# Send Travis CI notifications to internal sytems like Phabricator.
webhooks: https://code.facebook.com/travis/webhook/

script:
- ./scripts/travisci_run.sh
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
".buckd",
"build",
"test/com/facebook/buck/testutil/integration/testlibs/buck-out",
"test/com/facebook/buck/testutil/integration/testlibs/.buckd",
"test/com/facebook/buck/testutil/integration/testlibs/.buckd"
]
}
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,29 @@ check out the documentation at <http://buckbuild.com/>.
Installation
------------

To build Buck, run the following:
First, clone the Buck repository:

git clone https://github.com/facebook/buck.git
cd buck

Since Buck is used to build Buck, the initial build process involves 2 phases:

##### 1. Bootstrap Buck with ant

git clone https://github.com/facebook/buck.git
cd buck
ant
./bin/buck --help

##### 2. Use bootstrapped version of Buck to build Buck:

./bin/buck build --show-output buck
# output will contain something like
# //programs:buck buck-out/gen/programs/buck.pex
buck-out/gen/programs/buck.pex --help

##### Prebuilt buck binaries

Pre-built binaries of buck for any buck `sha` can be downloaded from `https://jitpack.io/com/github/facebook/buck/<sha>/buck-<sha>.pex`. The very first time a version of buck is requested, it is built via [jitpack](https://jitpack.io/). As a result, it could take a few minutes for this initial binary to become available. Every subsequent request will just serve the built artifact directly. This functionality is available for any fork of buck as well, so you can fetch `https://jitpack.io/com/github/<github-user-or-org>/buck/<sha>/buck-<sha>.pex`

License
-------
Expand Down
7 changes: 3 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ environment:
install:
- cmd: choco install ant -y -f -i
- cmd: refreshenv
- cmd: echo -Djna.nosys=true > .buckjavaargs.local
- cmd: set GOROOT=
- cmd: set PATH=%PATH:C:\go\bin;=%
- cmd: set PATH=%PATH:C:\go\bin=%
Expand All @@ -23,11 +22,11 @@ install:
build: off

build_script:
- "ant"
- "bin\\buck build buck"
- ant
- bin\buck build buck

test_script:
- "bin\\buck test --all --test-selectors=':windows_failures.txt' --test-selectors=':windows_cxx_support.txt'"
- bin\buck test --all --test-selectors=:windows_failures.txt --test-selectors=:windows_cxx_support.txt

artifacts:
- path: buck-out\gen\programs\buck.pex
2 changes: 1 addition & 1 deletion bin/buck
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ function abs_script_dir_path {

BUCK_DIR=$(abs_script_dir_path "$0")

PYTHON=$(command -v python2 python | head -1)
PYTHON=$(command -v python2.7 python2 python | head -1)
PYTHONPATH="$BUCK_DIR"/../third-party/nailgun exec $PYTHON "$BUCK_DIR"/../programs/buck.py "$@"
1 change: 1 addition & 0 deletions buck.iml
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@
<orderEntry type="library" name="jopt-simple" level="project" />
<orderEntry type="library" name="json-simple" level="project" />
<orderEntry type="library" name="d8" level="project" />
<orderEntry type="library" name="objenesis-1.2" level="project" />
</component>
</module>
Loading

0 comments on commit 0c687e0

Please sign in to comment.