Skip to content

Commit c179d3a

Browse files
committed
ci: add bazel installation to test workflow for consistent ci environment
1 parent adf5df5 commit c179d3a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ jobs:
3030
cache-dependency-path: |
3131
setup.py
3232
33+
- name: Install Bazel
34+
run: |
35+
mkdir -p ~/.local/bin
36+
if [[ "${{ runner.os }}" == "Linux" ]]; then
37+
wget --no-check-certificate -q https://github.com/bazelbuild/bazel/releases/download/${{ env.USE_BAZEL_VERSION }}/bazel-${{ env.USE_BAZEL_VERSION }}-linux-x86_64 -O ~/.local/bin/bazel
38+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
39+
wget --no-check-certificate -q https://github.com/bazelbuild/bazel/releases/download/${{ env.USE_BAZEL_VERSION }}/bazel-${{ env.USE_BAZEL_VERSION }}-darwin-arm64 -O ~/.local/bin/bazel
40+
fi
41+
chmod +x ~/.local/bin/bazel
42+
echo "$HOME/.local/bin" >> $GITHUB_PATH
43+
bazel --version
44+
3345
- name: Install dependencies
3446
run: |
3547
python -m pip install --upgrade pip

0 commit comments

Comments
 (0)