Skip to content

Commit

Permalink
Change Bazel install script to rootless, use Podman engine for cibw
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjng committed Apr 15, 2024
1 parent 24ef625 commit 8adb828
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/install_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ if ! bazel version; then
arch="arm64"
fi
echo "Downloading $arch Bazel binary from GitHub releases."
curl -L -o /usr/local/bin/bazel "https://github.com/bazelbuild/bazel/releases/download/7.1.1/bazel-7.1.1-linux-$arch"
chmod +x /usr/local/bin/bazel
curl -L -o $HOME/bin/bazel --create-dirs "https://github.com/bazelbuild/bazel/releases/download/7.1.1/bazel-7.1.1-linux-$arch"
chmod +x $HOME/bin/bazel
else
# bazel is installed for the correct architecture
# Bazel is installed for the correct architecture
exit 0
fi
6 changes: 6 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ jobs:
CIBW_SKIP: "*-musllinux"
CIBW_TEST_SKIP: "cp38-macosx_*:arm64"
CIBW_ARCHS_LINUX: auto64 aarch64
CIBW_ARCHS_WINDOWS: auto64
CIBW_BEFORE_ALL_LINUX: bash .github/install_bazel.sh
# Rootless requirement of rules_python, see
# https://github.com/bazelbuild/rules_python/pull/713 .
CIBW_CONTAINER_ENGINE: podman
# Grab the rootless Bazel installation inside the container.
CIBW_ENVIRONMENT_LINUX: PATH=$PATH:$HOME/bin
CIBW_TEST_COMMAND: python {project}/bindings/python/google_benchmark/example.py

- name: Upload Google Benchmark ${{ matrix.os }} wheels
Expand Down

0 comments on commit 8adb828

Please sign in to comment.