Skip to content

Commit

Permalink
Update build scripts to fetch perfetto
Browse files Browse the repository at this point in the history
  • Loading branch information
bengaineyarm committed Dec 1, 2022
1 parent b6ad117 commit 58ae10b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ else
exit 1
fi

# Bootstrap vcpkg
checkout_vcpkg "${gator_dir}" "${use_system_binaries}"
# and perfetto
checkout_perfetto "${gator_dir}"

# check cmake exe
cmake_exe=$(validate_and_return_cmake_exe "${cmake_exe}")
Expand Down
18 changes: 18 additions & 0 deletions build-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@ checkout_vcpkg() {
fi
}

# Fetch perfetto
checkout_perfetto() {
local perfetto_commit="7e8d6801dbf73936a916dbcd8ed06a758c8d989e" # v25.0
local root="${1}"
# is gator git repo from github?
if [ -d "${root}/.git" ]; then
echo "Fetching perfetto git submodule"
git submodule update --init
# checkout manually?
elif [ ! -d "${root}/ext/perfetto/.git" ]; then
echo "Cloning perfetto git repo into '${root}/ext/perfetto/'"
git clone https://github.com/google/perfetto.git "${root}/ext/perfetto/"
echo "Switching to correct commit"
git -C "${root}/ext/perfetto/" clean -ffxd
git -C "${root}/ext/perfetto/" reset --hard "${perfetto_commit}"
fi
}

# source root
gator_dir=`dirname "$0"`
gator_dir=`realpath "${gator_dir}"`
Expand Down
2 changes: 2 additions & 0 deletions build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ fi

# Bootstrap vcpkg
checkout_vcpkg "${gator_dir}" "${use_system_binaries}"
# and perfetto
checkout_perfetto "${gator_dir}"

# check cmake exe
cmake_exe=$(validate_and_return_cmake_exe "${cmake_exe}")
Expand Down

0 comments on commit 58ae10b

Please sign in to comment.