Skip to content

Commit c854c03

Browse files
cccclaifacebook-github-bot
authored andcommitted
switch to brew install flatc (#447)
Summary: See context in D49487908, the `flatc` from `brew install flatbuffers` seems good. Differential Revision: D49530021
1 parent b541a48 commit c854c03

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

.ci/docker/common/install_buck.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ install_ubuntu() {
2222
# Cleanup package manager
2323
apt-get autoclean && apt-get clean
2424
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
25+
26+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
27+
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /root/.profile
28+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
29+
mv /home/linuxbrew/.linuxbrew/bin/brew /usr/bin/
2530
}
2631

2732
# Install base packages depending on the base OS

.ci/docker/conda-env-ci.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# TODO: We might need to update this to install flatbuffers from the pinned commit
2-
# in fbcode/executorch/third-party/flatbuffers.submodule.txt
3-
flatbuffers=2.0.0
41
cmake=3.22.1

.ci/scripts/setup-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ fi
2020

2121
# As Linux job is running inside a Docker container, all of its dependencies
2222
# have already been installed
23+
install_flatc
2324
install_executorch
2425
build_executorch_runner "${BUILD_TOOL}"

.ci/scripts/setup-macos.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ install_buck() {
2727
brew install wget
2828
fi
2929

30+
if ! command -v flatc &> /dev/null; then
31+
brew install flatbuffers
32+
fi
33+
3034
BUCK2_NOT_AVAILABLE=false
3135
if ! command -v buck2 &> /dev/null; then
3236
BUCK2_NOT_AVAILABLE=true

.ci/scripts/utils.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ retry () {
1515
"$@" || (sleep 30 && reset_buck && "$@") || (sleep 60 && reset_buck && "$@")
1616
}
1717

18+
install_flatc() {
19+
brew install flatbuffers
20+
}
21+
1822
install_executorch() {
1923
which pip
2024
# Install executorch, this assumes that Executorch is checked out in the

docs/website/docs/tutorials/00_setting_up_executorch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ conda create -yn executorch python=3.10.0
1717
conda activate executorch
1818

1919
conda install cmake
20-
conda install -c conda-forge flatbuffers
20+
brew install flatbuffers
2121
```
2222

2323
### Step 2: Clone the `executorch` repo

0 commit comments

Comments
 (0)