Skip to content

Commit

Permalink
Install bazelisk to /usr/bin
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Feb 7, 2023
1 parent 84dc295 commit 1de7b5f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/actions/bazel-ci-jammy/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,18 @@ echo ::group::Install tools: pip
pip3 install -U pip vcstool colcon-common-extensions
echo ::endgroup::

# Install bazelisk
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64
mv ./bazelisk-linux-amd64 /usr/bin/bazel
chmod +x /usr/bin/bazel

# Import repos
mkdir -p /gz/bazel
cd /gz/bazel
vcs import . < /github/workspace/example/bazel.repos

cp -R /github/workspace ./bazel


echo ::group::Install dependencies from binaries
EXCLUDE_APT="libignition|libgz|libsdformat|libogre|dart"
UBUNTU_VERSION=`lsb_release -cs`
Expand All @@ -45,20 +52,17 @@ ln -sf ./bazel/example/BUILD.example ./BUILD.bazel
ln -sf ./bazel/example/bazelrc.example ./.bazelrc
ln -sf ./bazel/example/bazelproject.example ./.bazelproject

wget https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64
mv ./bazelisk-linux-amd64 ./bazel

echo ::group::Bazel sync
./bazel sync || {
bazel sync || {
status=$?
echo "Error during sync"
}
echo ::endgroup::

echo ::group::Bazel build
./bazel build $BAZEL_ARGS
bazel build $BAZEL_ARGS
echo ::endgroup::

echo ::group::Bazel test
./bazel test $BAZEL_ARGS
bazel test $BAZEL_ARGS
echo ::endgroup::

0 comments on commit 1de7b5f

Please sign in to comment.